Stdio (standard input/output) transport allows you to run MCP servers locally on your machine. This is the recommended method for desktop applications like Claude Desktop.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/dvlpjrs/guMCP/llms.txt
Use this file to discover all available pages before exploring further.
Overview
When running in stdio mode:- Each server runs as a separate process
- Communication happens through stdin/stdout
- Suitable for single-user, local environments
- Works with Claude Desktop, Cline, and other local MCP clients
Prerequisites
Configure environment variables
Running a Server
Basic Usage
To start a stdio server, use the following command:Example: Simple Tools Server
Example: Google Sheets Server
With User ID
You can optionally specify a user ID for server context:Available Servers
The server automatically discovers available servers from thesrc/servers/ directory. Each server must have a main.py file with:
- A
serverobject (server factory) - A
get_initialization_optionsfunction
Testing with the Local MCP Client
For convenience, guMCP provides a lightweight test client to connect to stdio servers:- Starts the server automatically
- Connects via stdio
- Provides an interactive testing interface
- Useful for development and debugging
Configuration for Claude Desktop
To use a guMCP server with Claude Desktop, add the server configuration to your Claude Desktop config file.macOS/Linux
Edit~/Library/Application Support/Claude/claude_desktop_config.json:
Windows
Edit%APPDATA%\Claude\claude_desktop_config.json:
How It Works
The stdio server (src/servers/local.py):
- Loads the specified server module from
src/servers/<server-name>/main.py - Validates required attributes (
serverandget_initialization_options) - Creates a server instance with the optional user ID
- Starts the stdio transport using
mcp.server.stdio.stdio_server() - Runs the server with the read/write streams
Key Features
- Dynamic server loading: Servers are loaded dynamically by name
- User context: Optional
--user-idparameter for multi-user scenarios - Error handling: Provides helpful error messages and lists available servers
- Logging: Comprehensive logging for debugging
Troubleshooting
Server Not Found
If you get a “Server not found” error:- Check that the server directory exists in
src/servers/ - Verify the directory contains a
main.pyfile - Run with an invalid server name to see the list of available servers
Import Errors
If you encounter import errors:- Ensure your virtual environment is activated
- Verify all dependencies are installed:
pip install -r requirements.txt - Check that you’re running from the guMCP root directory
Authentication Errors
For servers requiring authentication:- Verify your
.envfile is configured correctly - Check that API keys and credentials are valid
- For OAuth servers, ensure credentials files are in the correct location
- See Environment Setup for configuration details
Next Steps
- Remote SSE Deployment - Run servers remotely
- Environment Setup - Configure environment variables
- Server Documentation - Learn about available servers