Step 1. Start a server up in the terminal
uvx mcp-server-fetch
Step 2. Initialize it by copy and pasting this JSON-RPC invocation (and hit return)
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{"sampling":{},"roots":{"listChanged":true}},"clientInfo":{"name":"mcp-inspector","version":"0.12.0"}}}
Step 3. Notify the server that it's now initialized
{"jsonrpc":"2.0","method":"notifications/initialized"}
Step 4. Ask the server for its tools (if you want to, this is optional)
{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{"_meta":{"progressToken":1}}}
Step 5. Invoke a tool (in this case fetch
)
{"jsonrpc": "2.0", "method": "tools/call", "params": { "name": "fetch", "arguments": { "url": "https://jsonplaceholder.typicode.com/todos/1", "raw": true }, "_meta": { "progressToken": 1 } }, "id": 1}
Note: Do not format these lines of JSON-RPC to cover multiple lines. A new line signifies the end of a message. So the entire JSON payload needs to be on a single line. Use "\n"
to indicate new lines if required.