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
The local server module allows you to run MCP servers using standard input/output streams (stdio). This is the standard transport method for MCP servers running locally. Source:src/servers/local.py
Main Function
Source:src/servers/local.py:62
- Parsing command-line arguments
- Loading the specified server module
- Creating a server instance with the provided user_id
- Starting the stdio server
Command-Line Arguments
Name of the server to run (e.g., “simple-tools-server”, “slack”). Must correspond to a directory in the servers folder with a
main.py file.User ID for server context (optional). Used for credential lookup and user-specific operations.
Core Functions
run_stdio_server
Runs the MCP server using stdin/stdout streams. Source:src/servers/local.py:18
The MCP server instance to run
Function that returns initialization options for the server
load_server
Dynamically loads a server module by name. Source:src/servers/local.py:29
Name of the server directory to load
Returns a tuple of (server_creator, get_initialization_options)
- Looks for server at
src/servers/{server_name}/main.py - Verifies the module has required
serverandget_initialization_optionsattributes - Lists available servers if the specified server is not found
- Exits with error code 1 if server cannot be loaded
Usage
Basic Usage
Running with Default User
Entry Point
Server Requirements
For a server to be loadable by the local server, it must:- Be located in
src/servers/{server_name}/main.py - Export a
serverfunction or class that creates server instances - Export a
get_initialization_optionsfunction
Error Handling
Server Not Found
Missing Required Attributes
Logging
The local server uses Python’s logging module:- Server loading:
Loading server: {server_name} - Server starting:
Starting local stdio server for server: {server_name} with user: {user_id} - Stdio server:
Starting stdio server
Integration with MCP Clients
The stdio server can be configured in MCP client applications (like Claude Desktop):See Also
- Remote Server (SSE) - HTTP/SSE transport for remote servers
- Main Server Entry Point - Server launcher