coinex-mcp-server 0.1.0a1__tar.gz → 0.1.0a5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of coinex-mcp-server might be problematic. Click here for more details.
- {coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/MANIFEST.in +0 -1
- {coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/PKG-INFO +5 -5
- {coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/pyproject.toml +5 -5
- {coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/src/coinex_mcp_server/__init__.py +1 -1
- {coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/src/coinex_mcp_server.egg-info/PKG-INFO +5 -5
- {coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/src/coinex_mcp_server.egg-info/SOURCES.txt +0 -1
- coinex_mcp_server-0.1.0a1/CLAUDE.md +0 -114
- {coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/.env.example +0 -0
- {coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/LICENSE +0 -0
- {coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/README.md +0 -0
- {coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/README_cn.md +0 -0
- {coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/setup.cfg +0 -0
- {coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/src/coinex_mcp_server/coinex_client.py +0 -0
- {coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/src/coinex_mcp_server/main.py +0 -0
- {coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/src/coinex_mcp_server.egg-info/dependency_links.txt +0 -0
- {coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/src/coinex_mcp_server.egg-info/requires.txt +0 -0
- {coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/src/coinex_mcp_server.egg-info/top_level.txt +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: coinex-mcp-server
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0a5
|
|
4
4
|
Summary: A CoinEx MCP (Model Context Protocol) server that enables AI agents to interact with the CoinEx cryptocurrency exchange
|
|
5
5
|
Author: CoinEx MCP Contributors
|
|
6
6
|
Maintainer: CoinEx MCP Contributors
|
|
7
7
|
License-Expression: Apache-2.0
|
|
8
|
-
Project-URL: Homepage, https://github.com/
|
|
9
|
-
Project-URL: Repository, https://github.com/
|
|
10
|
-
Project-URL: Documentation, https://github.com/
|
|
11
|
-
Project-URL: Bug Tracker, https://github.com/
|
|
8
|
+
Project-URL: Homepage, https://github.com/coinexcom/coinex_mcp_server
|
|
9
|
+
Project-URL: Repository, https://github.com/coinexcom/coinex_mcp_server
|
|
10
|
+
Project-URL: Documentation, https://github.com/coinexcom/coinex_mcp_server#readme
|
|
11
|
+
Project-URL: Bug Tracker, https://github.com/coinexcom/coinex_mcp_server/issues
|
|
12
12
|
Keywords: coinex,mcp,model-context-protocol,cryptocurrency,exchange,trading,api,fastmcp,ai-agent
|
|
13
13
|
Classifier: Development Status :: 3 - Alpha
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
@@ -7,7 +7,7 @@ where = ["src"]
|
|
|
7
7
|
|
|
8
8
|
[project]
|
|
9
9
|
name = "coinex-mcp-server"
|
|
10
|
-
version = "0.1.
|
|
10
|
+
version = "0.1.0a5"
|
|
11
11
|
description = "A CoinEx MCP (Model Context Protocol) server that enables AI agents to interact with the CoinEx cryptocurrency exchange"
|
|
12
12
|
readme = "README.md"
|
|
13
13
|
requires-python = ">=3.10"
|
|
@@ -52,10 +52,10 @@ dependencies = [
|
|
|
52
52
|
]
|
|
53
53
|
|
|
54
54
|
[project.urls]
|
|
55
|
-
Homepage = "https://github.com/
|
|
56
|
-
Repository = "https://github.com/
|
|
57
|
-
Documentation = "https://github.com/
|
|
58
|
-
"Bug Tracker" = "https://github.com/
|
|
55
|
+
Homepage = "https://github.com/coinexcom/coinex_mcp_server"
|
|
56
|
+
Repository = "https://github.com/coinexcom/coinex_mcp_server"
|
|
57
|
+
Documentation = "https://github.com/coinexcom/coinex_mcp_server#readme"
|
|
58
|
+
"Bug Tracker" = "https://github.com/coinexcom/coinex_mcp_server/issues"
|
|
59
59
|
|
|
60
60
|
# MCP servers are typically launched by MCP clients (e.g., Claude Desktop)
|
|
61
61
|
# rather than as standalone CLI tools, so we don't define entry points here.
|
|
@@ -4,7 +4,7 @@ This package enables AI agents to interact with the CoinEx exchange API through
|
|
|
4
4
|
the Model Context Protocol (MCP), supporting both spot and futures markets.
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
-
__version__ = "0.1.
|
|
7
|
+
__version__ = "0.1.0a5"
|
|
8
8
|
__author__ = "CoinEx MCP Contributors"
|
|
9
9
|
__license__ = "Apache-2.0"
|
|
10
10
|
|
{coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/src/coinex_mcp_server.egg-info/PKG-INFO
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: coinex-mcp-server
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0a5
|
|
4
4
|
Summary: A CoinEx MCP (Model Context Protocol) server that enables AI agents to interact with the CoinEx cryptocurrency exchange
|
|
5
5
|
Author: CoinEx MCP Contributors
|
|
6
6
|
Maintainer: CoinEx MCP Contributors
|
|
7
7
|
License-Expression: Apache-2.0
|
|
8
|
-
Project-URL: Homepage, https://github.com/
|
|
9
|
-
Project-URL: Repository, https://github.com/
|
|
10
|
-
Project-URL: Documentation, https://github.com/
|
|
11
|
-
Project-URL: Bug Tracker, https://github.com/
|
|
8
|
+
Project-URL: Homepage, https://github.com/coinexcom/coinex_mcp_server
|
|
9
|
+
Project-URL: Repository, https://github.com/coinexcom/coinex_mcp_server
|
|
10
|
+
Project-URL: Documentation, https://github.com/coinexcom/coinex_mcp_server#readme
|
|
11
|
+
Project-URL: Bug Tracker, https://github.com/coinexcom/coinex_mcp_server/issues
|
|
12
12
|
Keywords: coinex,mcp,model-context-protocol,cryptocurrency,exchange,trading,api,fastmcp,ai-agent
|
|
13
13
|
Classifier: Development Status :: 3 - Alpha
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
-
|
|
5
|
-
## 项目概述
|
|
6
|
-
|
|
7
|
-
这是一个 CoinEx MCP (Model Context Protocol) 服务器,允许 AI 代理与 CoinEx 加密货币交易所交互。该项目使用 FastMCP 框架构建,支持现货和期货市场的数据查询与交易操作。
|
|
8
|
-
|
|
9
|
-
## 核心架构
|
|
10
|
-
|
|
11
|
-
### 主要组件
|
|
12
|
-
- `main.py` - MCP 服务器入口点,定义所有工具和传输配置
|
|
13
|
-
- `coinex_client.py` - CoinEx API 客户端,统一封装现货/期货 API 调用
|
|
14
|
-
- `bench/test_public_methods.py` - 公开接口测试脚本
|
|
15
|
-
- `deploy/` - Nginx 和 Supervisor 部署配置
|
|
16
|
-
|
|
17
|
-
### 技术栈
|
|
18
|
-
- **FastMCP 2.x** - MCP 服务器框架
|
|
19
|
-
- **httpx** - HTTP 客户端
|
|
20
|
-
- **pydantic** - 数据验证
|
|
21
|
-
- **python-dotenv** - 环境变量管理
|
|
22
|
-
|
|
23
|
-
## 开发命令
|
|
24
|
-
|
|
25
|
-
### 安装依赖
|
|
26
|
-
```bash
|
|
27
|
-
uv sync
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### 运行服务器
|
|
31
|
-
```bash
|
|
32
|
-
# 默认 stdio 模式
|
|
33
|
-
python main.py
|
|
34
|
-
|
|
35
|
-
# HTTP 模式
|
|
36
|
-
python main.py --transport http --host 0.0.0.0 --port 8000 --enable-http-auth
|
|
37
|
-
|
|
38
|
-
# 查看帮助
|
|
39
|
-
python main.py --help
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### 测试公开接口
|
|
43
|
-
```bash
|
|
44
|
-
cd tests
|
|
45
|
-
pytest test_public_methods.py
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### 开发工具
|
|
49
|
-
```bash
|
|
50
|
-
# 代码格式化
|
|
51
|
-
black .
|
|
52
|
-
|
|
53
|
-
# 类型检查
|
|
54
|
-
mypy main.py coinex_client.py
|
|
55
|
-
|
|
56
|
-
# 运行测试
|
|
57
|
-
pytest
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## 关键设计模式
|
|
61
|
-
|
|
62
|
-
### 认证处理
|
|
63
|
-
- **stdio 模式**: 从环境变量读取 API 凭据
|
|
64
|
-
- **HTTP/SSE 模式**: 通过请求头传递凭据 (`X-CoinEx-Access-Id`, `X-CoinEx-Secret-Key`)
|
|
65
|
-
- 使用 `get_secret_client_from_request()` 动态创建客户端实例
|
|
66
|
-
|
|
67
|
-
### 工具标签系统
|
|
68
|
-
- `tags={"public"}`: 公开市场数据查询,无需认证
|
|
69
|
-
- `tags={"auth"}`: 账户和交易功能,需要 API 凭据
|
|
70
|
-
- HTTP 模式默认只暴露 public 工具,需 `--enable-http-auth` 启用 auth 工具
|
|
71
|
-
|
|
72
|
-
### 参数标准化
|
|
73
|
-
- `symbol`: 支持 `BTCUSDT`/`BTC/USDT`/`btc` 格式,自动规范化
|
|
74
|
-
- `market_type`: `"spot"`(默认) 或 `"futures"`
|
|
75
|
-
- `period`: K线周期,有白名单验证
|
|
76
|
-
|
|
77
|
-
### 错误处理
|
|
78
|
-
- 所有 API 调用返回统一格式: `{code: int, message: str, data: any}`
|
|
79
|
-
- 错误情况记录日志但不抛异常,返回原始 API 响应
|
|
80
|
-
|
|
81
|
-
## 环境配置
|
|
82
|
-
|
|
83
|
-
### 必需的环境变量
|
|
84
|
-
```bash
|
|
85
|
-
# API 凭据 (stdio 模式)
|
|
86
|
-
COINEX_ACCESS_ID=your_access_id
|
|
87
|
-
COINEX_SECRET_KEY=your_secret_key
|
|
88
|
-
|
|
89
|
-
# 可选配置
|
|
90
|
-
HTTP_AUTH_ENABLED=true # 启用 HTTP 认证
|
|
91
|
-
API_TOKEN=bearer_token # Bearer 令牌保护
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### 配置文件
|
|
95
|
-
- `.env` - 本地开发环境变量
|
|
96
|
-
- `deploy/nginx/coinex_mcp.conf` - Nginx 反向代理配置
|
|
97
|
-
- `deploy/supervisor/coinex_mcp.conf` - Supervisor 进程管理
|
|
98
|
-
|
|
99
|
-
## 部署注意事项
|
|
100
|
-
|
|
101
|
-
1. **安全**: HTTP 模式下的凭据传递仅适用于内网环境
|
|
102
|
-
2. **HTTPS**: 生产环境必须使用 HTTPS 保护 API 凭据
|
|
103
|
-
3. **日志**: 确保反向代理不记录敏感头信息
|
|
104
|
-
4. **工作进程**: 可通过 `--workers` 参数配置多进程
|
|
105
|
-
|
|
106
|
-
## 开发约定
|
|
107
|
-
|
|
108
|
-
- 使用 f-string 进行字符串格式化
|
|
109
|
-
- API 方法使用 async/await 模式
|
|
110
|
-
- 工具函数遵循 FastMCP 装饰器规范
|
|
111
|
-
- 错误处理优先返回结构化响应而非抛异常
|
|
112
|
-
|
|
113
|
-
## 输出
|
|
114
|
-
- 项目文档和注释都用英文,但问答的时候,请使用中文描述
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/src/coinex_mcp_server/coinex_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/src/coinex_mcp_server.egg-info/requires.txt
RENAMED
|
File without changes
|
{coinex_mcp_server-0.1.0a1 → coinex_mcp_server-0.1.0a5}/src/coinex_mcp_server.egg-info/top_level.txt
RENAMED
|
File without changes
|