- Home
- MCP servers
- Local
Local
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"yulongwanxue-local-mcp-server": {
"command": "python",
"args": [
"src/server.py"
],
"env": {
"MCP_DEBUG": "true",
"MCP_LOG_LEVEL": "DEBUG",
"MCP_CONFIG_PATH": "/path/to/config.yaml",
"MCP_WORKSPACE_ROOT": "./workspace"
}
}
}
}You run a modular Local MCP Server to expose computation and file operations to MCP clients like LangGraph. It provides 18 tools (10 calculators and 8 file operations), runs asynchronously for performance, and keeps file interactions sandboxed inside your workspace. This guide walks you through practical usage, installation, configuration, and safety considerations so you can start using the server confidently.
How to use
Launch the local MCP server in stdio mode and connect to it from your MCP client or test client. The server accepts messages over standard input and writes responses to standard error for protocol communication. You will load configuration, initialize logging, register all tools, and then begin listening for MCP messages on stdin.
How to install
# Create and activate a virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install mcp aiofiles pyyaml
# Optional: install this project in editable mode if you have the source checked out
pip install -e .
Additional sections
Configuration details, security considerations, examples, and troubleshooting follow. You will manage workspace paths, file size limits, and logging behavior through a YAML configuration or environment variables.
Configuration involves defining workspace roots, sandbox settings, and logging. The server reads defaults from a YAML file and can be overridden via environment variables.
Available tools
calculator_add
Adds two numbers and returns the sum.
calculator_subtract
Subtracts the second number from the first and returns the difference.
calculator_multiply
Multiplies two numbers and returns the product.
calculator_divide
Divides the first number by the second, with zero-division handling.
calculator_power
Computes base raised to the exponent.
calculator_sqrt
Calculates the square root of a non-negative number.
calculator_log
Calculates the logarithm with an optional base.
calculator_sin
Calculates the sine of a value given in degrees or radians.
calculator_cos
Calculates the cosine of a value given in degrees or radians.
calculator_tan
Calculates the tangent of a value given in degrees or radians.
file_read
Reads the entire contents of a file within the workspace sandbox.
file_read_lines
Reads specific lines from a file within the sandbox.
file_exists
Checks whether a file exists within the sandbox.
file_list
Lists files matching a glob pattern inside the sandbox.
file_write
Writes or overwrites content in a file within the sandbox.
file_append
Appends content to an existing file inside the sandbox.
file_create
Creates a new file inside the sandbox; fails if it already exists.
file_delete
Deletes a file within the sandbox.