Connect other agents

Connection settings for Cursor, VS Code, Codex, Gemini CLI, Claude Desktop and any other MCP client.

Any agent that can open a folder can use a synced workspace straight away: point it at the folder. To connect over MCP instead, every client needs the same three things:

SettingValue
Server URLhttps://api.trytree.house/api/mcp
TransportStreamable HTTP
Headerx-api-key: <your key>

Create the key in the web app: account menu, API keys, set Used by to Agent (MCP), then Create key. Give each agent its own key so you can tell them apart in the activity feed and revoke one without affecting the others. Manage API keys has the details.

MCP client settings change often. If an example below doesn't match your version, look in your client's docs for "remote" or "Streamable HTTP" servers with custom headers.

Cursor

Add Treehouse to ~/.cursor/mcp.json (every project) or .cursor/mcp.json in a project:

mcp.json
{
  "mcpServers": {
    "treehouse": {
      "url": "https://api.trytree.house/api/mcp",
      "headers": {
        "x-api-key": "<your key>"
      }
    }
  }
}

VS Code

Add a server to .vscode/mcp.json. The inputs block makes VS Code ask for the key once and store it securely, so it never lands in a file you might commit:

.vscode/mcp.json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "treehouse-key",
      "description": "Treehouse API key",
      "password": true
    }
  ],
  "servers": {
    "treehouse": {
      "type": "http",
      "url": "https://api.trytree.house/api/mcp",
      "headers": {
        "x-api-key": "${input:treehouse-key}"
      }
    }
  }
}

Codex

Add a server to ~/.codex/config.toml. env_http_headers reads the header value from an environment variable, which keeps the key out of the file:

config.toml
[mcp_servers.treehouse]
url = "https://api.trytree.house/api/mcp"
env_http_headers = { "x-api-key" = "TREEHOUSE_API_KEY" }

Then set TREEHOUSE_API_KEY in the environment Codex runs in.

Gemini CLI

Add Treehouse to mcpServers in ~/.gemini/settings.json:

settings.json
{
  "mcpServers": {
    "treehouse": {
      "httpUrl": "https://api.trytree.house/api/mcp",
      "headers": {
        "x-api-key": "<your key>"
      }
    }
  }
}

Claude Desktop

Claude Desktop's custom connectors sign in with OAuth, which Treehouse doesn't offer yet. Connect through the mcp-remote bridge instead, which needs Node.js installed. Open Settings, then Developer, then Edit Config, and add:

claude_desktop_config.json
{
  "mcpServers": {
    "treehouse": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://api.trytree.house/api/mcp",
        "--header",
        "x-api-key:${TREEHOUSE_API_KEY}"
      ],
      "env": {
        "TREEHOUSE_API_KEY": "<your key>"
      }
    }
  }
}

Restart Claude Desktop. Treehouse appears in the tools menu of a new chat.

Web chat apps

Chat apps in the browser, such as claude.ai and ChatGPT, only connect to remote MCP servers that sign in with OAuth, so they can't connect to Treehouse directly yet. The setup card's Claude and ChatGPT buttons still help: the agent talks you through a structure, and you (or a connected agent) create it.

Check it worked

Ask your agent to list your Treehouse workspaces. It should call list_workspaces and reply with their names. If it reports a 401, check the header name and the key; if it can't see the server at all, restart the client after editing its config.

  • Connect Claude Code

    Give Claude Code access to a workspace through your synced folder, the Treehouse MCP server, or both.

  • Manage API keys

    Create a key for each agent, see which keys can reach your workspaces, and revoke the ones you no longer need.

  • MCP server

    Every tool the Treehouse MCP server exposes, with parameters, outputs, limits and the instructions it gives connected agents.

Last updated