fastapi-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_openapi_schemaA | Extract the complete OpenAPI schema from a local FastAPI app, APIRouter, factory function, or live HTTP URL. Args: app_path: Import string pointing to the target (e.g. 'main:app', 'routers.users:router', 'https://api.example.com/openapi.json'). project_dir: Optional path to the project root directory. Defaults to current working directory. Returns: The OpenAPI specification dictionary or an error dictionary. |
| get_pydantic_schemaA | Extract the JSON Schema from a local Pydantic BaseModel class definition. Args: model_path: Import string pointing to the Pydantic model (e.g. 'models.user:UserCreate', 'src/schemas.py:Item'). project_dir: Optional path to the project root directory. Defaults to current working directory. Returns: The JSON schema dictionary for the Pydantic model or an error dictionary. |
| list_registered_routesA | List all registered HTTP routes, methods, operation IDs, summaries, and tags from a FastAPI app, APIRouter, or live URL. Args: app_path: Import string pointing to the target (e.g. 'main:app', 'routers.items:router', 'http://localhost:8000/docs'). project_dir: Optional path to the project root directory. Defaults to current working directory. Returns: A list of registered routes or an error dictionary. |
| get_typescript_definitionA | Generate strict TypeScript interfaces and types from a Pydantic model, FastAPI app, or live OpenAPI URL. Args: target: Target identifier (e.g. 'models.user:UserProfile', 'main:app', 'https://api.example.com/openapi.json'). project_dir: Optional path to the project root directory. Returns: TypeScript interface/type definitions code as a string, or an error dictionary. |
| get_zod_schemaA | Generate Zod validation schemas with inferred TypeScript types from a Pydantic model, FastAPI app, or live OpenAPI URL. Args: target: Target identifier (e.g. 'models.user:UserProfile', 'main:app', 'https://api.example.com/openapi.json'). project_dir: Optional path to the project root directory. Returns: Zod schema definition code as a string, or an error dictionary. |
| discover_fastapi_projectA | Automatically scan a project directory to discover all FastAPI apps, APIRouters, and Pydantic models. Args: project_dir: Optional path to the project root directory. Defaults to current working directory. Returns: A structured catalog listing all discovered apps, routers, and models with import target strings. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 6 tools
Each tool has a distinct output type: OpenAPI schema, Pydantic JSON schema, route listing, TypeScript interfaces, Zod schemas, and project discovery. The two code generation tools accept similar targets, but their output formats are clearly described, so misselection is unlikely.
Most tools follow a get_<object> pattern such as get_openapi_schema, get_pydantic_schema, and get_zod_schema. list_registered_utes and discover_fastapi_project use different verbs but are still predictable and consistent in naming style.
Six tools is a well-scoped count for a FastAPI introspection and schema generation server. Each tool serves a clear purpose without unnecessary redundancy.
The tool set covers OpenAPI extraction, Pydantic schema extraction, route listing, project discovery, and both TypeScript interface and Zod schema generation. This provides comprehensive coverage for the server's stated purpose.