ko-mcp AGENTS.md

ko-mcp AGENTS.md is an instructions file for Codex, OpenCode from SharpLu/ko-mcp. It costs 2,518 tokens per session, scanned A, original, MIT.

A set of AGENTS.md instructions for the ko-mcp repository, a monorepo containing several related publishable packages. It defines the repository’s rules, environment facts, architecture, and workflow for AI agents.

In plain words
What is it for?
Use it at the start of work in ko-mcp to understand the packages, data flow, branching rules, deployment process, and how to add tools.
Why use it?
It gives agents the project context and operating rules they need before changing code across the repository.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/sharplu/ko-mcp/agents-md
Clone the repo
git clone --depth 1 https://github.com/SharpLu/ko-mcp

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for ko-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sharplu/ko-mcp/agents-md.svg)](https://agentmods.dev/instructions/sharplu/ko-mcp/agents-md)
Your own site
<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>
Per session 2,518 This file is loaded in full into every session.
When invoked 2,518 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 4d ago against content hash a26d5e9623a8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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 写出来交给用户,**不得跳过验证环节**。
AGENTS.md · 97 lines

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.ymlwrangler versions deploy 100% + 部署后 tools/list >= 24 健康门)。没有手动部署这回事。
    • SDK(python + 2 个 npm 包) = 发 GitHub Release 才 publish(publish-python.yml / publish-npm.yml,各自带 test 门:pytest / npm test)。
  • 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 自动剥掉顶层 dataInt64/UInt64 列以字符串到达(net_value / shares_held / holding_value…)。
  • 没有 SSH / 无法打 live 的环境:把需要 prod 验证的 curl 写出来交给用户,不得跳过验证环节

3. 铁律

每条都来自真实生产事故或架构约束。带机器强制的违反即挡 CI;不带的违反即事故复发。

# 规则 出处 机器强制
1 24-tool 契约:新增/删除/改名 tool 必须同步更新 server/src/__tests__/tools-proxy.test.tsEXPECTED_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/listKO_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 版本 lockstepserver/server.json + server/package.json 一起动(registry id io.github.SharpLu/ko-mcp)。三个 SDK 包各自独立,但应保持同一版本号齐步走 registry / 发布一致性 人工 / PR review

Read the full file on GitHub · 97 lines

Changes

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.

  1. 4d ago First seen · 97 lines · 2,518 tokens per session scan A a26d5e9623a8

Subscribe to this mod's changes

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.

Related

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/).

simonlin1212/Vibe-Research · 4,469 tokens

awesome-quant AGENTS.md

AGENTS.md instructions for wilsonfreitas/awesome-quant, covering agents.md, project overview, architecture, work tracking and planning and commands.

wilsonfreitas/awesome-quant · 1,549 tokens

Guanlan CLAUDE.md

Instructions for shenyangs/Guanlan, covering claude.md, project, durable memory surfaces, development commands and core structure.

shenyangs/Guanlan · 867 tokens

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.

fiale-plus/tradingview-mcp-server · 1,777 tokens

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.

call518/MCP-Airflow-API · 769 tokens

openings-mcp AGENTS.md

Instructions for amikai/openings-mcp, a project described as: 💼 One MCP server to search job boards and company career sites.

amikai/openings-mcp · 99 tokens