Documentation Index
Fetch the complete documentation index at: https://docs.mcp-use.com/llms.txt
Use this file to discover all available pages before exploring further.
Log formatters for MCP servers.
from mcp_use.server.logging.formatters import ColoredFormatter
method init
Parameters
Signaturedef __init__(fmt = None, datefmt = None):
from mcp_use.server.logging.formatters import MCPAccessFormatter
method init
Parameters
Signature
from mcp_use.server.logging.formatters import 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
Signaturedef __init__(fmt = None, datefmt = None, style = "%", validate = True, defaults = None):
UvicornAccessArgs
from mcp_use.server.logging.formatters import UvicornAccessArgs
method init
Parameters
Signaturedef __init__(client_addr: str, method: str, path: str, extra: tuple):
method is_mcp_request
Check if this is a POST request to the MCP endpoint.Parameters
Returns
Signaturedef is_mcp_request(mcp_path: str = "/mcp"):
method to_tuple
Convert back to tuple format for Uvicorn’s formatter.Parameters
Returns
Signaturedef to_tuple(path_override: str | None = None, method_override: str | None = None):