Fastmcp

From metaspartan/cybara · View interactive version

Fastmcp is an AI agent skill from the GitHub repository metaspartan/cybara. Build, test, inspect, and deploy Python MCP servers with FastMCP.

How to use this skill

Skill file

FastMCP

Use this when the user wants to create or test a Python MCP server, wrap an API/database/CLI as MCP tools, expose resources/prompts, or prepare an HTTP MCP endpoint.

Server Shape

Start narrow:

Good tool names: get_customer, search_tickets, describe_table, summarize_file.

Weak names: run, process, do_thing.

Minimal Template

from fastmcp import FastMCP

mcp = FastMCP("Example")

@mcp.tool
def echo(text: str) -> dict:
    """Echo text back for smoke testing."""
    return {"text": text}

Local Validation

Prefer isolated runs:

uvx fastmcp version
uvx fastmcp inspect server.py:mcp
uvx fastmcp list server.py --json
uvx fastmcp call server.py echo text=hello --json

If uv is unavailable, use a project virtualenv and install fastmcp there. Do not install global Python packages unless the user asks.

HTTP Transport Smoke

uvx fastmcp run server.py:mcp --transport http --host 127.0.0.1 --port 8000
uvx fastmcp list http://127.0.0.1:8000/mcp --json
uvx fastmcp call http://127.0.0.1:8000/mcp echo text=hello --json

Cybara Integration

Once the server contract is stable:

  1. Add it through Cybara MCP configuration or the MCP UI.
  2. Confirm tools/list returns the expected tool names.
  3. Call at least one real tool through Cybara before declaring integration complete.

Safety

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.