MCP Server for Accounting Subject Analysis Method - 提供根据科目/指标名称获取分析方法和输出样例的工具
Project description
Accounting Subject Analysis Method MCP Server
这是一个 MCP (Model Context Protocol) 服务器,提供根据科目/指标名称获取该科目/指标的分析方法和分析输出样例的工具。
功能
- get_analysis_method: 根据科目/指标名称获取分析方法和输出样例
- list_all_subjects: 列出所有可用的科目/指标名称
安装
从 PyPI 安装(推荐)
包已发布到 PyPI,可以直接安装:
pip install accounting-subject-analysis-mcp-server
或使用 uv:
uv pip install accounting-subject-analysis-mcp-server
从源码安装
如果您想从源码安装或开发:
git clone <repository-url>
cd get_accounting_subject_analysis_method
pip install -e .
使用方法
作为 MCP 服务器运行(stdio 协议)
服务器默认使用 stdio(标准输入/输出)协议与 MCP 客户端通信。
方式一:使用安装后的命令(推荐)
安装包后,可以直接使用命令:
accounting-analysis-server
或使用 uv run:
uv run accounting-analysis-server
方式二:使用 Python 模块方式
python -m server
或使用 uv run:
uv run -m server
配置 MCP 客户端
在 MCP 客户端配置文件中添加此服务器。服务器支持 stdio 协议,可以通过以下方式配置:
方式一:使用安装后的命令(推荐)
{
"mcpServers": {
"accounting-subject-analysis": {
"command": "accounting-analysis-server"
}
}
}
或使用 uv run:
{
"mcpServers": {
"accounting-subject-analysis": {
"command": "uv",
"args": ["run", "accounting-analysis-server"]
}
}
}
方式二:使用 Python 模块方式
{
"mcpServers": {
"accounting-subject-analysis": {
"command": "python",
"args": ["-m", "server"]
}
}
}
或使用 uv run:
{
"mcpServers": {
"accounting-subject-analysis": {
"command": "uv",
"args": ["run", "-m", "server"]
}
}
}
注意:
- 使用
uv命令时,需要确保已安装uv。如果尚未安装,可以访问 uv 官网 进行安装。 - 使用
uv run时,uv会自动管理依赖,无需手动安装包。
工具说明
get_analysis_method
根据科目/指标名称获取该科目/指标的分析方法和分析输出样例。
参数:
subject_name(string): 科目/指标名称,例如:"货币资金"、"应收账款"、"存货"等
返回:
- 包含以下字段的字典:
科目/指标名称: 科目/指标名称分析方法: 该科目/指标的分析方法输出样例: 分析输出的样例
示例:
# 查询"货币资金"的分析方法
result = get_analysis_method("货币资金")
list_all_subjects
列出所有可用的科目/指标名称列表。
返回:
- 包含以下字段的字典:
总数: 可用科目/指标的总数科目/指标列表: 所有科目/指标名称的列表
知识库
知识库数据保存在 config/kb.json 文件中,包含各种会计科目和财务指标的分析方法和输出样例。
支持的科目/指标
服务器支持以下科目/指标(部分列表):
- 货币资金
- 应收账款
- 存货
- 固定资产
- 短期借款
- 应付账款
- 营业收入
- 净利润
- 现金流量表
- 利润表
- 偿债能力指标
- 营运能力指标
- 盈利能力指标
- 现金偿债能力
- 增长能力指标
- 等等...
使用 list_all_subjects 工具可以获取完整的列表。
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file accounting_subject_analysis_mcp_server-0.1.0.tar.gz.
File metadata
- Download URL: accounting_subject_analysis_mcp_server-0.1.0.tar.gz
- Upload date:
- Size: 30.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f8d6febcf08c21b49bafd37357c42059d693f5d94e408a730f7c17a8050f874
|
|
| MD5 |
2c1df7c02157bce9830ba3354eca2db6
|
|
| BLAKE2b-256 |
336ed9764cce06ecb52e0670aa30b63eb9d3480c89f5b69ec33c226047827f83
|
File details
Details for the file accounting_subject_analysis_mcp_server-0.1.0-py3-none-any.whl.
File metadata
- Download URL: accounting_subject_analysis_mcp_server-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
199d77dc67c682329f275f8a0a6272e8d179ced87805585af456d7061f323c03
|
|
| MD5 |
c4cf45a7a5aba876e53f4bca8d5e3471
|
|
| BLAKE2b-256 |
4b7170906885c74fbd8f55813d30492c337aaf57b0de5b3121df503351dbd971
|