ccMonet MCP server for forwarding messages from clients like Claude to ccMonet API
Project description
ccMonet MCP Server
This is a server using the Model Context Protocol (MCP) to forward messages from clients like the Claude desktop application to the ccMonet API.
Features
- Provides an MCP tool
send_messagefor sending messages to the ccMonet API and receiving replies - Supports session management (via thread_id and response_message_id)
- Can be integrated with MCP clients such as the Claude desktop application
Requirements
- Python 3.11 or higher
- Poetry package manager
Installation
# Clone repository
git clone https://your-repository-url/mcp_ccmonet.git
cd mcp_ccmonet
# Install dependencies
poetry install
Usage
Run Server Directly
poetry run python main.py
Run with VS Code
The project includes VS Code launch configurations for direct execution:
- Open the project in VS Code
- Select "Run MCP Server" or "Run API Test" in the "Run and Debug" panel
- Click the "Start Debugging" button (F5) to launch
You can also use VS Code tasks:
- Press
Ctrl+Shift+P(orCmd+Shift+Pon macOS) - Type "Tasks: Run Task" and select it
- Choose "Run MCP Server" or "Run API Test"
Integration with Claude Desktop Application
- Make sure you have the latest version of the Claude desktop application installed
- Edit the Claude desktop application configuration file:
macOS:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows:
code $env:AppData\Claude\claude_desktop_config.json
- Add the server configuration:
{
"mcpServers": {
"ccMonet": {
"command": "poetry",
"args": [
"run",
"python",
"/absolute/path/to/mcp_ccmonet/main.py"
]
}
}
}
- Restart the Claude desktop application
- Access the ccMonet tool using the MCP tools icon (hammer icon)
Configuration
The configuration file is located at mcp_ccmonet/ccmonet_server/config.py, where you can modify the following settings:
API_URL: The URL of the ccMonet APIAPI_HEADERS: API request headers, including authentication informationSERVER_NAME: MCP server nameREQUEST_TIMEOUT: API request timeout (seconds)
Environment Variable Configuration
The server supports configuration of authentication information via environment variables, without modifying the code:
CCMONET_ORG_ID: Organization ID for API authenticationCCMONET_AUTH_TOKEN: Authentication token, without the "Bearer" prefix
Examples:
# Linux/macOS
export CCMONET_ORG_ID="your-org-id"
export CCMONET_AUTH_TOKEN="your-auth-token"
poetry run python main.py
# Windows PowerShell
$env:CCMONET_ORG_ID="your-org-id"
$env:CCMONET_AUTH_TOKEN="your-auth-token"
poetry run python main.py
When integrating with the Claude desktop application, you can include environment variables in the configuration:
{
"mcpServers": {
"ccMonet": {
"command": "poetry",
"args": [
"run",
"python",
"/absolute/path/to/mcp_ccmonet/main.py"
],
"env": {
"CCMONET_ORG_ID": "your-org-id",
"CCMONET_AUTH_TOKEN": "your-auth-token"
}
}
}
}
Development
Project Structure
mcp_ccmonet/
├── .vscode/ # VS Code configuration
│ ├── launch.json # Launch configuration
│ ├── settings.json # Editor settings
│ └── tasks.json # Tasks configuration
├── mcp_ccmonet/ # Main package directory
│ ├── __init__.py # Package initialization
│ ├── main.py # Main entry point
│ └── ccmonet_server/ # Server subpackage
│ ├── __init__.py # Subpackage initialization
│ ├── config.py # Configuration file
│ └── server.py # MCP server implementation
├── docs/
│ └── FAQ.md # Frequently asked questions
├── tests/ # Test directory
│ └── test_import.py # Import tests
├── poetry.lock # Poetry lock file
├── pyproject.toml # Poetry project configuration
├── README.md # This file
└── test_api.py # API test script
Adding New Features
To add new API functionality, create a new tool function in mcp_ccmonet/ccmonet_server/server.py and register it using the @mcp.tool() decorator.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_ccmonet-0.1.0.tar.gz.
File metadata
- Download URL: mcp_ccmonet-0.1.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d8294281c6873d7916bbcbffc158a913b6f8c494e39bded8d506536f10940e8
|
|
| MD5 |
3415cd6baeb5de3e565bb4aca3e38254
|
|
| BLAKE2b-256 |
8b32bc089726f67f09fd7024d72d573b9718474d422a177fb2194a19ad1c7a99
|
File details
Details for the file mcp_ccmonet-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_ccmonet-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab6a24e441ce702dd7aa2f06bc3a317925687ba1fa281a1e5c17afdb32cbace1
|
|
| MD5 |
4c7b69ffcf34614a54b00d770cf4e27e
|
|
| BLAKE2b-256 |
e4c16e689252d0b9dbc0e46c0fee2eefe5f02f433ae8f67e8d43d9e5ae3d5e09
|