-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
When starting the STDIO server with FastMCP, MCP Inspector displays an error in the terminal even though the connection is established successfully and tools work as expected.
This appears to be misleading, since the error output suggests a failure, but the server is functioning correctly.
Observed Behavior
- STDIO server starts normally
- MCP Inspector shows an error message in the terminal (screenshot below)
- Despite the error, FastMCP connects and tools are callable
Example Code
from fastmcp import FastMCP
mcp = FastMCP(name="StdioExampleServer")
@mcp.tool
def echo(message: str) -> str:
"""Echoes the provided message back to the client."""
return f"You said: {message}"
@mcp.tool
def api_fetch(url: str) -> str:
"""Fetches data from the provided URL."""
import requests
response = requests.get(url)
return response.text if response.status_code == 200 else f"Error fetching {url}: {response.status_code}"
if __name__ == "__main__":
mcp.run()Version Information
MCP Inspector version: 0.16.5
FastMCP version: 2.11.3
MCP version: 1.13.0
Python version: 3.12.11
Platform: macOS-15.6-x86_64-i386-64bit
FastMCP root path: /Users/harshpreet.singh/Desktop/Projects/MCP_Examples/venv/lib/python3.12/site-packages
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working