Skip to main content
Log formatters for MCP servers.

ColoredFormatter

method init

Parameters
default:"None"
Parameter value
default:"None"
Parameter value
Signature

MCPAccessFormatter

method init

Parameters
required
Parameter value
Signature

MCPErrorFormatter

method init

Initialize the formatter with specified format strings.Initialize the formatter either with the specified format string, or a default as described above. Allow for specialized date formatting with the optional datefmt argument. If datefmt is omitted, you get an ISO8601-like (or RFC 3339-like) format.Use a style parameter of ’%’, ’{’ or ’$’ to specify that you want to use one of %-formatting, :meth:str.format (\{\}) formatting or :class:string.Template formatting in your format string... versionchanged:: 3.2 Added the style parameter.Parameters
default:"None"
Parameter value
default:"None"
Parameter value
default:"%"
Parameter value
default:"True"
Parameter value
default:"None"
Parameter value
Signature

UvicornAccessArgs

Attributes
str
required
MCP client instance
str
required
String value
str
required
File path

method init

Parameters
str
required
MCP client instance
str
required
String value
str
required
File path
tuple
required
Parameter value
Signature

method is_mcp_request

Check if this is a POST request to the MCP endpoint.Parameters
str
default:"/mcp"
File path
Returns
bool
Signature

method to_tuple

Convert back to tuple format for Uvicorn’s formatter.Parameters
str | None
default:"None"
File path
str | None
default:"None"
String value
Returns
tuple
Signature