Problem
When running uvx forgetful-ai in stdio mode (the default), the FastMCP framework prints an ASCII art banner and deprecation warnings to stdout before the MCP protocol begins. This corrupts the JSON-RPC protocol, causing MCP clients like Claude Code to fail with:
Reproduction
- Configure Claude Code's
.mcp.json:
{
"mcpServers": {
"forgetful": {
"type": "stdio",
"command": "uvx",
"args": ["forgetful-ai"]
}
}
}
- Start Claude Code - the forgetful MCP server shows as failed
Output Analysis
Running uvx forgetful-ai shows this output on stdout:
╭──────────────────────────────────────────────────────────────────────────────╮
│ ▄▀▀ ▄▀█ █▀▀ ▀█▀ █▀▄▀█ █▀▀ █▀█ │
│ █▀ █▀█ ▄▄█ █ █ ▀ █ █▄▄ █▀▀ │
│ FastMCP 2.14.2 │
...
Plus deprecation warnings from httplib2/auth.py and google.generativeai.
The MCP stdio protocol expects the first bytes to be JSON-RPC, but receives ASCII art instead.
Workaround
Use HTTP transport instead:
{
"mcpServers": {
"forgetful": {
"type": "http",
"url": "http://localhost:8020/mcp"
}
}
}
Then start the server manually:
uvx forgetful-ai --transport http --port 8020
Suggested Fix
- Suppress banner in stdio mode: FastMCP should detect stdio transport and skip the banner, or redirect it to stderr
- Suppress Python warnings: Use
PYTHONWARNINGS=ignore or warnings.filterwarnings()
- Document the workaround: Update README to note HTTP transport requirement for Claude Code
Environment
- forgetful-ai via uvx
- FastMCP 2.14.2
- Python 3.13
- Claude Code CLI
- Linux (Ubuntu)
Problem
When running
uvx forgetful-aiin stdio mode (the default), the FastMCP framework prints an ASCII art banner and deprecation warnings to stdout before the MCP protocol begins. This corrupts the JSON-RPC protocol, causing MCP clients like Claude Code to fail with:Reproduction
.mcp.json:{ "mcpServers": { "forgetful": { "type": "stdio", "command": "uvx", "args": ["forgetful-ai"] } } }Output Analysis
Running
uvx forgetful-aishows this output on stdout:Plus deprecation warnings from
httplib2/auth.pyandgoogle.generativeai.The MCP stdio protocol expects the first bytes to be JSON-RPC, but receives ASCII art instead.
Workaround
Use HTTP transport instead:
{ "mcpServers": { "forgetful": { "type": "http", "url": "http://localhost:8020/mcp" } } }Then start the server manually:
Suggested Fix
PYTHONWARNINGS=ignoreorwarnings.filterwarnings()Environment