Pieces MCP + OpenClaw | Setup Guide
Learn how to integrate Pieces MCP with OpenClaw. OpenClaw executes MCP tools via MCPorter. Automate standups, meeting prep, and more.
Get Started
Integrating the Pieces MCP with OpenClaw brings your workflow context directly into this open-source continuous AI agent runtime. OpenClaw (formerly ClawdBot, formerly Moltbot) runs as a persistent Node.js service—unlike chatbots that respond to one-off prompts, it runs 24/7, executing tasks proactively via cron jobs and event listeners.
With Pieces MCP connected, OpenClaw gains access to your Long-Term Memory. It can autonomously query your past work, generate standups, monitor recent activity, and surface relevant context without you asking.
Prerequisites
Installing PiecesOS & Configuring Permissions
Follow the instructions below for a detailed guide on setting up and configuring PiecesOS to correctly pass captured workflow context to the Pieces MCP server.
Setting Up OpenClaw
OpenClaw executes MCP tools via MCPorter, its built-in MCP management layer. Edit ~/.openclaw/workspace/config/mcporter.json.
The official Pieces MCP skill for OpenClaw documents MCP-only integration: point mcp-remote at the /mcp endpoint (/model_context_protocol/2025-03-26/mcp), not the legacy /sse path. That matches how OpenClaw and MCPorter expect to bridge Pieces.
Install mcp-remote globally with a pinned version for security:
npm install -g mcp-remote@0.1.38
See MCP Bridge for why we recommend a locally installed binary over npx.
Local setup (MCP with mcp-remote — recommended)
When OpenClaw and PiecesOS run on the same machine, use the localhost MCP URL with the mcp-remote bridge:
{
"mcpServers": {
"pieces": {
"command": "mcp-remote",
"args": [
"http://localhost:39300/model_context_protocol/2025-03-26/mcp"
]
}
}
}
Remote setup (ngrok or other HTTPS tunnel)
When OpenClaw runs on a different machine than PiecesOS, expose PiecesOS (port 39300) with a tunnel and use the same MCP path on your tunnel base URL:
{
"mcpServers": {
"pieces": {
"command": "mcp-remote",
"args": [
"https://YOUR_NGROK_URL.ngrok-free.app/model_context_protocol/2025-03-26/mcp"
]
}
}
}
See Tunneling for tunnel setup. For step-by-step tunnel checks, curl validation, and gateway restarts, follow the ClawHub skill.
Example Use Cases
Once Pieces MCP is connected to OpenClaw, you can automate workflows like:
Autonomous daily standup: Schedule OpenClaw to run every morning, query yesterday's workstream summaries, and post a formatted standup to your Slack or Teams channel.
Meeting prep: Before a calendar event, OpenClaw searches audio transcriptions and workstream summaries for context related to the meeting topic and drafts a brief for you.
Automated debugging log: When OpenClaw detects a production alert, it queries recent workstream events for error-related content and creates a pieces_memory entry with the incident context.
Verification
Security Note
OpenClaw can run with permissionMode: 'bypassPermissions' to execute tools autonomously. When combined with Pieces MCP write tools (like create_pieces_memory), this is powerful but should be used carefully. Consider:
- Running OpenClaw in Docker with limited filesystem access
- Disabling write tools in MCPorter if running fully autonomously
- Monitoring execution logs
Updating
Edit ~/.openclaw/workspace/config/mcporter.json, update the URL, then restart the OpenClaw gateway (for example openclaw gateway restart from ~/.openclaw/workspace, as in the official skill).
Troubleshooting
If you're experiencing issues integrating Pieces MCP with OpenClaw:
You're now set to enhance your OpenClaw workflow with powerful context retrieval through Pieces MCP. Happy coding!