coinex-mcp-server 0.1.0a2__tar.gz → 0.1.0a3__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.

Files changed (17) hide show
  1. {coinex_mcp_server-0.1.0a2 → coinex_mcp_server-0.1.0a3}/MANIFEST.in +0 -1
  2. {coinex_mcp_server-0.1.0a2 → coinex_mcp_server-0.1.0a3}/PKG-INFO +1 -1
  3. {coinex_mcp_server-0.1.0a2 → coinex_mcp_server-0.1.0a3}/pyproject.toml +1 -1
  4. {coinex_mcp_server-0.1.0a2 → coinex_mcp_server-0.1.0a3}/src/coinex_mcp_server/__init__.py +1 -1
  5. {coinex_mcp_server-0.1.0a2 → coinex_mcp_server-0.1.0a3}/src/coinex_mcp_server.egg-info/PKG-INFO +1 -1
  6. {coinex_mcp_server-0.1.0a2 → coinex_mcp_server-0.1.0a3}/src/coinex_mcp_server.egg-info/SOURCES.txt +0 -1
  7. coinex_mcp_server-0.1.0a2/CLAUDE.md +0 -114
  8. {coinex_mcp_server-0.1.0a2 → coinex_mcp_server-0.1.0a3}/.env.example +0 -0
  9. {coinex_mcp_server-0.1.0a2 → coinex_mcp_server-0.1.0a3}/LICENSE +0 -0
  10. {coinex_mcp_server-0.1.0a2 → coinex_mcp_server-0.1.0a3}/README.md +0 -0
  11. {coinex_mcp_server-0.1.0a2 → coinex_mcp_server-0.1.0a3}/README_cn.md +0 -0
  12. {coinex_mcp_server-0.1.0a2 → coinex_mcp_server-0.1.0a3}/setup.cfg +0 -0
  13. {coinex_mcp_server-0.1.0a2 → coinex_mcp_server-0.1.0a3}/src/coinex_mcp_server/coinex_client.py +0 -0
  14. {coinex_mcp_server-0.1.0a2 → coinex_mcp_server-0.1.0a3}/src/coinex_mcp_server/main.py +0 -0
  15. {coinex_mcp_server-0.1.0a2 → coinex_mcp_server-0.1.0a3}/src/coinex_mcp_server.egg-info/dependency_links.txt +0 -0
  16. {coinex_mcp_server-0.1.0a2 → coinex_mcp_server-0.1.0a3}/src/coinex_mcp_server.egg-info/requires.txt +0 -0
  17. {coinex_mcp_server-0.1.0a2 → coinex_mcp_server-0.1.0a3}/src/coinex_mcp_server.egg-info/top_level.txt +0 -0
@@ -2,7 +2,6 @@
2
2
  include README.md
3
3
  include README_cn.md
4
4
  include LICENSE
5
- include CLAUDE.md
6
5
 
7
6
  # Include configuration examples
8
7
  include .env.example
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: coinex-mcp-server
3
- Version: 0.1.0a2
3
+ Version: 0.1.0a3
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 +7,7 @@ where = ["src"]
7
7
 
8
8
  [project]
9
9
  name = "coinex-mcp-server"
10
- version = "0.1.0a2"
10
+ version = "0.1.0a3"
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"
@@ -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.0a2"
7
+ __version__ = "0.1.0a3"
8
8
  __author__ = "CoinEx MCP Contributors"
9
9
  __license__ = "Apache-2.0"
10
10
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: coinex-mcp-server
3
- Version: 0.1.0a2
3
+ Version: 0.1.0a3
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
@@ -1,5 +1,4 @@
1
1
  .env.example
2
- CLAUDE.md
3
2
  LICENSE
4
3
  MANIFEST.in
5
4
  README.md
@@ -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
- - 项目文档和注释都用英文,但问答的时候,请使用中文描述