OpenClaw plugin for MCP (Model Context Protocol) server integration
npm install claw-xiaowanOpenClaw plugin for integrating MCP (Model Context Protocol) servers as agent tools.
- Connect to multiple MCP servers
- Register MCP tools as native OpenClaw agent tools
- Configuration-based server management
- Connection status monitoring
- CLI commands for server management
``bashLink this plugin to your OpenClaw extensions
openclaw plugins install -l /Users/ocean/code/OmniClawPlugin
$3
`bash
openclaw plugins install @omniclaw/mcp-server
openclaw gateway restart
`Configuration
Add to your OpenClaw config:
`json5
{
plugins: {
entries: {
"mcp-server": {
enabled: true,
config: {
servers: [
{
id: "filesystem",
name: "Filesystem Tools",
url: "npx -y @modelcontextprotocol/server-filesystem /tmp",
enabled: true
},
{
id: "my-custom-server",
name: "My Custom Server",
url: "http://localhost:3000/sse",
token: "your-auth-token",
enabled: true
}
]
}
}
}
}
}
`Server URL Schemes
The plugin supports different connection methods based on the URL:
- Local executable:
npx -y @modelcontextprotocol/server-filesystem /tmp
- HTTP/SSE: http://localhost:3000/sse or https://api.example.com/mcp
- WebSocket: ws://localhost:3000/ws or wss://api.example.com/wsUsage
$3
`bash
List configured MCP servers
openclaw mcp --listCheck server status
openclaw mcp --status
`$3
Once configured, MCP tools are available to OpenClaw agents as:
`
mcp__
`For example, if you have a
filesystem server with a read_file tool, agents can call:`
mcp_filesystem_read_file
`$3
`bash
Get MCP server status via RPC
openclaw gateway rpc mcp.status
`Development
`bash
Install dependencies
npm installBuild the plugin
npm run buildWatch for changes
npm run dev
`Supported MCP Servers
This plugin should work with any MCP-compliant server. Known examples:
-
@modelcontextprotocol/server-filesystem - Filesystem operations
- @modelcontextprotocol/server-git` - Git operationsMIT