CSMAR MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CSMAR MCP Serverget stock data for AAPL from 2023-01-01 to 2023-12-31"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
CSMAR MCP Server
A Model Context Protocol (MCP) server for the CSMAR financial database, enabling direct access to CSMAR financial data within Claude Code.
✨ Features
Full CSMAR Data Access: Supports 240+ databases, including financial statements, stock trading data, company information, and more.
Intelligent Login Management: Supports automatic login via environment variables and token caching.
11 MCP Tools: Comprehensive functionality covering database exploration, data querying, previewing, and more.
Persistent Python Process: Reuses Python sessions to significantly improve performance.
Request Retry Mechanism: Automatically retries when network instability occurs.
Graceful Shutdown: Supports SIGTERM/SIGINT signals.
Health Checks: Monitor service status at any time.
Python Middleware: Stable encapsulation based on the CSMAR-PYTHON SDK.
Simple Configuration: One-click configuration with native Claude Code integration.
Related MCP server: cn-financial-mcp
📋 Prerequisites
CSMAR Account: A valid CSMAR (GTA) institutional account (personal or institutional accounts are both supported).
Python 3.8+: Requires the CSMAR-PYTHON SDK and its dependencies.
Install Python dependencies:
pip install urllib3 websocket websocket_client pandas prettytableDownload and install the CSMAR-PYTHON SDK (from the official website or by contacting CSMAR).
Node.js 18+: To run the MCP server.
Claude Code: The latest version of the Claude Code editor.
🚀 Quick Start
1. Clone the Project
git clone https://github.com/ww11-max/Csmar-MCP-server.git
cd Csmar-MCP-server2. Install Dependencies
# 安装Node.js依赖
npm install
# 安装Python依赖(CSMAR SDK所需)
pip install urllib3 websocket websocket_client pandas prettytable
# 安装CSMAR-PYTHON SDK
# 从CSMAR官网下载SDK压缩包,解压到Python的site-packages目录
# 或者按照官方文档安装:https://www.gtadata.com/products/csmar-api3. Configure Environment Variables
Create a .env file in the project root directory:
# CSMAR 配置
CSMAR_API_BASE=https://api.gtarsc.com
CSMAR_USERNAME=你的CSMAR用户名
CSMAR_PASSWORD=你的CSMAR密码
CSMAR_LANG=0 # 0=中文, 1=英文⚠️ Security Tip: Do not commit the
.envfile to Git! It is already configured in.gitignoreto be ignored automatically.
4. Configure Claude Code (Includes both Claude Desktop and VS Code extension configuration methods)
Add the MCP server configuration to your Claude Code configuration file:
Windows (%APPDATA%/Claude/claude_desktop_config.json):
{
"mcpServers": {
"csmar": {
"command": "node",
"args": ["C:\\path\\to\\Csmar-MCP-server\\src\\index.js"],
"env": {
"CSMAR_API_BASE": "https://api.gtarsc.com",
"CSMAR_USERNAME": "你的CSMAR用户名",
"CSMAR_PASSWORD": "你的CSMAR密码",
"CSMAR_LANG": "0"
}
}
}
}macOS/Linux (~/.config/Claude/claude_desktop_config.json):
{
"mcpServers": {
"csmar": {
"command": "node",
"args": ["/path/to/Csmar-MCP-server/src/index.js"],
"env": {
"CSMAR_API_BASE": "https://api.gtarsc.com",
"CSMAR_USERNAME": "你的CSMAR用户名",
"CSMAR_PASSWORD": "你的CSMAR密码",
"CSMAR_LANG": "0"
}
}
}
}If you are using the Claude Code extension in VS Code, configure it as follows:
After configuring the env file, modify the Claude Code MCP configuration. The MCP configuration file for Claude Code in VS Code is located at:
%APPDATA%/Code/User/globalStorage/saoudval.claude-code/mcp.jsonAlternatively, search for "MCP" in VS Code settings to find the MCP Servers configuration entry. Add the configuration:
{
"mcpServers": {
"csmar": {
"command": "node",
"args": ["C:\\path\\to\\Csmar-MCP-server\\src\\index.js"],
"env": {
"CSMAR_API_BASE": "https://api.gtarsc.com",
"CSMAR_USERNAME": "你的CSMAR用户名",
"CSMAR_PASSWORD": "你的CSMAR密码",
"CSMAR_LANG": "0"
}
}
}
}⚠️ The path must be replaced with your actual cloned project path, e.g., D:\Projects\Csmar-MCP-server\src\index.js
5. Restart Claude Code
Restart Claude Code to load the MCP server.
🔧 Usage
Verify Installation
mcp__csmar__csmar_health_check()Basic Data Exploration
# 列出所有可用数据库(约240个)
mcp__csmar__csmar_list_databases()
# 查看"财务报表"数据库中的表
mcp__csmar__csmar_list_tables(database_name="财务报表")
# 查看"FS_Combas"表的字段
mcp__csmar__csmar_list_fields(table_name="FS_Combas")
# 预览表数据(前几行)
mcp__csmar__csmar_preview(table_name="FS_Combas")Data Query Example
# 查询财务报表数据
mcp__csmar__csmar_query(
table_name="FS_Combas",
columns=["Stkcd", "ShortName", "Accper", "Typrep", "A001000000"],
condition="Stkcd like '3%' and Typrep='A'",
start_time="2020-01-01",
end_time="2021-12-31",
limit=5
)
# 查询记录数量
mcp__csmar__csmar_query_count(
table_name="FS_Combas",
condition="Stkcd like '3%'",
start_time="2020-01-01",
end_time="2021-12-31"
)
# 获取股票数据
mcp__csmar__get_stock_data(
stock_code="000001",
start_date="2024-01-01",
end_date="2024-12-31",
frequency="daily"
)
# 获取财务数据
mcp__csmar__get_financial_data(
stock_code="000001",
start_date="2020-01-01",
end_date="2024-12-31",
indicators=["A001000000", "A002000000"]
)
# 获取公司信息
mcp__csmar__get_company_info(stock_code="000001")🛠️ Available Tools
Tool Name | Description | Parameters |
| Check service health status | None |
| Log in to CSMAR account |
|
| List accessible databases | None |
| List tables in a database |
|
| List fields in a table |
|
| General data query |
|
| Preview table data |
|
| Query record count |
|
| Get stock trading data |
|
| Get financial data |
|
| Get basic company info |
|
📁 Project Structure
csmar-mcp-server/
├── src/
│ ├── index.js # MCP 服务器主文件
│ └── python_client.py # Python 客户端
├── config/
│ ├── .env.example # 环境变量示例
│ └── .mcp.json # MCP 配置示例
├── docs/
│ ├── CSMAR_MCP_配置完成报告.md
│ ├── 快速开始指南.md
│ └── CSMAR机构账号配置指南.md
├── examples/
│ └── test_input.json # 测试输入示例
├── package.json # Node.js 依赖
├── README.md # 本文件
└── .gitignore # Git 忽略文件🔍 Recommended Databases
Common Databases
Financial Statements:
财务报表,FS_Combas,FS_Comins,FS_ComscfdStock Trading:
股票市场交易数据,股票日行情Company Info:
公司基本信息,上市公司基本信息Macroeconomics:
宏观经济数据库
Data Time Range
Financial Statements: 2018-2022
AI-related Data: 2024-2025
Stock Trading: Updated in real-time
⚠️ Notes
Query Limits
Max 200,000 records per query: Large datasets require paginated queries.
30-minute rate limit for identical conditions: Avoid frequent queries with the same conditions.
Time Format: Must use "YYYY-MM-DD" format.
Paginated Query Example
# 第1页
condition = "Stkcd like '3%' limit 0,200000"
# 第2页
condition = "Stkcd like '3%' limit 200000,200000"
mcp__csmar__csmar_query(
table_name="FS_Combas",
columns=["Stkcd", "ShortName", "Accper", "Typrep"],
condition=condition
)🐛 Troubleshooting
Common Issues
1. "MCP Server not responding"
Confirm Claude Code has been restarted.
Check if the configuration file path is correct.
Manually test the Python client:
echo '{"action":"check_availability","params":{}}' | python src/python_client.py --once
2. "Database does not exist"
Use
csmar_list_databases()to get the exact name.Check if the database name contains spaces.
Confirm your account has access to that database.
3. Query results are empty
Check if the time range is correct.
Verify the query condition syntax.
Use
preview()to check the data format first.
4. CSMAR SDK import failure
Confirm the CSMAR-PYTHON SDK is installed correctly.
Run
python src/python_client.pyto view detailed error information.
Log Files
Python Client Logs: Output via stderr.
MCP Server Logs: Output via stderr.
🔄 Changelog
v1.1.0 (2026-04-15)
✨ Added persistent Python process mode for significantly improved performance.
✨ Added
csmar_health_checktool.✨ Implemented
get_stock_data,get_financial_data, andget_company_infotools.🔧 Fixed hardcoded Python path issue; now automatically detects site-packages.
🔧 Fixed zod import issue.
🔧 Added request retry mechanism.
🔧 Added graceful shutdown support.
v1.0.0
🎉 Initial release.
🤝 Contributing
Issues and Pull Requests are welcome!
Fork the project.
Create a feature branch (
git checkout -b feature/amazing-feature).Commit your changes (
git commit -m 'Add amazing feature').Push to the branch (
git push origin feature/amazing-feature).Create a Pull Request.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
CSMAR (GTA): For providing financial data services.
Anthropic: For developing the Model Context Protocol.
Claude Code: For the excellent AI programming environment.
📞 Support
CSMAR Official Support: service@gtadata.com, 400-888-3636
Project Issues: GitHub Issues
Documentation: See the detailed guides in the
docs/directory.
💡 Tip: Before you start, ensure your CSMAR account and environment variables are configured correctly!
Available Tools
11 toolscsmar_health_checkA
检查 CSMAR 服务健康状态
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description is minimal. It implies a read-only check but lacks details on what constitutes 'healthy' or potential effects if the service is down. However, for a health check tool, the behavior is somewhat self-evident.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no extraneous information, efficiently conveying the tool's purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity (no parameters, no output schema), the description is largely complete for understanding the tool's function. It could be enhanced by mentioning the expected output (e.g., a status string), but it is sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, so the description does not need to add parameter meaning. The baseline for 0 parameters is 4, and the description adequately covers the absence of inputs.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool checks CSMAR service health status, using a specific verb and resource. It distinguishes itself from sibling tools that deal with data operations like listing databases or querying.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives, such as using it as a prerequisite before other operations or when service issues are suspected.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
csmar_list_databasesA
列出用户有权访问的 CSMAR 数据库
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries full responsibility for behavioral disclosure. It does not mention whether authentication is required, error behavior, or if the operation is read-only. Since this is a list operation, it is likely safe, but the description does not confirm this.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that conveys the essential purpose without any superfluous words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
While the description covers the basic purpose, it lacks context about preconditions (e.g., does the user need to be logged in via csmar_login?) and the nature of the output. Given no output schema, some description of the return format would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, so the input schema is trivially covered. The description does not need to add parameter meaning. Baseline for zero parameters is 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'list' and the resource 'databases', specifying 'that the user has access to'. This distinguishes it from siblings like csmar_list_tables and csmar_list_fields, which list different entities.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool compared to alternatives. With siblings like csmar_list_fields and csmar_list_tables, explicit usage context would help an agent decide which list tool to invoke.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
csmar_list_fieldsB
列出指定表中的所有字段
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes | 表名称 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose any behavioral traits beyond the obvious listing operation. It lacks information on authentication, side effects, or constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no wasted words, effectively conveying the tool's purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and no output schema, the description is adequate but lacks context on output format, pagination, or error handling, which could be helpful.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and the parameter 'table_name' is already described in the schema. The description adds no additional meaning beyond what the schema provides, aligning with the baseline of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists all fields in a specified table, with a specific verb ('list') and resource ('fields'). It distinguishes from sibling tools like csmar_list_tables and csmar_list_databases.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. The description only states what it does, without providing context for usage or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
csmar_list_tablesB
列出指定数据库中的所有表
| Name | Required | Description | Default |
|---|---|---|---|
| database_name | Yes | 数据库名称 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It only states 'list tables' without disclosing any behavioral traits (e.g., read-only, error handling, side effects). This is insufficient for a tool with no annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, short sentence that efficiently conveys the core purpose. However, it could add more context without becoming verbose, hence not a 5.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and no output schema, the description is minimally adequate. It explains what it does and the parameter, but lacks details on return format, error cases, or behavior, leaving gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the parameter 'database_name' has a description in the schema. The tool description does not add any extra semantic value beyond the schema; baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description '列出指定数据库中的所有表' clearly states the tool's action (list tables) and scope (in a specified database). It distinguishes from siblings like csmar_list_databases (lists databases) and csmar_list_fields (lists fields).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives, such as prerequisites or context. The description merely states the action without contextual usage advice.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
csmar_loginC
登录 CSMAR 账户
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | 用户名/已验证电话/已验证邮箱 | |
| pwd | Yes | 密码 | |
| lang | No | 语言: 0=中文, 1=英文 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, and the description only says 'log in', omitting important behavioral details such as session creation, authentication state, error handling, or rate limits. The description carries the full burden but fails to disclose these traits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence. While it efficiently conveys the core purpose, it lacks any structured detail (e.g., bullet points) that could improve scannability. Still, no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool is authentication-related and has no output schema, the description fails to cover important context such as what happens on successful/failed login, whether it sets a session token, or how to handle credentials. This is a notable gap for a login operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for all three parameters (account, pwd, lang). The description adds no additional meaning beyond what the schema already provides, so the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool logs into a CSMAR account (specific verb and resource). Though no sibling differentiation is provided, the sibling tools are data retrieval functions, making the purpose distinct.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. The description does not mention prerequisites, order of operations, or context (e.g., must be called before other tools).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
csmar_previewC
预览表数据 (前几行)
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes | 表名称 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It only states 'preview' without explaining if it is read-only, limits rows, or how it handles errors. Minimal transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded, using a single line to convey the tool's purpose. No wasted words, though structure could be improved with sections for clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple preview tool, the description covers the basic purpose but omits details like return format, row limit, or behavior. It is adequate but not fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with a clear description for the single parameter 'table_name'. The tool description adds no additional meaning beyond the schema, earning the baseline score of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it previews table data (first few rows), using a specific verb and resource. It is distinguishable from sibling tools like csmar_query (full query) and csmar_query_count (count), but does not explicitly differentiate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance provided on when to use this tool versus alternatives. Sibling tools exist for full queries and counts, but the description lacks any context on prerequisites or scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
csmar_queryD
通用 CSMAR 数据查询
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes | 表名称 | |
| columns | No | 要查询的字段列表 | |
| condition | No | 查询条件 (SQL WHERE 子句) | |
| start_time | No | 开始时间 (YYYY-MM-DD) | |
| end_time | No | 结束时间 (YYYY-MM-DD) | |
| limit | No | 返回记录数限制 | |
| format | No | 返回格式 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose any behavioral traits (e.g., read-only, authorization needs, rate limits). The term 'query' implies read-only, but it is not explicitly stated, leaving the agent without safety or usage context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single short sentence, but it is under-specified and lacks structure. It fails to convey essential information, making it more of a placeholder than a concise description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of 7 parameters, multiple sibling tools, and no output schema or annotations, the description is completely inadequate. It does not explain what CSMAR is, how queries are executed, or any constraints, severely limiting an agent's ability to use the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but the description adds no additional meaning beyond the parameter names and types. It does not explain how the parameters interact, provide examples, or clarify the purpose of SQL WHERE clauses or return formats.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description is '通用 CSMAR 数据查询' which translates to 'General CSMAR data query'. It is vague and does not specify what specific data or operations are covered, nor does it differentiate from sibling tools like csmar_preview or csmar_query_count.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives (e.g., csmar_preview, csmar_query_count). The description lacks any context about prerequisites or use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
csmar_query_countC
查询满足条件的记录数量
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes | 表名称 | |
| columns | No | 字段列表 | |
| condition | No | 查询条件 | |
| start_time | No | 开始时间 | |
| end_time | No | 结束时间 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided; the description does not disclose behavioral traits such as whether it is read-only, any limitations, or performance implications. The agent is left with no information beyond the basic function.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence that is clear and front-loaded. No extraneous information, though additional details could be added without harming conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple count query, the description combined with the schema is minimally adequate. However, missing usage guidelines and behavioral context make it incomplete for an AI agent to use correctly without extra knowledge.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with Chinese descriptions for all parameters. The description adds no extra meaning beyond the schema, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it queries the count of records, distinguishing it from sibling csmar_query which likely returns actual records. However, it does not explicitly differentiate between the two.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like csmar_query or csmar_preview. The description implies counting, but does not advise on context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_company_infoC
获取公司基本信息
| Name | Required | Description | Default |
|---|---|---|---|
| stock_code | Yes | 股票代码 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It only states 'get basic company info', implying a read operation, but gives no details on scope, side effects, or return format.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise (one sentence), which is front-loaded but lacks substance. It earns its place minimally, but could be more informative without losing conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of output schema and sibling tools that may overlap, the description is incomplete. It does not clarify what 'basic company info' includes, leaving ambiguity about its domain.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema covers 100% of parameters with a clear description for 'stock_code'. The tool description adds no additional meaning beyond the schema, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (获取) and resource (公司基本信息), identifying it as a retrieval tool for basic company info. However, it does not differentiate from sibling tools like get_financial_data or get_stock_data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, nor any prerequisites or context for its use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_financial_dataC
获取 CSMAR 财务数据
| Name | Required | Description | Default |
|---|---|---|---|
| stock_code | Yes | 股票代码 | |
| start_date | Yes | 开始日期 (YYYY-MM-DD) | |
| end_date | Yes | 结束日期 (YYYY-MM-DD) | |
| indicators | No | 财务指标列表 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden for behavioral transparency. It does not mention any side effects, authorization needs, rate limits, or data scope (e.g., whether it returns all available financial indicators or just those specified).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely short (one sentence), but it sacrifices completeness for brevity. It does not provide enough context to be useful, falling into under-specification rather than effective conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 4 parameters and no output schema or annotations, the description is incomplete. It does not explain the return format, how results are paginated, or any dependencies like login requirements, leaving significant gaps for an agent to use it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema covers 100% of parameters with descriptions, so the schema already explains each parameter. The description adds no additional semantic context beyond what the schema provides, meeting the baseline expectation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description '获取 CSMAR 财务数据' states the verb 'get' and resource 'CSMAR financial data', giving a general idea of the tool's purpose. However, it does not distinguish this tool from similar siblings like 'get_stock_data' or 'csmar_query', which may retrieve overlapping or different data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus its siblings (e.g., get_stock_data, csmar_query). There is no information about prerequisites, such as requiring a session from csmar_login, or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_stock_dataC
获取 CSMAR 股票交易数据
| Name | Required | Description | Default |
|---|---|---|---|
| stock_code | Yes | 股票代码 | |
| start_date | Yes | 开始日期 (YYYY-MM-DD) | |
| end_date | Yes | 结束日期 (YYYY-MM-DD) | |
| frequency | No | 数据频率 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, and the description does not disclose any behavioral traits such as return format, side effects, authentication requirements, or rate limits. For a tool with no output schema, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence, but it lacks any structural formatting. While minimal, it is not overly verbose, but the brevity sacrifices completeness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 4 parameters and no output schema, the description is too brief. It does not explain what the returned data represents, how errors are handled, or any constraints like date range limits.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage for all 4 parameters, each with Chinese descriptions. The tool description adds no additional meaning beyond what the schema provides, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb '获取' (get) and resource 'CSMAR 股票交易数据' (CSMAR stock trading data), distinguishing it from siblings like get_company_info and get_financial_data. However, it lacks specificity about what exactly constitutes 'stock trading data'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. Sibling tools such as get_financial_data or get_company_info exist, but the description does not help the agent decide which to choose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Most tools have clearly distinct purposes (e.g., listing databases vs tables vs fields, login vs query). However, the three 'get_*' tools (get_company_info, get_financial_data, get_stock_data) could overlap with the generic csmar_query since all fetch data, but descriptions and specific naming mitigate confusion.
Tools are in snake_case, but eight are prefixed with 'csmar_' while three (get_company_info, get_financial_data, get_stock_data) lack this prefix. This inconsistency breaks the pattern and could cause agents to misgroup tools.
11 tools is appropriate for a data retrieval service covering login, database exploration, querying, counting, previewing, and specific data endpoints. Each tool earns its place without being excessive.
The tool set covers core CRUD-like operations for data retrieval: listing databases/tables/fields, querying, counting, previewing, and accessing specific data types. Missing write/update/delete operations, but those likely fall outside the scope of a read-only CSMAR data service.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
The financial MCP for AI agents - 90+ financial tables, SEC filings, signals, alt-data.
China A-share market data for research, backtesting and AI agents via MCP.
MCP server giving AI agents one-connection access to China A-share market intelligence: financials,
Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides professional financial data access for LLMs via MCP, supporting providers like Tushare, Wind, and DataYes.1458Apache 2.0
- AlicenseNot gradedqualityFmaintenanceProvides access to Chinese mainland financial data including A-stock quotes, financial statements, industry analysis, and macroeconomics through 42 MCP tools, with automatic data source fallback and no API key required.40Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables access to the CSMAR financial database via MCP, providing tools for querying financial data, stock data, company info, and more through natural language in compatible clients like Codex and Claude Code.182MIT
- FlicenseBqualityDmaintenanceEnables comprehensive financial analysis including structured products, portfolio optimization, risk analytics, and backtesting through Claude Desktop integration.181
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ww11-max/CSMAR-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server