README.md•2.69 kB
# Celery MCP
[](https://pypi.org/project/celery-mcp/)
[](https://pypi.org/project/celery-mcp/)
[](https://opensource.org/licenses/MIT)
[](https://github.com/yourusername/celery-mcp/actions/workflows/ci.yml)
A Python library that provides a connector to use Celery distributed task queues over the Model Context Protocol (MCP).
## Features
- Seamless integration of Celery with MCP
- Easy-to-use API for task management
- Support for asynchronous task execution
- MCP server with tools for LLM interaction
- Comprehensive documentation and examples
## Installation
Install from PyPI:
```bash
pip install celery-mcp
```
Or install from source:
```bash
git clone https://github.com/yourusername/celery-mcp.git
cd celery-mcp
pip install -e .
```
## Quick Start
### Using the Python API
```python
from celery_mcp import CeleryMCP
# Initialize the connector
mcp = CeleryMCP(broker_url='redis://localhost:6379/0')
# Send a task
result = mcp.send_task('my_app.add', args=[4, 4])
print(result.get()) # 8
```
### Using the MCP Server
The package includes an MCP server that exposes Celery functionality as tools that can be used by LLMs:
```bash
# Start the MCP server
celery-mcp-server
```
#### Available MCP Tools
1. **initialize_celery_connection** - Initialize connection to Celery broker
2. **list_registered_tasks** - List all registered task names
3. **send_task** - Send a task to the Celery queue
4. **get_task_status** - Get the status of a Celery task
5. **get_active_tasks** - Get information about active (running) tasks
6. **get_scheduled_tasks** - Get information about scheduled tasks
7. **revoke_task** - Revoke (cancel) a task
8. **get_worker_stats** - Get statistics about Celery workers
## MCP Client Configuration
To use the MCP server with Claude Desktop, add this to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"celery-mcp": {
"command": "celery-mcp-server"
}
}
}
```
## Documentation
Full documentation is available at [https://celery-mcp.readthedocs.io/](https://celery-mcp.readthedocs.io/).
## Contributing
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Support
If you have any questions or issues, please open an issue on [GitHub](https://github.com/yourusername/celery-mcp/issues).