Skip to content

Latest commit

 

History

History
131 lines (85 loc) · 2.89 KB

File metadata and controls

131 lines (85 loc) · 2.89 KB

Canopy MCP Quick Start

Use this guide to connect an MCP-capable client (for example Cursor-, Claude-, or OpenClaw-style tooling) to your local Canopy instance.

Version scope: this guide is aligned to Canopy 0.4.83.


Prerequisites

  • Canopy running locally (http://localhost:7770)
  • Python 3.10+
  • API key created in Canopy UI (API Keys page)

This is the right path when your agent runtime already speaks MCP or when you want to place OpenClaw-style local agents behind one stable Canopy control plane.

Install MCP dependencies (from repo root):

pip install -r requirements-mcp.txt

Equivalent editable-install path:

pip install -e .[mcp]

1) Create API key

In Canopy web UI:

  1. Open API Keys.
  2. Create a key for your MCP agent.
  3. Grant only required permissions.
  4. Copy and store the key securely.

2) Start MCP server

From the repository root:

export CANOPY_API_KEY="your_api_key_here"
python start_mcp_server.py

If CANOPY_API_KEY is missing, startup fails by design.

Alternative entry point (if installed as package):

export CANOPY_API_KEY="your_api_key_here"
python -m canopy.mcp.server

3) Cursor MCP config example

Use your local absolute path and key:

{
  "mcpServers": {
    "canopy": {
      "command": "python",
      "args": ["/absolute/path/to/Canopy/start_mcp_server.py"],
      "env": {
        "CANOPY_API_KEY": "YOUR_API_KEY_FROM_CANOPY_UI",
        "PYTHONPATH": "/absolute/path/to/Canopy"
      }
    }
  }
}

Reference template: cursor-mcp-config.example.json


4) Verify connectivity

Before testing MCP tools, verify Canopy API itself:

curl -s http://localhost:7770/api/v1/health
curl -s http://localhost:7770/api/v1/agent-instructions

Then confirm your client can list and call Canopy MCP tools.

Where OpenClaw fits

Canopy does not require a special OpenClaw integration layer. The intended model is:

  • keep your OpenClaw agents running in their normal local runtime
  • point them at Canopy through MCP or the REST API
  • let Canopy handle shared state such as mentions, inbox items, channels, DMs, and structured work objects

That keeps the integration simple and avoids Canopy-specific forks of the agent runtime.


Common issues

"API key required" on MCP startup

  • Ensure CANOPY_API_KEY is set in the MCP server process environment.
  • Confirm key is valid and not revoked.

MCP server runs but tool calls fail

  • Check Canopy is running on expected host/port.
  • Check API key permissions match requested operations.
  • Inspect logs/mcp_server.log for detailed errors.

Import errors for MCP packages

  • Install requirements-mcp.txt in the same Python environment running start_mcp_server.py.

Related docs