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.1.tar.gz (129.1 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.1.tar.gz.

File metadata

File hashes

Hashes for accounting_subject_analysis_mcp_server-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3cce02b442ead57b6e9949a710c8292fb4541e8ddcf76d5460d717fb0fdcdb3a
MD5 1630d0d327b90e47d6b15107ea6a9b79
BLAKE2b-256 4efa412a6e281585c413a0fe12ad8355bd09fc3c9d701a766ca42e89288f7407

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accounting_subject_analysis_mcp_server-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ee1d2acfd40b2196c47d5ea67d668f0ec8a2f1171afab7748a37a3cf45e65d71
MD5 74f7c4fa4dbf9eab6f58179ab1e85661
BLAKE2b-256 daa042b4dd34d5341ab4ddad92c78476862608802f3b36219068f2704add2639

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