Model Context Protocol

Connecting Your AI Agent

Follow this 4-step setup guide to connect Claude Desktop, Cursor, or other agents to the TeamGraph live organizational brain.

1

Generate your API Key

To authorize your local MCP client to query the graph, you need a scoped API key.

Instructions: Sign in, navigate to API Keys in the dashboard, and create a key with the context.read and context.write scopes. Make sure to copy the raw key!
2

Install the MCP Package

Install the TeamGraph MCP CLI executable globally on your system.

npm install -g teamgraph
3

Add Server Config

Add TeamGraph to your agent client configurations.

Option A: Claude Desktop

Open your configuration file at:
~/Library/Application Support/Claude/claude_desktop_config.json

claude_desktop_config.json
{
  "mcpServers": {
    "teamgraph-live-brain": {
      "command": "teamgraph",
      "args": ["serve"],
      "env": {
        "TEAMGRAPH_SERVER_URL": "http://localhost:8000",
        "TEAMGRAPH_API_KEY": "tg_live_your_actual_api_key_here"
      }
    }
  }
}

Option B: Cursor

  1. Navigate to Cursor Settings > Features > MCP.
  2. Click + Add New MCP Server.
  3. Set Name: TeamGraph, Type: command.
  4. Command: teamgraph serve
  5. Add Environment Variables:
    • Name: TEAMGRAPH_SERVER_URL, Value: http://localhost:8000
    • Name: TEAMGRAPH_API_KEY, Value: YOUR_API_KEY
4

Test that it works

Execute a connection test to confirm validation and connectivity from your terminal.

1. Run Login Authentication test

teamgraph login --api-key tg_live_xxx --server-url http://localhost:8000

2. Run Connection Status test

teamgraph status

If correctly connected, this returns a "validation": { "status": "valid" } confirmation output payload.