Installing MCP Servers

This guide walks you through installing, configuring, and managing MCP servers to extend your AI agents' capabilities.

Installation Overview

Prerequisites

Before installing MCP servers, ensure you have:

  • TeamDay account with appropriate permissions
  • Access to the agent configuration panel
  • Understanding of the tools and integrations you need
  • Required API keys and credentials for external services

Installation Methods

  • Built-in Servers: Pre-configured servers available in TeamDay
  • Community Servers: Open-source servers from the community
  • Custom Servers: Self-hosted or custom-built servers
  • Enterprise Servers: Commercial servers with enterprise features

Built-in MCP Servers

Available Built-in Servers

TeamDay comes with several pre-configured MCP servers:

Database Server

  • PostgreSQL: Connect to PostgreSQL databases
  • MySQL: MySQL database integration
  • MongoDB: NoSQL database access
  • SQLite: Lightweight database operations

File System Server

  • Local Files: Access to local file systems
  • Cloud Storage: AWS S3, Google Drive, Dropbox
  • FTP/SFTP: File transfer protocol access
  • Git Repositories: Git-based file access

API Integration Server

  • REST APIs: Generic REST API client
  • GraphQL: GraphQL query support
  • Webhook Handler: Receive and process webhooks
  • OAuth Manager: OAuth authentication handling

Installing Built-in Servers

Step 1: Access Server Management

  1. Navigate to your agent's configuration page
  2. Click on "Tools & Integrations"
  3. Select "MCP Servers" from the sidebar
  4. Click "Add New Server"

Step 2: Select Server Type

  1. Browse the "Built-in Servers" section
  2. Select the server you want to install
  3. Review the server description and capabilities
  4. Click "Install"

Step 3: Configure Server

  1. Provide required configuration parameters
  2. Set up authentication credentials
  3. Configure resource access permissions
  4. Test the connection

Example: Installing Database Server

{
  "server_type": "postgresql",
  "configuration": {
    "host": "localhost",
    "port": 5432,
    "database": "myapp",
    "username": "agent_user",
    "password": "${DATABASE_PASSWORD}",
    "ssl": true,
    "pool_size": 10
  },
  "permissions": {
    "read": true,
    "write": true,
    "schema": false
  }
}

Community MCP Servers

Finding Community Servers

  • TeamDay Marketplace: Official marketplace for verified servers
  • GitHub Repositories: Open-source community servers
  • NPM Registry: Node.js-based MCP servers
  • Docker Hub: Containerized MCP servers

GitHub Integration Server

Connect to GitHub repositories:

# Install via TeamDay CLI
teamday mcp install github-server

# Or via npm
npm install @teamday/mcp-github-server

Configuration:

{
  "name": "github-server",
  "type": "community",
  "source": "npm:@teamday/mcp-github-server",
  "config": {
    "github_token": "${GITHUB_TOKEN}",
    "default_org": "my-organization",
    "rate_limit": 100
  }
}

Slack Integration Server

teamday mcp install slack-server

Configuration:

{
  "name": "slack-server",
  "type": "community",
  "source": "npm:@teamday/mcp-slack-server",
  "config": {
    "bot_token": "${SLACK_BOT_TOKEN}",
    "app_token": "${SLACK_APP_TOKEN}",
    "default_channel": "#general"
  }
}

Email Server

teamday mcp install email-server

Configuration:

{
  "name": "email-server",
  "type": "community",
  "source": "npm:@teamday/mcp-email-server",
  "config": {
    "smtp_host": "smtp.gmail.com",
    "smtp_port": 587,
    "username": "${EMAIL_USERNAME}",
    "password": "${EMAIL_PASSWORD}",
    "use_tls": true
  }
}

Installing Community Servers

Method 1: TeamDay Marketplace

  1. Go to "MCP Servers" → "Marketplace"
  2. Browse or search for servers
  3. Click on a server to view details
  4. Click "Install" and follow setup wizard
  5. Configure authentication and permissions

Method 2: Manual Installation

  1. Download the server package
  2. Upload to your TeamDay instance
  3. Configure the server settings
  4. Test and activate the server

Method 3: CLI Installation

# Install TeamDay CLI
npm install -g @teamday/cli

# Login to your account
teamday login

# Install MCP server
teamday mcp install <server-name>

# Configure the server
teamday mcp configure <server-name>

Custom MCP Servers

Self-Hosted Servers

For enterprise or specialized needs, you can host your own MCP servers.

Docker Deployment

FROM node:18-alpine

WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --only=production

COPY src/ ./src/
EXPOSE 3000

CMD ["node", "src/server.js"]

Docker Compose Setup

version: '3.8'
services:
  mcp-server:
    build: .
    ports:
      - "3000:3000"
    environment:
      - MCP_PORT=3000
      - DATABASE_URL=${DATABASE_URL}
    volumes:
      - ./config:/app/config
    restart: unless-stopped

TeamDay Configuration

{
  "name": "custom-server",
  "type": "custom",
  "endpoint": "https://my-mcp-server.example.com",
  "authentication": {
    "type": "bearer",
    "token": "${CUSTOM_SERVER_TOKEN}"
  },
  "timeout": 30000,
  "retry_attempts": 3
}

Cloud-Hosted Servers

Deploy to cloud platforms:

AWS Lambda

# serverless.yml
service: mcp-server

provider:
  name: aws
  runtime: nodejs18.x
  environment:
    DATABASE_URL: ${env:DATABASE_URL}

functions:
  mcpHandler:
    handler: handler.mcp
    events:
      - http:
          path: /
          method: any

Google Cloud Functions

# cloud-function.yaml
runtime: nodejs18
entry_point: mcpHandler
env_variables:
  DATABASE_URL: ${DATABASE_URL}

Vercel Deployment

{
  "name": "mcp-server",
  "version": 2,
  "builds": [
    {
      "src": "api/mcp.js",
      "use": "@vercel/node"
    }
  ],
  "routes": [
    {
      "src": "/(.*)",
      "dest": "/api/mcp.js"
    }
  ]
}

Configuration Management

Environment Variables

Store sensitive configuration in environment variables:

# .env file
DATABASE_PASSWORD=secure_password
GITHUB_TOKEN=ghp_your_token_here
SLACK_BOT_TOKEN=xoxb-your-token
EMAIL_PASSWORD=your_email_password
CUSTOM_SERVER_TOKEN=your_custom_token

Configuration Files

Use configuration files for complex setups:

// mcp-config.json
{
  "servers": [
    {
      "name": "database-server",
      "enabled": true,
      "config": {
        "host": "localhost",
        "port": 5432,
        "database": "myapp"
      }
    },
    {
      "name": "github-server",
      "enabled": true,
      "config": {
        "default_org": "my-org"
      }
    }
  ],
  "global_settings": {
    "timeout": 30000,
    "retry_attempts": 3,
    "rate_limit": 100
  }
}

Secrets Management

For enterprise deployments, use proper secrets management:

AWS Secrets Manager

const AWS = require('aws-sdk');
const secretsManager = new AWS.SecretsManager();

const getSecret = async (secretName) => {
  const result = await secretsManager.getSecretValue({
    SecretId: secretName
  }).promise();
  
  return JSON.parse(result.SecretString);
};

Azure Key Vault

const { DefaultAzureCredential } = require('@azure/identity');
const { SecretClient } = require('@azure/keyvault-secrets');

const credential = new DefaultAzureCredential();
const client = new SecretClient(vaultUrl, credential);

const getSecret = async (secretName) => {
  const secret = await client.getSecret(secretName);
  return secret.value;
};

Testing and Validation

Health Checks

Verify server installation and health:

# Check server status
teamday mcp status

# Test specific server
teamday mcp test github-server

# View server logs
teamday mcp logs github-server --tail 100

Integration Testing

Test server functionality:

// Test database connection
const testDatabaseServer = async () => {
  try {
    const result = await agent.callTool('database-server', 'query', {
      sql: 'SELECT 1 as test'
    });
    console.log('Database server working:', result);
  } catch (error) {
    console.error('Database server error:', error);
  }
};

// Test API server
const testApiServer = async () => {
  try {
    const result = await agent.callTool('api-server', 'get', {
      url: 'https://api.github.com/user'
    });
    console.log('API server working:', result);
  } catch (error) {
    console.error('API server error:', error);
  }
};

Monitoring and Maintenance

Server Monitoring

Monitor server performance and health:

  • Response Times: Track average response times
  • Error Rates: Monitor error frequency
  • Resource Usage: CPU, memory, network usage
  • Uptime: Server availability metrics

Automatic Updates

Enable automatic updates for community servers:

{
  "update_policy": {
    "auto_update": true,
    "update_schedule": "weekly",
    "allowed_versions": "patch",
    "rollback_on_failure": true
  }
}

Backup and Recovery

Implement backup strategies:

  • Configuration Backup: Regular configuration snapshots
  • State Backup: Server state and data backup
  • Disaster Recovery: Recovery procedures for failures
  • Version Control: Track configuration changes

Troubleshooting

Common Installation Issues

Authentication Failures

# Check credentials
teamday mcp validate-auth github-server

# Refresh tokens
teamday mcp refresh-auth github-server

Connection Problems

# Test connectivity
teamday mcp ping database-server

# Check network settings
teamday mcp network-test

Permission Issues

# Check permissions
teamday mcp check-permissions

# Update permissions
teamday mcp update-permissions github-server

Error Resolution

Log Analysis

# View detailed logs
teamday mcp logs --level error --since 1h

# Export logs for analysis
teamday mcp logs --export logs.json

Performance Issues

# Check server performance
teamday mcp performance github-server

# Optimize configuration
teamday mcp optimize github-server

Security Best Practices

Access Control

  • Use least-privilege principle for server permissions
  • Regularly rotate API keys and tokens
  • Implement IP whitelisting when possible
  • Monitor access logs for suspicious activity

Data Protection

  • Encrypt sensitive configuration data
  • Use secure communication channels (HTTPS/TLS)
  • Implement input validation and sanitization
  • Regular security audits and updates

Compliance

  • Ensure servers meet your organization's compliance requirements
  • Document security configurations
  • Implement audit logging
  • Regular security assessments

Next Steps