magic-api-mcp-server: Instructions file for Codex

AGENTS.md

magic-api-mcp-server AGENTS.md is an instructions file for Codex, OpenCode from fastmcp-me/magic-api-mcp-server. It costs 749 tokens per session, scanned A, original, from a forked repository, MIT.

Repository instructions for a Magic-API tool server. Magic-API is a system for exposing and calling web API endpoints; the instructions are partly in Chinese.

In plain words
What is it for?
Use them when changing the server, extracting or searching API endpoints, calling or debugging APIs over WebSockets, and running its Python tests.
Why use it?
They give contributors one place to find the project layout, development commands, coding rules, and testing expectations.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is fastmcp-me/magic-api-mcp-server's own configuration. It tells Codex and OpenCode how to work on magic-api-mcp-server 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 magic-api-mcp-server configures →

Reuse

Borrowing it

Nothing to install: this file belongs to fastmcp-me/magic-api-mcp-server. 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/fastmcp-me/magic-api-mcp-server/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/fastmcp-me/magic-api-mcp-server

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 magic-api-mcp-server AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/fastmcp-me/magic-api-mcp-server/agents-md/github.svg)](https://agentmods.dev/instructions/fastmcp-me/magic-api-mcp-server/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/fastmcp-me/magic-api-mcp-server/agents-md"><img src="https://agentmods.dev/badge/instructions/fastmcp-me/magic-api-mcp-server/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 magic-api-mcp-server AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/fastmcp-me/magic-api-mcp-server/agents-md"><img src="https://agentmods.dev/badge/instructions/fastmcp-me/magic-api-mcp-server/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 749 This file is loaded in full into every session.
When invoked 749 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin fork From a forked repository.
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.00749 $0.00749
Opus 5.5 $0.00300 $0.00300
Sonnet 5.5 $0.00150 $0.00150
Haiku 4.5 $0.00075 $0.00075

Measured 2mo ago against content hash f87b5c7f6d30, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

magic-api-mcp-server 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 2mo 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 · 37 lines

What it actually says

Repository Guidelines

项目结构与模块组织

  • extract_api_paths.py:从 Magic-API 数据源抽取端点并导出 CSV,支持关键词与方法过滤。
  • magic_api_client.py 与 magic_api_debug_client.py:WebSocket 调试核心,负责日志监听、断点控制和命令执行。
  • magic_api_resource_manager.py:封装资源同步逻辑,供代理脚本复用。
  • mcp/:多代理实验脚本与配置,保持独立命名空间便于扩展。
  • magicapi_mcp/tools/api_tools.py:API执行工具模块,包含 call_magic_api 工具用于调用接口。
  • magicapi_mcp/tools/query_tools.py:查询工具模块,包含搜索和过滤API端点的功能。
  • test/ 目录及根目录 test_*.py:脚本化回归用例,覆盖消息过滤、断点、异步网络修复、API搜索等场景。

构建、测试与开发命令

  • 安装依赖:pip install -r requirements.txt,确保 requests 与 websockets 版本一致。
  • 提取接口:python3 extract_api_paths.py --url http://127.0.0.1:10712/magic/web/resource --query 关键词。
  • 调试调用:python3 magic_api_client.py --call 'GET /demo' --params 'k=v' --listen-only。
  • API搜索测试:python3 test/test_search_api_endpoints.py,验证API端点搜索和过滤功能。
  • 异步回归:python3 test_async_http_fix.py,验证 HTTP 调用不阻塞 WebSocket。
  • 批量检查:find test -name 'test_*.py' -exec python3 {} +,快速执行脚本式测试矩阵。

编码风格与命名约定

  • Python 保持 4 空格缩进与模块级 docstring,函数名、变量名统一 snake_case。
  • 文件命名体现职责,例如 magic_api_* 前缀标识客户端相关逻辑。
  • CLI 提示与日志沿用现有 emoji+中文文案,突出执行阶段与异常类型。
  • 新增第三方依赖需同步更新 requirements.txt 并写明用途注释。

测试准则

  • 每项修复至少补充一个可复现脚本,命名为 test_描述.py 并放在 test/。
  • 异步流程需覆盖事件循环内外两种调用,可参考 test_async_http_fix.py 的结构。
  • 涉及远程 HTTP 的用例请提供 Mock、替代 URL 或说明本地模拟步骤,避免 CI 网络依赖。
  • 调试客户端改动要验证断点、消息过滤、认证登录三类关键路径。

提交与合并请求指南

  • 建议提交信息采用 type(scope): summary,常见 type 包括 feat、fix、refactor、test。
  • 推送前运行相关测试脚本并清理临时日志,保持工作树干净。
  • PR 描述需说明背景、实现要点与验证方式,并附命令输出或截图证明关键行为。
  • 若改动影响接口或配置,列出回滚策略与默认值,协助评审快速评估风险。
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. 2mo ago First seen · 37 lines · 749 tokens per session scan A f87b5c7f6d30

Subscribe to this mod's changes

magic-api-mcp-server AGENTS.md is an instructions file published in the GitHub repository fastmcp-me/magic-api-mcp-server (0 stars, last pushed 1y ago), licensed MIT. It adds 749 tokens to every session, about $0.0030 per session on Opus 5.5. A static security scan graded it A with 0 findings. It comes from a forked repository.

Related

magic-api-mcp-server AGENTS.md compared with instructions from other repositories

magic-api-mcp-server AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
magic-api-mcp-server AGENTS.mdfastmcp-me/magic-api-mcp-serverInstructions file01y agoMITA749Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode