MCP Server

Let AI agents deploy, monitor, and manage your Temps infrastructure through natural language using the Model Context Protocol.


Overview

The Temps MCP server (@temps-sdk/mcp) exposes your entire Temps platform to AI assistants that support the Model Context Protocol. This means tools like Claude Code, Claude Desktop, Cursor, Windsurf, OpenAI Codex, and others can directly interact with your deployments, services, monitoring, and more.

What You Can Do - Deploy and rollback applications - Manage environments and env vars - Provision databases, Redis, S3 - Check deployment logs and status - Monitor uptime and incidents - View error tracking data - Manage domains and SSL certificates - Run vulnerability scans - Configure webhooks and notifications - Browse proxy logs and analytics

Why It Matters - Manage infrastructure without leaving your editor - Natural language instead of memorizing CLI flags - 224 tools covering the full Temps API - Load only the categories you need with --tools filtering

  • Works with any MCP-compatible AI client - Same API key authentication as the CLI - Full read and write access to your platform

Installation

The MCP server is published as @temps-sdk/mcp on npm. You don't need to install it globally — all configurations below use npx or bunx to run it on demand.

Prerequisites

Before configuring any AI tool, you need:

  1. A running Temps instance — the URL of your Temps server (e.g., https://temps.example.com)
  2. An API key — generate one from the Temps dashboard under Settings > API Keys, or via the CLI:
bunx @temps-sdk/cli api-keys create --name "mcp-server" --role admin

Tool Category Filtering

The MCP server exposes 224 tools by default. To reduce context size and improve AI performance, you can load only the tool categories you need using the --tools flag or the TEMPS_MCP_TOOLS environment variable.

Using the --tools CLI flag

{
  "mcpServers": {
    "temps": {
      "command": "npx",
      "args": ["@temps-sdk/mcp", "--tools", "deployments,analytics,projects"],
      "env": {
        "TEMPS_API_URL": "https://temps.example.com",
        "TEMPS_API_KEY": "tk_..."
      }
    }
  }
}

Using the TEMPS_MCP_TOOLS environment variable

{
  "mcpServers": {
    "temps": {
      "command": "npx",
      "args": ["@temps-sdk/mcp"],
      "env": {
        "TEMPS_API_URL": "https://temps.example.com",
        "TEMPS_API_KEY": "tk_...",
        "TEMPS_MCP_TOOLS": "deployments,analytics,projects"
      }
    }
  }
}

Available categories (30)

projects
deployments
environments
domains
services
backups
monitors
containers
users
settings
api-keys
webhooks
audit
dns-providers
notifications
scans
custom-domains
errors
proxy-logs
dsn
ip-access
incidents
funnels
presets
platform
email-domains
email-providers
load-balancer
notification-prefs
analytics

Claude Code

Claude Code is Anthropic's CLI agent. It reads MCP config from your project's .mcp.json or ~/.claude.json.

Per-Project Setup

Create a .mcp.json file in your project root:

{
  "mcpServers": {
    "temps": {
      "command": "npx",
      "args": ["@temps-sdk/mcp"],
      "env": {
        "TEMPS_API_URL": "https://temps.example.com",
        "TEMPS_API_KEY": "your-api-key"
      }
    }
  }
}

Global Setup

Add to ~/.claude.json to make Temps available in all projects:

{
  "mcpServers": {
    "temps": {
      "command": "npx",
      "args": ["@temps-sdk/mcp"],
      "env": {
        "TEMPS_API_URL": "https://temps.example.com",
        "TEMPS_API_KEY": "your-api-key"
      }
    }
  }
}

Usage

Once configured, ask Claude Code things like:

> Deploy my app to production
> What's the status of my last deployment?
> Show me recent errors in project my-app
> Create a new PostgreSQL service and link it to my project
> What are the uptime stats for the last 24 hours?

Claude Desktop

Claude Desktop supports MCP servers via its configuration file.

Configuration

Edit your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "temps": {
      "command": "npx",
      "args": ["@temps-sdk/mcp"],
      "env": {
        "TEMPS_API_URL": "https://temps.example.com",
        "TEMPS_API_KEY": "your-api-key"
      }
    }
  }
}

Restart Claude Desktop after saving. You should see a hammer icon indicating MCP tools are available.


OpenCode

OpenCode is an open-source terminal AI agent. It reads MCP config from its configuration file.

Configuration

Edit ~/.config/opencode/config.json (or the config path shown by opencode config):

{
  "mcpServers": {
    "temps": {
      "command": "npx",
      "args": ["@temps-sdk/mcp"],
      "env": {
        "TEMPS_API_URL": "https://temps.example.com",
        "TEMPS_API_KEY": "your-api-key"
      }
    }
  }
}

Cursor

Cursor supports MCP servers in its settings.

Configuration

  1. Open Cursor Settings (Cmd+, / Ctrl+,)
  2. Search for "MCP"
  3. Click "Add MCP Server"
  4. Fill in:
    • Name: temps
    • Command: npx
    • Args: @temps-sdk/mcp

Alternatively, add to .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "temps": {
      "command": "npx",
      "args": ["@temps-sdk/mcp"],
      "env": {
        "TEMPS_API_URL": "https://temps.example.com",
        "TEMPS_API_KEY": "your-api-key"
      }
    }
  }
}

Windsurf

Windsurf (by Codeium) supports MCP via its configuration file.

Configuration

Edit ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "temps": {
      "command": "npx",
      "args": ["@temps-sdk/mcp"],
      "env": {
        "TEMPS_API_URL": "https://temps.example.com",
        "TEMPS_API_KEY": "your-api-key"
      }
    }
  }
}

Restart Windsurf after saving.


OpenAI Codex

OpenAI Codex CLI supports MCP servers via its configuration.

Configuration

Add to your Codex config (typically ~/.codex/config.json or the project-level config):

{
  "mcpServers": {
    "temps": {
      "command": "npx",
      "args": ["@temps-sdk/mcp"],
      "env": {
        "TEMPS_API_URL": "https://temps.example.com",
        "TEMPS_API_KEY": "your-api-key"
      }
    }
  }
}

Cline (VS Code)

Cline is an AI coding agent for VS Code with MCP support.

Configuration

  1. Open the Cline sidebar in VS Code
  2. Click the MCP Servers icon (plug icon)
  3. Click "Configure MCP Servers"
  4. Add the following to the configuration:
{
  "mcpServers": {
    "temps": {
      "command": "npx",
      "args": ["@temps-sdk/mcp"],
      "env": {
        "TEMPS_API_URL": "https://temps.example.com",
        "TEMPS_API_KEY": "your-api-key"
      }
    }
  }
}

Available Tools

The MCP server exposes 224 tools across 30 categories, covering the full Temps API. You can filter which categories are loaded to reduce context size. Here's a summary of the key categories:

CategoryToolsWhat You Can Do
Projects9Create, update, delete projects; update git settings
Deployments10Trigger, cancel, pause, resume, rollback deployments; view logs
Environments13Create environments, manage env vars, scale replicas, manage crons
Domains & TLS19Add domains, provision SSL, manage DNS challenges, custom domains
Services14Provision Postgres, Redis, S3, MongoDB; link to projects
Containers7Start, stop, restart containers; view metrics and logs
Backups16Create backup schedules, configure S3 storage, trigger backups
Monitors6Create uptime monitors, view status and history
Error Tracking8List error groups, view events and stack traces, get stats
Incidents6Create and manage incidents, post status updates
Analytics14Visitors, page views, real-time stats, property breakdowns, funnels
Vulnerability Scans7Trigger scans, view vulnerabilities by severity
Proxy Logs5Search request logs, view stats and individual requests
Funnels6Create analytics funnels, preview and view conversion metrics
Webhooks9Create webhooks, view deliveries, retry failed deliveries
Email13Manage email domains, DKIM records, email providers
Notifications11Configure Slack, email, webhook notification providers
Users & API Keys14Manage users, roles, API keys, and permissions
DNS Providers12Register DNS providers, manage zones and domains
Load Balancer5Manage load balancer routes
Audit Logs2View platform audit trail
Platform4Get platform info, public/private IP, capabilities

Analytics Tools

The new analytics category provides 14 tools for querying project analytics data. All analytics tools support environment_id filtering, and count-based tools support aggregation_level (events, sessions, or visitors).

ToolDescription
has_analytics_eventsCheck if a project has any analytics events
get_unique_countsUnique visitors, sessions, or page views for a date range
get_active_visitorsReal-time active visitors (last 5 minutes)
get_hourly_visitsTime series of visits bucketed by hour
get_analytics_eventsTop events ranked by count
get_event_type_breakdownBreakdown by event type (page_view, custom, etc.)
get_events_timelineTime series for events, optionally filtered by name
get_property_breakdownBreak down by any of 21 properties: country, browser, device_type, operating_system, referrer_hostname, page_path, utm_source, utm_medium, utm_campaign, utm_term, utm_content, channel, language, region, city, and more
get_property_timelineTrend a property over time (pivot table)
get_aggregated_bucketsFlexible time-bucketed counts
get_general_statsSite-wide overview: visitors, page views, bounce rate, engagement rate, trends vs previous period
get_page_pathsTop pages ranked by sessions/views with average time
get_page_detailPer-page bounce rate, entry/exit rates, average time, referrers, countries
get_page_flowEntry pages with bounce rates, exit pages, drop-off points, page transitions

Example usage

Ask your AI assistant things like:

> How many unique visitors did my project get this week?
> What are the top pages by session count?
> Show me a breakdown of visitors by country
> What's the bounce rate for the /pricing page?
> Show active visitors right now
> What are the top referrer hostnames this month?

Authentication

The MCP server requires two environment variables:

VariableDescription
TEMPS_API_URLThe URL of your Temps instance (e.g., https://temps.example.com)
TEMPS_API_KEYAn API key with appropriate permissions

Creating an API Key

bunx @temps-sdk/cli api-keys create --name "mcp-server" --role admin

Permission Levels

RoleAccess
adminFull read/write access to all resources
deployerDeploy, manage environments, view logs
viewerRead-only access to all resources

Prompts

In addition to tools, the MCP server includes reusable prompt templates for common tasks.

add_react_analytics

A step-by-step guide to add Temps analytics to your React application. Supports multiple frameworks.

Arguments:

ArgumentTypeRequiredDescription
frameworkstringYesOne of: nextjs-app, nextjs-pages, vite, cra, remix
project_idnumberNoYour Temps project ID

When you use this prompt, the AI assistant will walk you through installing @temps-sdk/react-analytics, setting up the provider, and configuring features like custom events, session replay, engagement tracking, and Web Vitals.


Recent Fixes

Environment scaling and resource tools

scale_environment and update_environment_resources were sending PATCH requests but the backend expects PUT. Fixed to use the correct HTTP method. Resource fields (cpu_limit, memory_limit, cpu_request, memory_request) corrected from string to integer types (millicores for CPU, MB for memory).

Deployment logs

get_deployment_logs was silently failing because the logs endpoint returns raw JSONL text, not JSON. The tool now shows a pipeline stage summary table with status icons and durations, followed by parsed log content with level-appropriate formatting.

CLI documentation package name

CLI documentation corrected from @temps/cli to @temps-sdk/cli and bare temps commands to bunx @temps-sdk/cli.


Additional Resources

Was this page helpful?