Configurations
Customization
Server metadata
You can define the MCP server name and description by modifying:
Tool and schema descriptions
When creating the MCP server you can include all possible response schemas in tool descriptions by changing the flag describe_all_responses
, or include full JSON schema in tool descriptions by changing describe_full_response_schema
:
Customizing Exposed Endpoints
You can control which FastAPI endpoints are exposed as MCP tools using Open API operation IDs or tags to:
- Only include specific operations
- Exclude specific operations
- Only include operations with specific tags
- Exclude operations with specific tags
- Combine operation IDs and tags
Code samples
The relevant arguments for these configurations are include_operations
, exclude_operations
, include_tags
, exclude_tags
and can be used as follows:
Notes on filtering
- You cannot use both
include_operations
andexclude_operations
at the same time - You cannot use both
include_tags
andexclude_tags
at the same time - You can combine operation filtering with tag filtering (e.g., use
include_operations
withinclude_tags
) - When combining filters, a greedy approach will be taken. Endpoints matching either criteria will be included