fee-attribution-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
fee-attribution-mcp
DeepSeek Harness 插件(MCP):把 A 股成交记录的费用拆开算,并按券商交割单对账。
非投资建议;费用以券商交割单为准。本地运行,不上传任何成交数据。
它解决什么
绝大多数回测工具默认「万三免五」,而散户实际多为万一免五;再加上深市过户费是否重复计、ETF 是否收印花税这些口径差异,成本模型常常是错的。这个插件按你真实费率逐笔拆解,并把期望值与交割单实收对账。
Related MCP server: a-share-financial-research
两个工具
工具 | 用途 |
| 单笔试算:代码 / 方向 / 价格 / 数量 → 佣金、印花税、过户费、合计 |
| 导入交割 CSV:逐笔拆解 + 对账,返回汇总、口径与差异明细(最多 20 笔) |
依赖
Windows + Python 3.10 以上(用
py启动器调用,装 CPython 时默认带)Python 包
mcp:pip install mcp不需要单独安装
fee_attribution:Python 源码已随本包一起分发(python/fee_attribution/)
安装
用户:从 npm 装(已发布)
py -3 -m pip install mcp
npm i -g fee-attribution-mcp然后在 DSH 的「插件」页添加插件(包名 fee-attribution-mcp)。
新会话里应出现 mcp__fee__fee_calc 与 mcp__fee__fee_audit。
本机开发:link 安装
改动在源码仓库里做,再 link 进 DSH:
cd <本目录>
npm link :: 或在 DSH 插件页添加本地目录改完 Python 逻辑后,先同步再发版:
pwsh -File sync.ps1 :: 把源码复制进 python/fee_attribution/
pwsh -File sync.ps1 -Check :: 只比较,有差异返回码 1(适合发版前卡一道)
npm version patch
npm publish --access public启动方式(无需改路径)
cordis.patch.yml 用 py -3 -c 启动,启动时会自动定位本插件目录下的 python/:
command: py
args: ['-3', '-c', '<内联引导脚本,按 DSH_PROFILE_DIR 或 ~/.dsh/profiles/*/node_modules/... 查找>']常见坑:如果你的机器上 python 是指向 python.cmd 的包装脚本,直接 spawn 会以
Connection closed 失败——这是本插件改用 py 的原因。若机器上没有 py,把 command
改成 python.exe 的绝对路径即可。
费率口径
项 |
|
|
佣金 | 万 1,最低 0 | 万 3,最低 5 |
印花税 | 卖出股票 0.05%;ETF/转债免 | 同左 |
过户费 | 沪市 0.001% 双向;深市视作已含佣金 | 同左 |
可转债按沪万 0.5 / 深万 2.5、最低 1 元计。
已知限制
Windows only:启动命令用
py启动器,未适配 macOS / Linux。Python 源码是副本:
python/fee_attribution/由仓库同步而来,改逻辑要两边一起更新。北交所 / B 股未建模,会明确返回
supported: false,不静默按 A 股计算。不接行情,不做策略回测。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Watchlist, signals, trades and journal for HK, US and China A-share stocks. Records only; no orders.
China A-share screening, filings, holdings, flows and calendars as agent tools.
China A-share market data for research, backtesting and AI agents via MCP.
Access real-time and historical market data for China A-shares and Hong Kong stocks, along with ne…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides comprehensive A-share (Chinese stock market) data including stock information, historical prices, financial reports, macroeconomic indicators, technical analysis, and valuation metrics through the free Baostock data source.27MIT
- AlicenseNot gradedqualityCmaintenanceProvides 11 composable MCP tools for A-share market research, covering quotes, news, technical signals, sector performance, portfolio risk, backtesting, and paper trading, with traceable data sources and calculation basis.MIT
- AlicenseNot gradedqualityCmaintenanceProvides AI agents with standard MCP tool calls to run A-share market research workflows—macro analysis, daily review generation, strategy backtesting, watchlist scanning, stock analysis, and risk monitoring—while preserving manual confirmation for trade decisions.MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to access A-share research data, run quantitative screening and Chan-theory/factor analysis, scan dragon leaders and sector rotation, and manage recommendation feedback with realistic entry-price validation.MIT