MCP OpenClaw
An MCP server that integrates with the OpenClaw API to enable AI assistants to send messages across multiple platforms, execute system commands, and manage calendar events and emails.
README
MCP OpenClaw
A Model Context Protocol (MCP) server that integrates with the OpenClaw API, enabling AI assistants to send messages, execute commands, manage calendar events, send emails, and track task status.
Features
- Send Messages: Send messages to Telegram, WhatsApp, and Discord
- Execute Commands: Run commands in the OpenClaw environment (sync or async)
- Calendar Management: Create calendar events with attendees and reminders
- Email: Send emails with support for CC/BCC
- Task Status: Track the status of asynchronous commands
Installation
Global Installation
npm install -g mcp-openclaw
Local Installation
npm install mcp-openclaw
Configuration
Set the following environment variables:
export OPENCLAW_API_URL="https://api.openclaw.example.com"
export OPENCLAW_API_KEY="your-api-key-here"
Optional configuration:
export OPENCLAW_TIMEOUT="30000" # Request timeout in milliseconds (default: 30000)
export OPENCLAW_MAX_RETRIES="3" # Maximum retry attempts (default: 3)
export SERVER_NAME="mcp-openclaw" # Server name (default: mcp-openclaw)
export SERVER_VERSION="1.0.0" # Server version (default: 1.0.0)
export LOG_LEVEL="info" # Log level: debug, info, warn, error (default: info)
Usage
With Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"openclaw": {
"command": "node",
"args": ["/path/to/mcp-openclaw/dist/index.js"],
"env": {
"OPENCLAW_API_URL": "https://api.openclaw.example.com",
"OPENCLAW_API_KEY": "your-api-key-here"
}
}
}
}
Available Tools
1. send_message
Send a message to a supported platform.
{
"platform": "telegram",
"recipient": "@username",
"message": "Hello from OpenClaw!"
}
Supported platforms: telegram, whatsapp, discord
2. execute_command
Execute a command in the OpenClaw environment.
{
"command": "ls -la",
"timeout": 30,
"async": false
}
3. create_calendar_event
Create a new calendar event.
{
"title": "Team Meeting",
"description": "Weekly team sync",
"startTime": "2024-01-15T10:00:00Z",
"endTime": "2024-01-15T11:00:00Z",
"location": "Conference Room A",
"attendees": ["user1@example.com", "user2@example.com"],
"reminder": 15
}
4. send_email
Send an email.
{
"to": "recipient@example.com",
"subject": "Hello from OpenClaw",
"body": "This is the email content",
"cc": "cc@example.com",
"bcc": "bcc@example.com",
"html": false
}
5. get_task_status
Check the status of an asynchronous command.
{
"taskId": "task-abc123"
}
Development
Setup
git clone https://github.com/yourusername/mcp-openclaw.git
cd mcp-openclaw
npm install
Build
npm run build
Test
npm test
Lint
npm run lint
npm run lint:fix
Format
npm run format
Project Structure
mcp-openclaw/
├── src/
│ ├── index.ts # MCP Server entry point
│ ├── types.ts # TypeScript type definitions
│ ├── openclaw-client.ts # OpenClaw API client
│ └── tools/
│ ├── index.ts # Tools registry
│ ├── send-message.ts
│ ├── execute-command.ts
│ ├── create-calendar-event.ts
│ ├── send-email.ts
│ └── get-task-status.ts
├── tests/ # Test files
├── examples/ # Usage examples
├── docs/ # Documentation
└── scripts/ # Build and utility scripts
Architecture
For detailed architecture information, see docs/ARCHITECTURE.md.
API Reference
For the complete API reference, see docs/API.md.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
License
MIT License - see LICENSE for details.
Changelog
See CHANGELOG.md for version history.
Support
- Issues: GitHub Issues
- Documentation: docs/
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.