Skip to content

Commit 0b86d89

Browse files
committed
📈 AkTools MCP Server
1 parent 793fb57 commit 0b86d89

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

mcp_aktools/__init__.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
_LOGGER = logging.getLogger(__name__)
1616
_LOGGER.setLevel(logging.INFO)
1717

18-
mcp = FastMCP(name="mcp-aktools", version="0.1.11")
18+
mcp = FastMCP(name="mcp-aktools", version="0.1.12")
1919

2020
field_symbol = Field(description="股票代码")
2121
field_market = Field("sh", description="股票市场,仅支持: sh(上证), sz(深证), hk(港股), us(美股), 不支持加密货币")
@@ -27,7 +27,7 @@
2727

2828
@mcp.tool(
2929
title="查找股票代码",
30-
description="根据股票名称、公司名称等关键词查找股票代码。"
30+
description="根据股票名称、公司名称等关键词查找股票代码, 不支持加密货币。"
3131
"该工具比较耗时,当你知道股票代码或用户已指定股票代码时,建议直接通过股票代码使用其他工具",
3232
)
3333
def search(
@@ -43,7 +43,7 @@ def search(
4343

4444
@mcp.tool(
4545
title="获取股票信息",
46-
description="根据股票代码和市场获取股票基本信息",
46+
description="根据股票代码和市场获取股票基本信息, 不支持加密货币",
4747
)
4848
def stock_info(
4949
symbol: str = field_symbol,
@@ -70,7 +70,7 @@ def stock_info(
7070

7171
@mcp.tool(
7272
title="获取股票历史价格",
73-
description="根据股票代码和市场获取股票历史价格及技术指标",
73+
description="根据股票代码和市场获取股票历史价格及技术指标, 不支持加密货币",
7474
)
7575
def stock_prices(
7676
symbol: str = field_symbol,
@@ -346,9 +346,11 @@ def newsnow_news(channels=None):
346346
)
347347
def okx_prices(
348348
instId: str = Field("BTC-USDT", description="产品ID,格式: BTC-USDT"),
349-
bar: str = Field("1h", description="K线时间粒度,仅支持: [1m/3m/5m/15m/30m/1H/2H/4H/6H/12H/1D/2D/3D/1W/1M/3M] 注意大小写,仅分钟为小写m"),
349+
bar: str = Field("1H", description="K线时间粒度,仅支持: [1m/3m/5m/15m/30m/1H/2H/4H/6H/12H/1D/2D/3D/1W/1M/3M] 除分钟为小写m外,其余均为大写"),
350350
limit: int = Field(100, description="返回数量(int),最大300,最小建议30", strict=False),
351351
):
352+
if not bar.endswith("m"):
353+
bar = bar.upper()
352354
res = requests.get(
353355
f"{OKX_BASE_URL}/api/v5/market/candles",
354356
params={

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "mcp-aktools"
3-
version = "0.1.11"
3+
version = "0.1.12"
44
description = "MCP Server for stock and crypto"
55
readme = "README.md"
66
requires-python = ">=3.10"

server.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "io.github.aahl/mcp-aktools",
44
"title": "AkTools MCP Server",
55
"description": "MCP Server for stock and crypto",
6-
"version": "0.1.11",
6+
"version": "0.1.12",
77
"repository": {
88
"url": "https://github.com/aahl/mcp-aktools",
99
"source": "github"
@@ -12,7 +12,7 @@
1212
{
1313
"registryType": "pypi",
1414
"identifier": "mcp-aktools",
15-
"version": "0.1.11",
15+
"version": "0.1.12",
1616
"transport": {"type": "stdio"}
1717
},
1818
{

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)