MCP Plugins Guide

Learn how to install and use MCP (Model Context Protocol) plugins to extend your AI agents' capabilities with powerful tools and integrations.

Table of Contents

What You'll Learn

By the end of this guide, you'll know how to:

  • βœ… Understand what MCP plugins are
  • βœ… Install simple plugins (sequential-thinking)
  • βœ… Install complex plugins with OAuth (Google Analytics)
  • βœ… Configure data access plugins (BigQuery)
  • βœ… Test and use MCP tools with agents
  • βœ… Manage and troubleshoot plugins

Time to complete: 30-40 minutes

Prerequisites

Before starting, ensure you have:

  • βœ… A TeamDay account (Sign up guide)
  • βœ… An agent created (Agent guide)
  • βœ… A space (optional but recommended) (Space guide)
  • βœ… API keys for external services (Google, etc.)

Understanding MCP

What is MCP?

Model Context Protocol (MCP) is a standard protocol that allows AI agents to use external tools and services. Think of MCP plugins as "apps" for your AI agents.

Why Use MCP Plugins?

Extend Agent Capabilities:

  • Access external data (analytics, databases)
  • Perform specialized tasks (sequential thinking, calculations)
  • Integrate with third-party services (Google, AWS, Slack)
  • Execute custom workflows

Benefits:

  • Modular and reusable
  • Community-driven ecosystem
  • Easy to install and configure
  • Secure credential management

Screenshot

Plugin Types

1. Simple Plugins (No Authentication)

  • No API keys required
  • Quick installation
  • Example: Sequential Thinking

2. OAuth Plugins (OAuth Authentication)

  • Requires OAuth flow
  • User consent needed
  • Example: Google Analytics, Gmail

3. API Key Plugins (API Key Authentication)

  • Requires API keys
  • Service account setup
  • Example: BigQuery, AWS services

4. Custom Plugins (Self-hosted)

  • Your own MCP server
  • Full control
  • Example: Internal APIs

Installing Simple Plugins

Let's start with a simple plugin that doesn't require authentication.

Example: Sequential Thinking Plugin

This plugin helps agents break down complex problems step-by-step.

Step 1: Navigate to Plugins

  1. Open your agent settings
  2. Click "Tools & Integrations" tab
  3. Select "MCP Plugins"
  4. Click "+ Add Plugin"

Screenshot

Step 2: Search for Plugin

  1. In the plugin marketplace, search: "sequential-thinking"
  2. Click on "@modelcontextprotocol/server-sequential-thinking"
  3. Review description and features

Screenshot

Step 3: Install Plugin

Click "Install" button

The plugin will be added to your agent's MCP configuration:

{
  "mcpServers": {
    "sequential-thinking": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
    }
  }
}

Step 4: Test Plugin

  1. Go to agent chat
  2. Ask agent to use the tool:
User: "Think through how to design a scalable API architecture step-by-step"

Agent: [Uses sequential-thinking tool]

Step 1: Define requirements
- Expected load: 1000 req/sec
- Data model: User, Post, Comment
- Latency target: <100ms

Step 2: Choose architecture pattern
- RESTful API with microservices
- API Gateway for routing
- Load balancer for distribution

Step 3: Design data layer
...

Screenshot

Via API

Install plugin:

curl -X POST "https://cc.teamday.ai/api/v1/plugins/install" \
  -H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "char_abc123",
    "pluginConfig": {
      "mcpServers": {
        "sequential-thinking": {
          "command": "npx",
          "args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
        }
      }
    }
  }'

Verify installation:

curl -X GET "https://cc.teamday.ai/api/v1/plugins/mcp/pending?agentId=char_abc123" \
  -H "Authorization: Bearer $TEAMDAY_API_TOKEN"

Installing Complex Plugins

Complex plugins require authentication with external services.

Example 1: Google Analytics Plugin

Access Google Analytics data from your agents.

Prerequisites:

  • Google Account with Analytics access
  • GA4 property set up

Step 1: Install Plugin

  1. Navigate to agent β†’ MCP Plugins
  2. Search: "google-analytics"
  3. Click "Install"

Step 2: Configure OAuth

  1. Plugin shows "Authentication Required"
  2. Click "Connect Google Account"
  3. You'll be redirected to Google
  4. Review permissions:
    • βœ… View Google Analytics data
    • βœ… View property and account metadata
  5. Click "Allow"
  6. Redirected back to TeamDay

Screenshot

Step 3: Configure Plugin

Plugin configuration with OAuth credentials:

{
  "mcpServers": {
    "google-analytics": {
      "command": "npx",
      "args": ["-y", "@your-org/mcp-google-analytics"],
      "env": {
        "GA_CLIENT_ID": "${GA_CLIENT_ID}",
        "GA_CLIENT_SECRET": "${GA_CLIENT_SECRET}",
        "GA_REFRESH_TOKEN": "${GA_REFRESH_TOKEN}"
      }
    }
  }
}

TeamDay automatically stores these values securely in your space settings.

Step 4: Select Property

  1. Choose Google Analytics property
  2. Click "Save Configuration"

Screenshot

Step 5: Test Plugin

Ask your agent to query analytics:

User: "What were our top 5 pages last week?"

Agent: [Queries Google Analytics via MCP]

Top Pages (Last 7 Days):
1. /blog/getting-started - 12,450 views
2. /docs/api-reference - 8,230 views
3. /pricing - 6,890 views
4. /features - 5,120 views
5. /about - 3,450 views

Total page views: 36,140

Screenshot

Example 2: BigQuery Plugin

Access Google BigQuery datasets for data analysis.

Prerequisites:

  • Google Cloud Platform account
  • BigQuery project with datasets
  • Service account credentials

Step 1: Create Service Account

  1. Go to Google Cloud Console
  2. Select your project
  3. Navigate to IAM & Admin β†’ Service Accounts
  4. Click "Create Service Account"
  5. Name: "teamday-bigquery"
  6. Grant role: BigQuery Data Viewer
  7. Click "Create Key" β†’ JSON
  8. Download credentials file

Screenshot

Step 2: Install Plugin

  1. Navigate to agent β†’ MCP Plugins
  2. Search: "bigquery"
  3. Click "Install"

Step 3: Upload Credentials

  1. Plugin prompts for credentials
  2. Click "Upload Service Account JSON"
  3. Select downloaded JSON file
  4. Credentials stored securely

Alternatively, paste JSON content or upload to space files.

Screenshot

Step 4: Configure Plugin

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

The GCP_SERVICE_ACCOUNT_PATH points to the uploaded JSON file in your space.

Step 5: Test Plugin

Query your data:

User: "Query our user events table for last month's signups"

Agent: [Writes and executes BigQuery SQL]

Query:
SELECT DATE(created_at) as signup_date, COUNT(*) as signups
FROM `project.dataset.users`
WHERE created_at >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
GROUP BY signup_date
ORDER BY signup_date DESC

Results:
2025-01-14: 127 signups
2025-01-13: 143 signups
2025-01-12: 98 signups
...
Total: 3,456 signups

Screenshot

Via API

Install Google Analytics plugin:

# Step 1: Install plugin
curl -X POST "https://cc.teamday.ai/api/v1/plugins/install" \
  -H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "char_abc123",
    "pluginName": "google-analytics",
    "pluginConfig": {
      "command": "npx",
      "args": ["-y", "@your-org/mcp-google-analytics"]
    }
  }'

# Step 2: Set OAuth credentials (after OAuth flow)
curl -X POST "https://cc.teamday.ai/api/v1/secrets/set" \
  -H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "char_abc123",
    "key": "GA_CLIENT_ID",
    "value": "your-client-id"
  }'

# Step 3: Merge plugin into agent config
curl -X POST "https://cc.teamday.ai/api/v1/plugins/mcp/merge" \
  -H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "char_abc123"
  }'

Install BigQuery plugin:

# Step 1: Install plugin
curl -X POST "https://cc.teamday.ai/api/v1/plugins/install" \
  -H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "char_abc123",
    "pluginName": "bigquery",
    "pluginConfig": {
      "command": "npx",
      "args": ["-y", "@anthropic-ai/mcp-bigquery"]
    }
  }'

# Step 2: Upload service account JSON
curl -X POST "https://cc.teamday.ai/api/v1/spaces/s-space123/files" \
  -H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
  -F "[email protected]" \
  -F "path=/credentials/gcp-service-account.json"

# Step 3: Set environment variable
curl -X POST "https://cc.teamday.ai/api/v1/secrets/set" \
  -H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "spaceId": "s-space123",
    "key": "GCP_SERVICE_ACCOUNT_PATH",
    "value": "/credentials/gcp-service-account.json"
  }'

Using MCP Tools

Discovering Available Tools

Via UI:

  1. Open agent β†’ Tools tab
  2. View all installed MCP plugins
  3. Expand plugin to see available tools

Via Agent:

User: "What tools do you have access to?"

Agent: I have access to the following MCP tools:

1. sequential-thinking
   - think: Break down complex problems step-by-step

2. google-analytics
   - runReport: Query GA4 data
   - getAccountSummaries: List GA properties
   - getMetadata: Get dimension/metric metadata

3. bigquery
   - query: Execute SQL queries
   - listDatasets: List available datasets
   - listTables: List tables in dataset

Using Tools in Conversations

Sequential Thinking:

User: "Design a database schema for an e-commerce platform. Think through it carefully."

Agent: [Uses sequential-thinking tool]

Let me break this down systematically:

[Step 1] Identify core entities
- Users (customers)
- Products (inventory)
- Orders (transactions)
- OrderItems (line items)
- Categories (product organization)
- Reviews (customer feedback)

[Step 2] Define relationships...

Google Analytics:

User: "Compare this week's traffic to last week"

Agent: [Uses google-analytics runReport tool]

Traffic Comparison:
This Week (Jan 8-14): 45,230 sessions (+12.5%)
Last Week (Jan 1-7): 40,190 sessions

Key metrics:
- Page views: 123,450 (+15.2%)
- Avg session duration: 3m 24s (+8%)
- Bounce rate: 42.3% (-3.1%)

BigQuery:

User: "What's the average order value by month for 2024?"

Agent: [Writes BigQuery SQL and executes]

Average Order Value by Month (2024):

January: $127.45
February: $134.23
March: $142.18
...
December: $156.89

Trend: +23% growth over the year

Combining Multiple Tools

Agents can use multiple MCP tools together:

User: "Analyze our Google Analytics data and compare it with sales data from BigQuery"

Agent:
1. [Uses google-analytics to get traffic data]
2. [Uses bigquery to get sales data]
3. [Analyzes correlation]

Analysis:
- Traffic increased 15% in Q4
- Sales increased 23% in same period
- Conversion rate improved from 2.1% to 2.4%
- Top traffic source: Organic search (45%)
- Top sales driver: Email campaigns (38% conversion)

Recommendation: Increase email marketing budget

Managing Plugins

Viewing Installed Plugins

Via UI:

  1. Agent settings β†’ MCP Plugins tab
  2. View list of installed plugins with:
    • Plugin name
    • Installation date
    • Status (active/inactive/error)
    • Configuration

Screenshot

Via API:

curl -X GET "https://cc.teamday.ai/api/v1/plugins/mcp/pending?agentId=char_abc123" \
  -H "Authorization: Bearer $TEAMDAY_API_TOKEN"

Response:

{
  "plugins": [
    {
      "name": "sequential-thinking",
      "status": "active",
      "installedAt": "2025-01-15T10:00:00Z"
    },
    {
      "name": "google-analytics",
      "status": "active",
      "installedAt": "2025-01-15T10:15:00Z",
      "requiresAuth": true,
      "authStatus": "connected"
    }
  ]
}

Updating Plugin Configuration

Via UI:

  1. Click plugin β†’ "Configure"
  2. Update settings
  3. Click "Save"

Via API:

curl -X PATCH "https://cc.teamday.ai/api/v1/plugins/char_abc123/google-analytics" \
  -H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "config": {
      "propertyId": "GA4-PROPERTY-ID",
      "defaultDateRange": "last-30-days"
    }
  }'

Uninstalling Plugins

Via UI:

  1. Plugin list β†’ Click plugin
  2. Click "Uninstall" button
  3. Confirm deletion

Via API:

curl -X POST "https://cc.teamday.ai/api/v1/plugins/uninstall" \
  -H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "char_abc123",
    "pluginName": "google-analytics"
  }'

Plugin removed from MCP configuration and credentials cleaned up.

Refreshing OAuth Tokens

For OAuth-based plugins:

Via UI:

  1. Plugin shows "Token Expired" warning
  2. Click "Reconnect"
  3. Re-authorize on external service
  4. Token refreshed automatically

Via API:

curl -X POST "https://cc.teamday.ai/api/v1/plugins/char_abc123/google-analytics/refresh-auth" \
  -H "Authorization: Bearer $TEAMDAY_API_TOKEN"

Best Practices

1. Start with Simple Plugins

Begin with plugins that don't require complex auth:

  • βœ… Sequential Thinking
  • βœ… Calculator
  • βœ… Weather API

Then move to complex ones:

  • ⚑ Google Analytics
  • ⚑ BigQuery
  • ⚑ AWS services

2. Secure Your Credentials

Do:

  • βœ… Use environment variables for secrets
  • βœ… Store service account JSON securely in space files
  • βœ… Rotate credentials regularly
  • βœ… Use least-privilege permissions

Don't:

  • ❌ Commit credentials to Git
  • ❌ Share credentials in chat
  • ❌ Use overly permissive service accounts

3. Test Plugins Before Production

User: "Test the BigQuery connection"

Agent: [Executes simple test query]

SELECT 'Connection successful' as status
Result: βœ… Connection successful

4. Monitor Plugin Usage

Track which plugins agents use most:

  • View execution history
  • Monitor error rates
  • Check performance metrics

5. Document Plugin Purpose

Add to your agent's system prompt or CLAUDE.md:

## Available MCP Tools

### google-analytics
- Purpose: Query website traffic and user behavior
- Use for: Traffic reports, conversion analysis
- Example: "What were our top pages last week?"

### bigquery
- Purpose: Query sales and user data
- Use for: Data analysis, reporting
- Example: "Average order value by month"

6. Handle Errors Gracefully

User: "Query our analytics data"

Agent: [Attempts to use google-analytics]

Error: OAuth token expired

Agent: "I encountered an authentication error with Google Analytics. Please reconnect the plugin in settings and try again."

Troubleshooting

Plugin Not Showing Tools

Problem: Plugin installed but tools not available

Solutions:

  1. Check plugin status:
teamday plugins status char_abc123
  1. Verify configuration merged:
curl -X GET "https://cc.teamday.ai/api/v1/agents/char_abc123" \
  -H "Authorization: Bearer $TEAMDAY_API_TOKEN"

Look for plugin in mcpServers object.

  1. Restart agent:
    • Agents cache tool list
    • New chat session or re-save agent config

OAuth Authentication Failed

Problem: Can't connect Google/OAuth service

Solutions:

  1. Check OAuth scopes:
    • Ensure required scopes granted
    • Re-authorize if scopes changed
  2. Verify redirect URI:
    • Callback URL must match TeamDay domain
    • https://cc.teamday.ai/api/auth/callback
  3. Clear and reconnect:
    • Disconnect plugin
    • Revoke access in Google/service settings
    • Reconnect fresh

BigQuery Permission Denied

Problem: Service account can't access data

Solutions:

  1. Check IAM roles:
    • Service account needs BigQuery Data Viewer role
    • Or BigQuery User for queries
  2. Verify dataset permissions:
    • Dataset-level permissions may be required
    • Grant service account access to specific datasets
  3. Test with gcloud:
gcloud auth activate-service-account --key-file=service-account.json
bq query "SELECT 1"

Plugin Install Timeout

Problem: Plugin installation hangs

Solutions:

  1. Check npm registry:
npm info @modelcontextprotocol/server-sequential-thinking
  1. Manual install:
npx -y @modelcontextprotocol/server-sequential-thinking
  1. Use alternative registry:
    • Configure custom npm registry in plugin settings

Tool Calls Failing

Problem: Agent tries to use tool but fails

Solutions:

  1. Check error message:
User: "Enable debug mode and try again"

Agent: [Shows full error]
  1. Test tool directly:
    • Use API to call tool
    • Verify inputs and outputs
  2. Review plugin logs:
teamday plugins logs google-analytics --tail 50

Data & Analytics

  • Google Analytics - Web analytics
  • BigQuery - Data warehouse
  • PostgreSQL - Relational database
  • MongoDB - NoSQL database

Communication

  • Slack - Team messaging
  • Gmail - Email
  • SendGrid - Email API
  • Twilio - SMS/Voice

Development

  • GitHub - Code repositories
  • GitLab - DevOps platform
  • Jira - Project management
  • Linear - Issue tracking

Utilities

  • Sequential Thinking - Problem decomposition
  • Calculator - Math operations
  • Weather API - Weather data
  • Web Search - Internet search

Cloud Services

  • AWS S3 - Object storage
  • AWS Lambda - Serverless functions
  • Azure - Microsoft cloud
  • GCP - Google cloud

Next Steps

Now that you can install and use MCP plugins:

1. Create Custom Plugins

2. Build Workflows

3. Set Up Automation

4. Advanced MCP Usage

  • Multi-agent delegation with shared plugins
  • Guide:

Learning Resources

Happy plugin building! πŸ”Œ