Installing MCP Servers

MCP servers are installed per-Space. Once installed, all agents in that Space can use the MCP's tools.


Installation Methods

Via Web App

  1. Open your Space
  2. Go to Space Settings
  3. Navigate to the Integrations or MCPs tab
  4. Browse available MCPs or add a custom one
  5. Configure credentials if required
  6. Save

Via CLI

First, create an MCP instance for your organization:

teamday mcps create \
  --type google-search \
  --name "Google Search" \
  --description "Web search integration"

Then add it to a Space:

teamday spaces add-mcp <space-id> <mcp-id>

Via API

Create an MCP instance:

curl -X POST "https://us.teamday.ai/api/v1/mcps" \
  -H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "google-analytics",
    "type": "stdio",
    "command": "npx",
    "args": ["-y", "@anthropic-ai/mcp-google-analytics"],
    "env": {
      "GA_PROPERTY_ID": "12345678"
    }
  }'

Add to a Space:

curl -X PATCH "https://us.teamday.ai/api/v1/spaces/<space-id>" \
  -H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"addMcps": ["<mcp-id>"]}'

Via .mcp.json (File-Based)

Place an .mcp.json file in the Space root:

{
  "mcpServers": {
    "google-analytics": {
      "command": "npx",
      "args": ["-y", "@anthropic-ai/mcp-google-analytics"],
      "env": {
        "GA_PROPERTY_ID": "${GA_PROPERTY_ID}"
      }
    },
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@anthropic-ai/mcp-filesystem", "/data/reports"]
    }
  }
}

Environment variable references (${VAR}) are resolved from the Space's secrets at runtime.

Via TeamdayAdmin (In-Chat)

An agent can install MCPs programmatically:

{
  "action": "createMcp",
  "data": {
    "name": "google-analytics",
    "type": "stdio",
    "command": "npx",
    "args": ["-y", "@anthropic-ai/mcp-google-analytics"],
    "env": {
      "GA_PROPERTY_ID": "12345678"
    }
  }
}

Browse available MCPs:

{
  "action": "browseMcpRegistry"
}

Configuration

Environment Variables

MCP servers often need API keys or configuration values. Store these as Space secrets:

teamday spaces set-secret <space-id> GA_PROPERTY_ID=12345678 AHREFS_API_KEY=abc123

In .mcp.json, reference them with ${VAR_NAME}:

{
  "mcpServers": {
    "my-tool": {
      "command": "node",
      "args": ["tool.js"],
      "env": {
        "API_KEY": "${API_KEY}"
      }
    }
  }
}

OAuth MCPs

Some integrations use OAuth for authentication (e.g., Google Analytics, Google Search Console):

  1. Install the MCP on your Space
  2. The UI prompts you to Connect via OAuth
  3. You authenticate with the external service
  4. Tokens are stored securely and refreshed automatically

If an OAuth token expires during a conversation, the agent can request re-authentication using the UICommand tool:

{
  "action": "requestReauth",
  "target": "google-analytics"
}

Credentials with MCP Instances

When creating MCP instances via the CLI, pass credentials as JSON:

teamday mcps create \
  --type slack \
  --name "Slack Bot" \
  --credentials '{"SLACK_TOKEN": {"value": "xoxb-...", "isSecret": true}}'

The isSecret: true flag ensures the value is encrypted at rest.


Managing MCPs

List MCPs

teamday mcps list

View MCP Details

teamday mcps get <mcp-id>

Remove from Space

teamday spaces remove-mcp <space-id> <mcp-id>

Common MCP Configurations

Google Analytics

{
  "mcpServers": {
    "google-analytics": {
      "command": "npx",
      "args": ["-y", "@anthropic-ai/mcp-google-analytics"],
      "env": {
        "GA_PROPERTY_ID": "${GA_PROPERTY_ID}"
      }
    }
  }
}

Required secret: GA_PROPERTY_ID

PostgreSQL

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@anthropic-ai/mcp-postgres", "${DATABASE_URL}"]
    }
  }
}

Required secret: DATABASE_URL

GitHub

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@anthropic-ai/mcp-github"],
      "env": {
        "GITHUB_TOKEN": "${GITHUB_TOKEN}"
      }
    }
  }
}

Required secret: GITHUB_TOKEN


Troubleshooting

MCP Not Starting

  • Verify the command is installed: npx -y <package-name> --help
  • Check that required environment variables are set as Space secrets
  • Look at agent execution logs for startup errors

Tools Not Appearing

  • MCP servers load at conversation start — new MCPs won't appear in an ongoing chat
  • Start a new conversation to pick up newly installed MCPs
  • Verify the MCP is added to the Space (check Space details)

Authentication Errors

  • For OAuth MCPs: reconnect via Space settings
  • For API key MCPs: verify the secret value is correct
  • Check that secret names match what the MCP expects (case-sensitive)

Next Steps