EasyMCP is a flexible and beginner-friendly client for the Model Context Protocol (MCP). It allows you to connect to different types of MCP servers—SSE, NPX, and UV—so you can interact with various tools (e.g., file operations) and integrate with the OpenAI API for an enhanced chat experience.
- Multiple Server Support
- SSE Servers: Connect via Server-Sent Events using a server URL.
- NPX Servers: Launch servers using NPX commands (compatible with Windows and non-Windows systems).
- UV Servers: Run servers configured with UV commands.
- Dynamic Tool Integration:
The client automatically retrieves available tools from the connected server and uses them to process user queries. - Interactive Chat Loop:
Type queries and let the client process responses using OpenAI and the available MCP tools. - Configuration Management:
Easily add new server configurations withadd_server.py, which updates the appropriate configuration file (e.g.,sse_servers.json,npx_servers.json, oruv_servers.json).
- Python 3.10+ (for compatibility with
asyncioand modern async features) - A valid OpenAI API key (set in your
.envfile) - Other API keys as needed for additional integrations
-
Clone the repository:
git clone https://github.com/yourusername/EasyMCP.git cd EasyMCP -
Create a virtual environment and activate it:
On Windows:
python -m venv .venv .venv\Scripts\activate
On macOS/Linux:
python3 -m venv .venv source .venv/bin/activate -
Install the required packages:
pip install -r requirements.txt
-
Set up your environment variables:
Rename the provided.env.sampleto.env(or create your own.env) and fill in the necessary API keys and configurations.
EasyMCP uses several JSON configuration files to manage servers: