ko-mcp: Instructions file for Codex

AGENTS.md

ko-mcp AGENTS.md is an instructions file for Codex, OpenCode from SharpLu/ko-mcp. It costs 5,819 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

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

This is SharpLu/ko-mcp's own configuration. It tells Codex and OpenCode how to work on ko-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ko-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to SharpLu/ko-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/SharpLu/ko-mcp/main/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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ko-mcp AGENTS.md

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,819 This file is loaded in full into every session.
When invoked 5,819 The same file — it is already loaded in full.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.05819 $0.05819
Opus 5.5 $0.02328 $0.02328
Sonnet 5.5 $0.01164 $0.01164
Haiku 4.5 $0.00582 $0.00582

Measured 11d ago against content hash 155c3c19d0a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 11d 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 · 121 lines

How it starts

The opening of the file, as written. The whole thing — 121 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 管全仓。

任何事实只写一处。运维全景(服务器 / 集群 / 域名)在私有运维手册(不在本仓)。 serving 端点的合约在另一个 repo:ko-api/AGENTS.md(tool 代理到的 ko-api 路径以那边为准)。

1. 这个仓库是什么

ko-mcp = KO 的 MCP + SDK monorepo,四个独立可发布的包:

目录 是什么 发布到 版本
server/ mcp.ko.io 的 Cloudflare Worker 本体(唯一 MCP 入口,32 tools,Streamable HTTP) CF Worker ko-mcp-server server.json + package.json + src/index.ts = 1.4.0
python/ ko-edgar PyPI SDK(httpx,同步+异步) PyPI ko-edgar 源码 0.2.0(已发布 0.1.0)
typescript/sdk/ @ko-io/sdk(TS REST 客户端) npm 源码 0.2.0(已发布 0.1.0)
typescript/mcp-proxy/ @ko-io/mcp-sec-data(stdio→mcp.ko.io 代理,动态转发 tool 列表) npm 源码 0.2.0(已发布 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(部署前在本地构建上跑黄金契约阻断门 npm run golden:gate → wrangler versions deploy 100% → 部署后 /health + tools/list >= 32 健康门;部署后的 golden 检查尚未接线,报 SKIPPED)。没有手动部署这回事。同一道黄金契约门也在改 server/** 的 PR 上跑(.github/workflows/golden-pr.yml,无任何 secret,fork PR 同样能跑;按路径过滤,所以不是 required check——部署前那道仍是硬门)。 健康门失败 = 自动 rollback:部署前先抓当前 serving 版本 id 并把 rollback 命令打进日志,失败后 wrangler rollback <id>(不是 wrangler versions rollback,该子命令不存在)→ 重新跑健康门 → Discord #deploys。坏版本永不删除。运维细节见 docs/deploy-rollback.md。
    • SDK(python + 2 个 npm 包) = 发 GitHub Release 触发 publish(publish-python.yml / publish-npm.yml,各自带 test 门:pytest / npm test)。PyPI 自动发布未打通:publish-python.yml 仅有的两次运行(2026-07-11)都以 invalid-publisher 失败——pypi.org 上 Trusted Publisher 未配置(需 owner SharpLu / repo ko-mcp / workflow publish-python.yml / environment pypi);PyPI 上的 ko-edgar 0.1.0 是手动上传的。查:gh run list -R SharpLu/ko-mcp --workflow publish-python.yml。publish-mcp-registry.yml 由 tag v* 触发。
    • CI 跑在 GitHub-hosted ubuntu-latest(ci.yml 四个 job + golden-pr.yml + deploy-server.yml 全部如此)。ko-mcp 是 public repo,Actions 分钟数免费,私仓那次 Actions 账单中断从未波及它——这正是 PR #12 revert 掉 PR #8(迁 A3 自建 runner)的理由。别再把本仓的 gate 往自建 runner 上搬。
  • 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 写出来交给用户,不得跳过验证环节。

Read the full file on GitHub · 121 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. 11d ago Changed · +1 lines · +97 tokens per session 155c3c19d0a3
  2. 12d ago Changed · +55 tokens per session 56e4f8682a25
  3. 15d ago Changed · +2 lines · +444 tokens per session dae484f4118a
  4. 18d ago Changed · +1 lines · +87 tokens per session d4af407b5c3e
  5. 29d ago Changed · +1 lines · +374 tokens per session c20c834d8de8
  6. 1mo ago Changed · +1 lines · +353 tokens per session d46543f597b8
  7. 1mo ago Changed · +18 lines · +1,891 tokens per session 6316de706e67
  8. 1mo 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 3d ago), licensed MIT. It adds 5,819 tokens to every session, about $0.0233 per session on Opus 5.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