Skip to content

Add fastmcp skill for Python MCP server development#146

Open
sharanharsoor wants to merge 1 commit into
midudev:mainfrom
sharanharsoor:add-fastmcp-skill
Open

Add fastmcp skill for Python MCP server development#146
sharanharsoor wants to merge 1 commit into
midudev:mainfrom
sharanharsoor:add-fastmcp-skill

Conversation

@sharanharsoor
Copy link
Copy Markdown

FastMCP is the standard Python framework for building MCP servers. This skill teaches production patterns verified against FastMCP 3.2.x, specifically addressing APIs that LLMs hallucinate (server.state, on_startup, context.name in middleware — none of which exist).

Detection: 'fastmcp' pattern in pyproject.toml/requirements.txt
Validation: 97.1% (agentskills.io spec checker)

What Changed

  • Added fastmcp entry to skills-map.ts with detection via pyproject.toml / requirements.txt patterns
  • Added packages/autoskills/skills-registry/fastmcp/SKILL.md with production patterns

Why This Change

FastMCP is Python's standard framework for building MCP servers (~10k weekly downloads). Currently no FastMCP skill exists in autoskills. LLMs hallucinate FastMCP APIs regularly — this skill fixes the three most common ones:

  • server.state.pool = ... → AttributeError (server.state does not exist)
  • @mcp.on_startup → AttributeError (does not exist in v2+)
  • context.name in middleware → AttributeError (correct: context.message.name)

Skill covers: lifespan/startup patterns, middleware, multi-operation tools, output formatting, partial failure handling, testing with fastmcp.Client, and common mistakes.

Testing Done

  • Manual testing completed — npx skills add sharanharsoor/skills installs correctly across 14 agent tools
  • Automated tests pass locally — 42 code pattern tests against real FastMCP 3.2.2, 8/8 routing evals pass
  • Edge cases considered — negative routing (general MCP questions do NOT activate this skill)

Type of Change

  • feat: New feature

Security & Quality Checklist

  • No secrets or API keys committed
  • Follows the project's coding standards
  • No sensitive data exposed in logs or output

Documentation

FastMCP is the standard Python framework for building MCP servers.
This skill teaches production patterns verified against FastMCP 3.2.x,
specifically addressing APIs that LLMs hallucinate (server.state,
on_startup, context.name in middleware — none of which exist).
Detection: 'fastmcp' pattern in pyproject.toml/requirements.txt
Validation: 97.1% (agentskills.io spec checker)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant