mcpx AGENTS.md

mcpx AGENTS.md is an instructions file for Codex, OpenCode from opentokenz/mcpx. It costs 1,245 tokens per session, scanned A, original, Apache-2.0.

A repository guide for the MCPX Go project, an MCP Runtime that acts as a gateway for development tools and tasks. It explains the code layout, current version rules, and development commands.

In plain words
What is it for?
Use it when building, testing, checking, or changing MCPX. It also explains how to register a workspace, start the server, and use terminal observation.
Why use it?
It gives a coding agent the project context needed to work in the right folders and follow the project's build, test, formatting, and compatibility rules.

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/opentokenz/mcpx/agents-md
Clone the repo
git clone --depth 1 https://github.com/opentokenz/mcpx

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 mcpx AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/opentokenz/mcpx/agents-md.svg)](https://agentmods.dev/instructions/opentokenz/mcpx/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/opentokenz/mcpx/agents-md"><img src="https://agentmods.dev/badge/instructions/opentokenz/mcpx/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,245 This file is loaded in full into every session.
When invoked 1,245 The same file — it is already loaded in full.
Security scan A 0 findings. 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.01245 $0.01245
Opus 5 $0.00622 $0.00622
Sonnet 5 $0.00249 $0.00249
Haiku 4.5 $0.00125 $0.00125

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

Security

Grade A, and why

mcpx AGENTS.md scanned grade A with 0 findings 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 3d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 81 lines

How it starts

The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.

仓库指南

项目结构与模块组织

MCPX 是运行在开发环境中的 MCP Runtime(网关),Go module 为 mcpx,需 Go 1.26.1+(以 go.mod 为准)。

路径 说明
cmd/mcpx-server/ 可执行入口(main、子命令如 oauth-register
internal/observation/ 观测系统:timelinerenderdiffeventstorewidth 等,用于实时观测、事件流、变更摘要、终端展示和模型友好交互(最近新增 observation_bridge.go)
docs/plans/docs/specs/ 实现计划与设计规格
bin/ 本地构建产物(已 gitignore)
~/.mcpx/ 运行时数据(配置、SQLite、日志、任务),不在本仓库

本地产品文档 prd/docs/superpowers/.gitignore 排除,勿提交。

版本策略

  • 永远不要考虑兼容以前的版本。
  • 新实现只维护当前契约;不得为旧版本保留别名、适配器、迁移分支、旧 Schema、旧工具入口或兼容测试。
  • 发生契约变更时,直接同步修改实现、文档和测试;旧行为应删除,不应继续隐藏保留。
  • 除非用户在当前请求中明确要求,否则不讨论、不实现历史版本兼容方案。

构建、测试与开发命令

命令均来自 README 与 .github/workflows/ci.yml

# 编译
go build -o bin/mcpx-server ./cmd/mcpx-server

# 单测(CI 同款)
go test ./... -count=1

# 竞态检测
go test -race ./... -count=1

# 格式检查(仅 cmd + internal)
test -z "$(gofmt -l ./cmd ./internal)"

# 静态检查
go vet ./...

# 发布构建(CGO 关闭,与 CI/GoReleaser 一致)
CGO_ENABLED=0 go build -o bin/mcpx-server ./cmd/mcpx-server

本地运行:先执行 ./bin/mcpx-server workspace register /path/to/project,再执行 ./bin/mcpx-server 启动服务;终端观测使用 ./bin/mcpx-server observe <workspace-name>。版本:./bin/mcpx-server -version。 发版:推送 v* 标签触发 GoReleaser(见 .github/workflows/release.yml.goreleaser.yaml)。

编码风格与命名

  • 使用 gofmt;改动保持与现有包风格一致(小写包名、导出类型 PascalCase、YAML 字段 snake_case tag)。
  • 平台相关文件用 _unix.go / _windows.go / _darwin.go 后缀(见 changesetenvironmentcmd)。
  • 优先改 internal/ 对应包;工具面注册与 HTTP 网关在 internal/server/
  • 最小充分改动;不要引入未使用的依赖。

测试指南

  • 框架:Go 标准库 testing
  • 命名:*_test.go,与被测包同目录(如 internal/auth/token_test.go)。
  • 改后端逻辑后应补/跑相关包测试;宣称完成前至少对改动包执行 go test ./path/to/pkg -count=1,合并前宜跑 go test ./... -count=1(与 CI 一致)。
  • 单测默认用于本地验证;是否纳入提交由用户当轮决定。

提交与 PR

  • 历史风格:Conventional Commits,subject 中文动词开头,例如:
    • feat(cli): 增加 oauth-register 子命令
    • fix(oauth): 持久化 DCR 客户端
    • docs(readme): 补充接入说明
    • chore(repo): … / ci(release): …
  • 禁止 agent 自动 commit / push。若建议提交:先展示变更摘要与完整 commit message,经用户明确确认后再执行
  • PR:说明动机与行为变化;关联 issue(如有);涉及鉴权/网关/配置时写清兼容与风险;CI 须绿(test、gofmt、vet、race、build)。

Read the full file on GitHub · 81 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. 3d ago First seen · 81 lines · 1,245 tokens per session scan A b756ac2c3264

Subscribe to this mod's changes

mcpx AGENTS.md is an instructions file published in the GitHub repository opentokenz/mcpx (383 stars, last pushed 13d ago), licensed Apache-2.0. It adds 1,245 tokens to every session, about $0.0062 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens