mcp-code-execution: Instructions file for Codex

AGENTS.md

mcp-code-execution AGENTS.md is an instructions file for Codex, OpenCode from hypen-code/mcp-code-execution. It costs 6,710 tokens per session, scanned A, original, MIT.

Developer instructions for MCE, a Python server that lets AI discover and run API functions through a small set of tools. Its code-execution feature runs generated Python in an isolated Docker environment.

In plain words
What is it for?
Use it as the required reference when developing MCE, including its server discovery, function inspection, code execution, cached code, and reusable-code features.
Why use it?
It gives agents the project structure, fixed technology choices, quality rules, and credential-safety requirements they must follow when changing the codebase.

Instructions file for CodexOpenCode

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

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

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/ob1/aai/mcp-code-execution/.

Reuse

Borrowing it

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

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 mcp-code-execution AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/hypen-code/mcp-code-execution/agents-md"><img src="https://agentmods.dev/badge/instructions/hypen-code/mcp-code-execution/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6,710 This file is loaded in full into every session.
When invoked 6,710 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.06710 $0.06710
Opus 5.5 $0.02684 $0.02684
Sonnet 5.5 $0.01342 $0.01342
Haiku 4.5 $0.00671 $0.00671

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

Security

Grade A, and why

mcp-code-execution 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 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| Use `requests` or `urllib` | `httpx` only |
AGENTS.md · 619 lines

How it starts

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

AGENTS.md — MCE Development Guide for AI Agents

This file governs how AI agents develop, maintain, and extend the MCE (MCP Code Execution) codebase. Read it in full before making any change.


1. Project Overview

MCE is a production-grade MCP server built with Python 3.13 and FastMCP. It exposes 4 meta-tools + 1 prompt to LLMs instead of bloating the context with N per-endpoint tools:

Tool / Prompt Purpose
list_servers Discover compiled API servers and their functions
get_functions Inspect 1–5 function signatures and return schemas (batch)
execute_code Run LLM-generated Python code in an isolated Docker sandbox
run_cached_code Re-execute a cached snippet with optional parameter overrides
reusable_code_guide (prompt) Concise rules for writing parameterized, cacheable code

Key invariant: credentials are never embedded in generated code or logs. They are injected exclusively as Docker environment variables at runtime.


2. Repository Layout

/home/ob1/aai/mcp-code-execution/      ← project root
├── pyproject.toml                      ← single source of truth for deps & tools
├── .env.example                        ← template; never commit .env
├── config/swaggers.yaml                ← swagger source definitions
├── sandbox/
│   ├── Dockerfile                      ← python:3.13-slim sandbox image
│   ├── entrypoint.py                   ← code receiver inside sandbox
│   └── requirements.txt                ← httpx, pydantic, orjson only
├── src/mce/
│   ├── __init__.py                     ← version only
│   ├── __main__.py                     ← CLI: clean | compile | serve | run
│   ├── server.py                       ← FastMCP tool registration (4 tools + 1 prompt)
│   ├── config.py                       ← MCEConfig (pydantic-settings)
│   ├── errors.py                       ← full exception hierarchy
│   ├── models/__init__.py              ← ALL pydantic models (single file)
│   ├── compiler/
│   │   ├── swagger_parser.py           ← OpenAPI 3.x / Swagger 2.0 parser
│   │   ├── codegen.py                  ← Jinja2 Python function generator
│   │   ├── orchestrator.py             ← compile pipeline coordinator
│   │   ├── llm_enhancer.py             ← optional Claude improvement pass
│   │   └── templates/function.py.j2   ← Jinja2 template for functions.py
│   ├── runtime/
│   │   ├── registry.py                 ← loads manifests, provides lookups
│   │   ├── executor.py                 ← Docker sandbox execution pipeline
│   │   └── cache.py                    ← async SQLite cache (aiosqlite)
│   ├── security/
│   │   ├── ast_guard.py                ← AST static analysis (runs before exec)
│   │   ├── policies.py                 ← read-only + domain allowlist enforcement
│   │   └── vault.py                    ← credential → Docker env var injection
│   └── utils/
│       ├── logging.py                  ← structlog setup
│       └── hashing.py                  ← SHA256 helpers for cache keys
├── tests/
│   ├── conftest.py                     ← shared fixtures (mce_config, specs, sources)
│   ├── fixtures/                       ← YAML swagger test fixtures
│   │   ├── weather_api.yaml            ← read-only, simple GET endpoints
│   │   ├── hotel_api.yaml              ← read-write, path + body params
│   │   └── petstore.yaml               ← standard petstore with $ref schemas
│   ├── unit/                           ← isolated, no Docker, no network
│   │   ├── test_swagger_parser.py
│   │   ├── test_codegen.py
│   │   ├── test_ast_guard.py
│   │   └── test_cache.py
│   └── integration/                    ← requires compiled output on disk
│       └── test_compiler.py

Read the full file on GitHub · 619 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. 2mo ago First seen · 619 lines · 6,710 tokens per session scan A 219c1c8ecffe

Subscribe to this mod's changes

mcp-code-execution AGENTS.md is an instructions file published in the GitHub repository hypen-code/mcp-code-execution (10 stars, last pushed 6mo ago), licensed MIT. It adds 6,710 tokens to every session, about $0.0268 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

mcp-code-execution AGENTS.md compared with instructions from other repositories

mcp-code-execution AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mcp-code-execution AGENTS.mdhypen-code/mcp-code-executionInstructions file106mo agoMITA6,710Codex, 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