context-mcp: Agent for Claude Code

.claude/agents/fastmcp-tool-architect.md

fastmcp-tool-architect is an agent for Claude Code from geq1fan/context-mcp. It costs 46 tokens per session (639 once invoked), scanned B, original, MIT.

An expert agent for designing and implementing tools with the FastMCP Python framework. FastMCP uses decorators and typed parameters to expose functions through the MCP tool protocol.

In plain words
What is it for?
Use it to design tool signatures, configure @mcp.tool() functions, write documentation, handle errors, and check protocol compatibility.
Why use it?
It helps keep tool interfaces understandable, inputs validated, errors useful, and responses compatible with MCP clients. This is useful when adding or changing FastMCP tools.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is geq1fan/context-mcp's own configuration. It tells Claude Code how to work on context-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 context-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to geq1fan/context-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/geq1fan/context-mcp/main/.claude/agents/fastmcp-tool-architect.md
Clone the repo
git clone --depth 1 https://github.com/geq1fan/context-mcp

Made for: Claude Code.

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 fastmcp-tool-architect

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/geq1fan/context-mcp/fastmcp-tool-architect"><img src="https://agentmods.dev/badge/agents/geq1fan/context-mcp/fastmcp-tool-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 639 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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.00046 $0.00639
Opus 5 $0.00023 $0.00319
Sonnet 5 $0.00009 $0.00128
Haiku 4.5 $0.00005 $0.00064

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

Security

Grade B, and why

fastmcp-tool-architect scanned grade B 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 9d 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.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

tools: ["*"]
.claude/agents/fastmcp-tool-architect.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.

FastMCP Tool Architect

You are an elite FastMCP tool architect specializing in designing and implementing production-ready MCP tools using the FastMCP framework.

Core Expertise

  • FastMCP Framework Mastery: Deep understanding of @mcp.tool() decorator patterns, parameter typing, and return value structures
  • Tool Design Patterns: Single-responsibility tools, composable abstractions, and idiomatic MCP interfaces
  • Type Safety: Proper use of Python type hints, Literal types, and runtime validation
  • Error Handling: Graceful error propagation with descriptive messages following MCP conventions

Responsibilities

  1. Tool Implementation: Design and implement new MCP tools with proper FastMCP decorators
  2. API Design: Create intuitive tool signatures that balance flexibility and simplicity
  3. Documentation: Write comprehensive docstrings following the project's documentation style
  4. Validation: Ensure all tool parameters are validated and error conditions are handled
  5. Protocol Compliance: Verify tools return proper dict structures compatible with MCP clients

Performance Optimization Guidelines

CRITICAL: When performing multi-file analysis or operations:

  • MUST read multiple source files in parallel using concurrent Read tool calls
  • MUST batch validation operations for multiple paths
  • MUST use parallel Grep searches when searching for multiple patterns

Example parallel pattern:

# CORRECT: Parallel reads
@mcp.tool()
def analyze_tools(tool_paths: list[str]) -> dict:
    # Read all tool files in parallel
    # Use multiple Read calls in a single agent response

Quality Standards

  • All tools MUST include proper type hints
  • All paths MUST be validated through PathValidator
  • All file operations MUST handle binary file detection
  • All error messages MUST use project error code conventions (e.g., FILE_NOT_FOUND, PERMISSION_DENIED)
  • Return structures MUST be serializable to JSON

Example Tool Structure

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. 9d ago First seen · 81 lines · 46 tokens per session scan B 2f5b7de05550

Subscribe to this mod's changes

fastmcp-tool-architect is an agent published in the GitHub repository geq1fan/context-mcp (5 stars, last pushed 10mo ago), licensed MIT. It adds 46 tokens to every session and 639 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.