TweekFawkes/Test_MCP_Server
If you are the rightful owner of Test_MCP_Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A simple test MCP server implementation in Python, designed to work with Claude Desktop.
Test MCP Server
A simple test MCP (Model Context Protocol) server implementation in Python, designed to work with Claude Desktop.
Features
This MCP server provides:
Tools
- echo: Echo back input text
- calculate: Perform basic arithmetic calculations
- get_time: Get the current date and time
Resources
- test://example: A simple example resource
- test://server-info: Server information in JSON format
Prerequisites
- Python 3.11 or higher
- uv - Fast Python package manager
Setup
-
Install uv (if not already installed):
curl -LsSf https://astral.sh/uv/install.sh | sh -
Run the setup script:
chmod +x setup.sh ./setup.shOr manually:
uv venv uv sync
Running the Server
To run the MCP server:
./run.sh
Or manually:
uv run python server.py
The server uses stdio transport, so it communicates via standard input/output.
Claude Desktop Configuration
Automatic Configuration (Recommended)
The easiest way to configure Claude Desktop is to use the provided configuration script:
./configure_claude.sh
Or manually:
uv run python configure_claude.py
This script will automatically:
- Read your existing Claude Desktop configuration
- Add or update the MCP server configuration with the correct path
- Preserve any existing MCP servers you may have configured
- Create the config file if it doesn't exist
After running the script, restart Claude Desktop to connect to the server.
Manual Configuration
Alternatively, you can manually add the following configuration to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %AppData%\Claude\claude_desktop_config.json
{
"mcpServers": {
"test-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/Test_MCP_Server_001",
"run",
"python",
"server.py"
]
}
}
}
Important: Replace /absolute/path/to/Test_MCP_Server_001 with the actual absolute path to this project directory.
Testing Locally
You can test the server manually by running it and sending JSON-RPC messages via stdin. However, the easiest way to test is through Claude Desktop after configuration.
Example Tool Usage
Once connected via Claude Desktop, you can use the tools:
- Echo: "Use the echo tool with text 'Hello, MCP!'"
- Calculate: "Calculate 15 * 23 + 7"
- Get Time: "What time is it?" or "Get the current time in readable format"
Example Resource Access
- Access the example resource:
test://example - Get server info:
test://server-info
Project Structure
Test_MCP_Server_001/
├── server.py # Main MCP server implementation
├── configure_claude.py # Script to configure Claude Desktop
├── configure_claude.sh # Bash script to run configure_claude.py
├── run.sh # Bash script to run the server
├── pyproject.toml # Project configuration and dependencies
├── setup.sh # Setup script for environment
├── README.md # This file
└── .gitignore # Git ignore patterns
Development
To modify the server:
- Edit
server.pyto add new tools or resources - Update
pyproject.tomlif you need additional dependencies - Run
uv syncto update dependencies - Restart Claude Desktop to reload the server
License
This is a test server for demonstration purposes.