mcp-tools

A development guide for connecting Python-based plugins to external tool servers through MCP, a standard way for software to expose tools to an AI agent. It covers registering tools, managing connections, passing request context, and tracing calls.

In plain words
What is it for?
Use it when building or changing Python tool plugins, MCP connections, tool registries, or tracing for tool calls.
Why use it?
It provides rules for keeping shared connections efficient and preventing request-specific data or secrets from leaking between runs.

Skill for Claude CodeCodex

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 skills/extra-org/extra/mcp-tools
Any agent
npx skills add extra-org/extra --skill mcp-tools
Clone the repo
git clone --depth 1 https://github.com/extra-org/extra

Made for: Claude Code, Codex.

Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 440 The whole file, excluding the scripts and references it only reads on demand.
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.00036 $0.00440
Opus 5 $0.00018 $0.00220
Sonnet 5 $0.00007 $0.00088
Haiku 4.5 $0.00004 $0.00044

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

Security

Grade A, and why

mcp-tools 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 2d 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.

.claude/skills/mcp-tools/SKILL.md · 61 lines

What it actually says

Skill: MCP & Tools

When to use this skill

Use this when working on Python plugin tools, MCP server connections, tool invocation, or tool tracing. Primary task: tasks/0007-mcp-tools-and-permissions.md.

Files to read first

  • AGENTS.md
  • docs/MCP_AND_TOOLS.md
  • docs/RUNTIME_LIFECYCLE.md

Architecture rules

  • Resolver plugins run before a node; tool plugins are exposed to the LLM during execution.
  • MCP clients are created once and shared; never per request.
  • Per-request data flows via ExecutionContext / ctx.
  • Prompt text is not a security boundary.
  • Secrets never live in YAML; they are redacted in traces.

Implementation rules

  • Implement tool registry and MCP integration in src/agentplatform/tools.
  • Load plugin classes once where possible.
  • Invoke configured class/method references with ctx.
  • Validate tool and MCP ids during validation/compilation; runtime should use resolved bindings.
  • Hold MCP clients on the long-lived runtime.

Validation checklist

  • Tool plugin references load and invoke through the registry.
  • MCP connections are created once and reused.
  • Per-request context does not leak through shared state.
  • Tool/MCP calls are traced with redaction.
  • Tests cover success and failure with fakes.
  • make check passes.

Common mistakes to avoid

  • Recreating MCP connections per request.
  • Treating resolvers as tools or tools as resolvers.
  • Skipping trace redaction.
  • Relying on prompt wording for enforcement.
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. 2d ago First seen · 61 lines · 36 tokens per session scan A f672165c6def

Subscribe to this mod's changes

mcp-tools is a skill published in the GitHub repository extra-org/extra (108 stars, last pushed 4d ago), licensed MIT. It adds 36 tokens to every session and 440 once invoked, about $0.0002 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.