This Python-based MCP server provides a powerful natural language interface for software development tasks with support for multiple LLM providers including OpenAI and Anthropic. It offers real-time visualization, cost management, and Model Context Protocol integration for an enhanced coding experience.
First, clone the repository and install the required dependencies:
pip install -r requirements.txt
Create a .env
file with your API keys:
# Choose one or more providers
OPENAI_API_KEY=your_openai_api_key_here
ANTHROPIC_API_KEY=your_anthropic_api_key_here
# Optional model selection
OPENAI_MODEL=gpt-4o
ANTHROPIC_MODEL=claude-3-opus-20240229
Run the CLI with the default provider:
python claude.py chat
Specify a provider and model:
python claude.py chat --provider openai --model gpt-4o
Set a budget limit to manage costs:
python claude.py chat --budget 5.00
Start the Model Context Protocol server:
python claude.py serve
For development mode with the MCP Inspector:
python claude.py serve --dev
Configure the host and port:
python claude.py serve --host 0.0.0.0 --port 8000
Specify additional dependencies:
python claude.py serve --dependencies pandas numpy
Load environment variables from a file:
python claude.py serve --env-file .env
Connect to an MCP server using the built-in client:
python claude.py mcp-client path/to/server.py
Specify a specific model:
python claude.py mcp-client path/to/server.py --model claude-3-5-sonnet-20241022
Try the included example server:
# In terminal 1 - start the server
python examples/echo_server.py
# In terminal 2 - connect with the client
python claude.py mcp-client examples/echo_server.py
Launch a multi-agent client with synchronized agents:
python claude.py mcp-multi-agent path/to/server.py
Use a custom agent configuration:
python claude.py mcp-multi-agent path/to/server.py --config examples/agents_config.json
The system includes several powerful tools:
While in the chat interface, you can use these commands:
To use with Claude Desktop:
Start the MCP server:
python claude.py serve
Open the configuration page:
http://localhost:8000
Follow the instructions to configure Claude Desktop with the provided JSON configuration.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "openai-mcp" '{"command":"python","args":["claude.py","serve"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"openai-mcp": {
"command": "python",
"args": [
"claude.py",
"serve"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"openai-mcp": {
"command": "python",
"args": [
"claude.py",
"serve"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect