Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/sharplu/ko-mcp/agents-mdgit clone --depth 1 https://github.com/SharpLu/ko-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/sharplu/ko-mcp/agents-md)<a href="https://agentmods.dev/instructions/sharplu/ko-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/sharplu/ko-mcp/agents-md.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.02518 | $0.02518 |
| Opus 5 | $0.01259 | $0.01259 |
| Sonnet 5 | $0.00504 | $0.00504 |
| Haiku 4.5 | $0.00252 | $0.00252 |
Grade A, and why
ko-mcp AGENTS.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- 没有 SSH / 无法打 live 的环境:把需要 prod 验证的 curl 写出来交给用户,**不得跳过验证环节**。 How it starts
The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — ko-mcp 作业规范(所有 AI agent 的唯一入口)
无论你是 Claude、Codex 还是其他 agent,无论在哪台机器、哪个 session: 开始任何任务前先读完本文件。这是一个 monorepo,一份 AGENTS.md 管全仓。
任何事实只写一处。运维全景(服务器 / 集群 / 域名)见
/Users/l/KO/CLAUDE.md(运维手册)。 serving 端点的合约在另一个 repo:ko-api/AGENTS.md(tool 代理到的 ko-api 路径以那边为准)。
1. 这个仓库是什么
ko-mcp = KO 的 MCP + SDK monorepo,四个独立可发布的包:
| 目录 | 是什么 | 发布到 | 版本 |
|---|---|---|---|
server/ |
mcp.ko.io 的 Cloudflare Worker 本体(唯一 MCP 入口,24 tools,Streamable HTTP) | CF Worker ko-mcp-server |
server.json + package.json = 1.0.0 |
python/ |
ko-edgar PyPI SDK(httpx,同步+异步) |
PyPI ko-edgar |
0.1.0 |
typescript/sdk/ |
@ko-io/sdk(TS REST 客户端) |
npm | 0.1.0 |
typescript/mcp-proxy/ |
@ko-io/mcp-sec-data(stdio→mcp.ko.io 代理,动态转发 tool 列表) |
npm | 0.1.0 |
数据链:ko-api (api.ko.io serving) → server/ tools 代理 → MCP client(Claude / ChatGPT / …)。
worker 本身不碰 ClickHouse / D1,只是 ko-api 的薄客户端(koFetch)。
2. 环境事实(每个 session 都必须知道)
- 分支纪律:永远
git fetch && git switch -c <type>/<slug> origin/main。一分支 = 一任务 = 一 PR,squash merge。 - 部署:
- server = push
server/**到 main →.github/workflows/deploy-server.yml(wrangler versions deploy 100%+ 部署后tools/list >= 24健康门)。没有手动部署这回事。 - SDK(python + 2 个 npm 包) = 发 GitHub Release 才 publish(
publish-python.yml/publish-npm.yml,各自带 test 门:pytest/npm test)。
- server = push
KO_API_URL = https://api.ko.io是正确的——api.ko.io本身就是地理路由 Worker(api-geo-router),不是某个 origin。不要改成 origin IP / origin-api-eu 之类。- ko-api envelope:ko-api 把响应包成
{ data, meta };koFetch自动剥掉顶层data。Int64/UInt64 列以字符串到达(net_value / shares_held / holding_value…)。 - 没有 SSH / 无法打 live 的环境:把需要 prod 验证的 curl 写出来交给用户,不得跳过验证环节。
3. 铁律
每条都来自真实生产事故或架构约束。带机器强制的违反即挡 CI;不带的违反即事故复发。
| # | 规则 | 出处 | 机器强制 |
|---|---|---|---|
| 1 | 24-tool 契约:新增/删除/改名 tool 必须同步更新 server/src/__tests__/tools-proxy.test.ts 的 EXPECTED_TOOLS(断言恰好 24 个 + 全名)。漏改 = CI 直接 fail |
tool 契约门 | tools-proxy.test.ts |
| 2 | ko-api 的 Int64/UInt64 以字符串到达——喂给数字格式化前必须 num() 强转(Number(String(v))),别当 number 用。fmtMoney/fmtShares/fmtPct 已在 format.ts 顶部集中 coerce;num() 是参照(crypto.ts 是范本) |
net_value 类(stock_activity / crypto 溢出误渲染) | format.ts coerce + 单测 |
| 3 | 每个 tool 代理到一条 LIVE ko-api 路径。契约门只查 tool 注册(是否调 /api/ 路径),不查 liveness——ko-api 端点改动会静默打断 tool。新增/改动 tool 的路径必须对着 ko-api 路由核对并 curl 过 |
契约门覆盖面局限 | 人工(§6 curl) |
| 4 | 别硬编码 tool 列表:mcp-proxy 动态转发 mcp.ko.io 的 tools/list。KO_API_URL = api.ko.io 是地理路由(正确),也别在代理里写死路径 |
架构约定 | 人工 / PR review |
| 5 | ko-api response 两种形态都要能吃:koFetch 剥掉顶层 {data} 后,可能拿到 {data:[...],meta}(→ 裸数组)或双层嵌套(→ 对象)。读列表的 tool 要 Array.isArray() 分支,否则 shape 一变就静默"No results found" |
#192 stock-holders FINAL 事故的同类 serving 脆弱性 | stocks.test.ts |
| 6 | 单测禁触网:单元测试一律 vi.mock("../ko-fetch.js") / vi.stubGlobal("fetch", …),不连真 CH/ko-api。live 探测归 deploy 后的健康门 |
dev 机活服务让坏测试假绿 | no-network 守卫(如已挂) |
| 7 | 验证必须真跑:SDK / worker 改动 npm test(server)/pytest(python)绿;新/改 tool 的 ko-api 路径部署后 curl 过。眼看 ≠ verified——从没 curl 过的 tool 路径上线后可能全 500 |
#191 教训(ko-api) | PR 模板"验证证据"必填 |
| 8 | 版本 lockstep:server/server.json + server/package.json 一起动(registry id io.github.SharpLu/ko-mcp)。三个 SDK 包各自独立,但应保持同一版本号齐步走 |
registry / 发布一致性 | 人工 / PR review |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 97 lines · 2,518 tokens per session scan A a26d5e9623a8
ko-mcp AGENTS.md is an instructions file published in the GitHub repository SharpLu/ko-mcp (0 stars, last pushed 7d ago), licensed MIT. It adds 2,518 tokens to every session, about $0.0126 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
Vibe-Research AGENTS.md
AGENTS.md instructions for simonlin1212/Vibe-Research, covering vibe-research-agent 金融研究宪法, 0. 三条不可越线, 1. 数据纪律(五问 gate:给出任何数字或结论前逐条自问), 2. 研究哲学(评估框架,不是预测工具) and 3. 估值口径(你只选输入、解释输出;计算交给 calc/).
awesome-quant AGENTS.md
AGENTS.md instructions for wilsonfreitas/awesome-quant, covering agents.md, project overview, architecture, work tracking and planning and commands.
Guanlan CLAUDE.md
Instructions for shenyangs/Guanlan, covering claude.md, project, durable memory surfaces, development commands and core structure.
tradingview-mcp-server CLAUDE.md
Instructions for fiale-plus/tradingview-mcp-server, covering claude.md, project overview, build and development commands, running a single test file and development workflow.
MCP-Airflow-API copilot-instructions.md
Instructions for call518/MCP-Airflow-API, covering copilot instructions for mcp-airflow-api, project architecture, critical patterns, functions.py - persistent session with retry strategy and standard pattern in airflowapi.py.
openings-mcp AGENTS.md
Instructions for amikai/openings-mcp, a project described as: 💼 One MCP server to search job boards and company career sites.