DeepMCP
A flexible and powerful Multi-Computer Programming (MCP) framework for building client-server applications with support for natural language interaction and LLM integration.
Features
- Asynchronous HTTP Server: Support for streaming HTTP communication using modern async patterns
- Mathematical Calculator Tools: Built-in arithmetic operations (addition, subtraction, multiplication, division)
- Dual-Mode Client: Can run as both client and server
- LLM Integration: Connect with OpenAI-compatible APIs for natural language processing
- Simple Fallback Implementation: Minimal version that works without external dependencies
Project Structure
deepmcp/
├── src/
│ ├── deepmcp/
│ │ ├── __init__.py
│ │ ├── client.py # MCP client implementation with LLM integration
│ │ ├── server.py # MCP server implementation with calculator tools
│ │ └── main.py # Main entry point
│ └── tests/
├── pyproject.toml # Project configuration and dependencies
└── minimal_mcp.py # Minimal implementation without external dependencies
Installation
Prerequisites
- Python 3.12 or higher
- uv package manager (recommended for faster installations)
Steps
-
Clone the repository:
git clone <repository-url> cd deepmcp
-
Install dependencies using uv:
uv pip install -e .
If you encounter issues with dependencies, try installing them directly:
uv pip install fastmcp>=2.12.3 mcp>=1.14.0 openai>=1.108.0
Usage
Starting the Server
You can start the server in several ways:
-
Using the command-line script:
deepmcp
-
Running the server module directly:
python -m deepmcp.server
-
Using the client in server mode:
python -m deepmcp.client --server
Starting the Client
To start the client and connect to the server:
python -m deepmcp.client
By default, the client connects to http://localhost:8000. You can specify a different server URL:
python -m deepmcp.client http://your-server-url:port
Using the Minimal Implementation
If you encounter dependency issues with the main implementation, you can use the minimal version that doesn't rely on external packages:
python minimal_mcp.py
This runs a simplified version of the MCP server and client with basic calculator functionality.
Troubleshooting
Common Issues
-
ModuleNotFoundError: No module named 'deepmcp'
- Ensure the package is installed in development mode:
uv pip install -e . - Check that your Python path includes the project directory
- Verify that the
pyproject.tomlhas the correct package discovery configuration
- Ensure the package is installed in development mode:
-
ModuleNotFoundError: No module named 'fastmcp' or other dependencies
- Try reinstalling the dependencies:
uv pip install fastmcp mcp openai - If issues persist, use the minimal implementation:
python minimal_mcp.py
- Try reinstalling the dependencies:
-
Connection Issues
- Ensure the server is running before starting the client
- Check that the client is connecting to the correct host and port
- Verify that no firewall is blocking the connection
LLM Integration
The client integrates with OpenAI-compatible APIs (via OpenRouter in the current implementation). To use this feature, you'll need to configure your API key:
- Open
client.py - Update the
OPENROUTER_API_KEYvariable with your own API key - You can also change the
modelparameter to use a different LLM model
License
This project is licensed under the MIT License.
Contributing
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
Acknowledgements
- Based on the Multi-Computer Programming (MCP) framework
- Uses FastMCP for asynchronous server implementation
- Integrates with OpenAI-compatible APIs for natural language processing
Metadata
Release files for deepmcp 0.2.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| deepmcp-0.2.8-py3-none-any.whl | Python 3 | none | any | Details |
Release files / deepmcp-0.2.8-py3-none-any.whl
| Download URL | deepmcp-0.2.8-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
605f28d89ca4278155e5165c1baae6ab11f78ac96f1c49fc2edd4c75f26e64c0
|
|
BLAKE2b-256 checksum How to use checksums |
392ca1666df72958128898b6e74ebb14c1f6f37f9a26ff6e0939af69e3f554c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|