Skip to main content

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 accounting_subject_analysis_mcp_server

或使用 uv run

uv run -m accounting_subject_analysis_mcp_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", "accounting_subject_analysis_mcp_server"]
    }
  }
}

或使用 uv run

{
  "mcpServers": {
    "accounting-subject-analysis": {
      "command": "uv",
      "args": ["run", "-m", "accounting_subject_analysis_mcp_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

accounting_subject_analysis_mcp_server-0.1.2.tar.gz (129.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file accounting_subject_analysis_mcp_server-0.1.2.tar.gz.

File metadata

File hashes

Hashes for accounting_subject_analysis_mcp_server-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e5853573fb0c49389dc44fd0247f947ab38b0b61fc3035a725fc51d8adf6bd52
MD5 09cc2f82b2ffd3e1471280239c324478
BLAKE2b-256 9cee44838c8e4708e0775173c4ed40bfe8cff14fc171a4a3690343eab011e309

See more details on using hashes here.

File details

Details for the file accounting_subject_analysis_mcp_server-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for accounting_subject_analysis_mcp_server-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8b41aef7c529b412658625c3c902f4c75c77a37295b3e05f0068cb9038e4333a
MD5 6cb8628969978b74ddfdbfe3f9f65f9b
BLAKE2b-256 4e3fced3564757ae400df8daf9b791295c6d2314e0c08833d51f71f8381d782f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page