The Model Context Protocol (MCP) is rapidly becoming the standard way to connect AI tools to external data sources and services. IBM has released a preview of the API Connect Analytics MCP Server, which lets AI assistants and agents query your API Connect analytics data directly — no manual report generation, no custom API wrappers. If you’re building AI-powered workflows that need API programme data, this is a compelling integration point.

In this article, I’ll walk you through what the MCP server is, how to set it up, how to connect it to a Provider Organisation, and what queries you can run.

Table of Contents

  1. What Is the MCP Server?
  2. Architecture Overview
  3. Prerequisites
  4. Installation
  5. Configuration
  6. Connecting to API Connect
  7. Available Queries
  8. Example Sessions
  9. Preview Caveats
  10. Uninstalling

What Is the MCP Server?

The API Connect Analytics MCP Server is a standalone service that implements the Model Context Protocol server interface. MCP, originally developed by Anthropic, defines a standard way for AI applications to connect to external tools and data sources. When an MCP server is running, AI assistants that support MCP can discover its tools and call them as part of a conversation.

The API Connect Analytics MCP Server exposes your API Connect analytics data as MCP tools — things like:

  • List Provider Organisations
  • Query API usage metrics
  • Get top applications by traffic
  • Retrieve plan performance data
  • Fetch error distributions

This means you can ask an AI assistant (like Claude, or any MCP-compatible AI tool) natural language questions about your API programme and get structured answers pulled directly from live API Connect data.

Architecture Overview

┌─────────────────┐
│  AI Assistant   │  (Claude Desktop, Cursor, etc.)
│  (MCP Client)  │
└────────┬────────┘
         │ stdio / HTTP
         │ (MCP protocol)
┌────────▼────────┐
│  APIC Analytics  │  ← This is what you install
│  MCP Server      │
└────────┬────────┘
         │ REST API
         │ (HTTPS)
┌────────▼────────┐
│  API Connect    │
│  Management     │
│  Server         │
└─────────────────┘

Prerequisites

Before installing the MCP server, ensure you have:

  1. API Connect v12.1.1.0 or later (the MCP server communicates with the API Connect REST API)
  2. Node.js 18+ (for running the server)
  3. An API Connect account with permissions to access analytics data
  4. An MCP-compatible AI tool (e.g., Claude Desktop, a custom MCP client)

Installation

The MCP server is distributed as an npm package:

# Install globally
npm install -g @ibm/apic-analytics-mcp-server

# Verify the installation
apic-analytics-mcp-server --version

Note: As this is a preview release, the exact package name and distribution details may change. Check IBM’s API Connect Labs page or npm for the latest package information.

Configuration

The MCP server uses a configuration file to know how to connect to API Connect. Create a config file:

# Default location: ~/.config/apic-analytics-mcp/config.json
mkdir -p ~/.config/apic-analytics-mcp

Configuration File

{
  "apic": {
    "management_server": "https://mgmt-api.example.com",
    "port": 3000,
    "auth": {
      "type": "bearer",
      "token": "YOUR_API_CONNECT_BEARER_TOKEN"
    }
  },
  "mcp": {
    "transport": "stdio",
    "cors": {
      "enabled": false
    }
  },
  "logging": {
    "level": "info"
  }
}

Getting an API Connect Bearer Token

Generate a long-lived API token from the API Connect API Manager:

  1. Log into API Manager
  2. Navigate to SettingsUsersAPI Keys
  3. Create a new API key with Analytics read permissions
  4. Use the generated token in your config file

Security Note: Treat API keys like passwords. Don’t commit them to source control. Use environment variables or a secrets manager instead.

Using Environment Variables

You can also use environment variables, which is better for security:

export APIC_MANAGEMENT_SERVER="https://mgmt-api.example.com"
export APIC_BEARER_TOKEN="your-api-key-here"

Connecting to API Connect

Start the MCP server:

# If using the default config location
apic-analytics-mcp-server

# Or with explicit config path
apic-analytics-mcp-server --config /path/to/config.json

# Or with environment variables
APIC_MANAGEMENT_SERVER="https://mgmt-api.example.com" \
APIC_BEARER_TOKEN="your-token" \
apic-analytics-mcp-server

The server will start and listen for MCP protocol messages. If using stdio transport (for Claude Desktop), it will run in the foreground.

Configuring Claude Desktop

Add the MCP server to your Claude Desktop configuration:

File: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) File: ~/.config/Claude/claude_desktop_config.json (Linux)

{
  "mcpServers": {
    "apic-analytics": {
      "command": "apic-analytics-mcp-server",
      "args": ["--config", "/path/to/config.json"],
      "env": {
        "APIC_MANAGEMENT_SERVER": "https://mgmt-api.example.com",
        "APIC_BEARER_TOKEN": "your-api-key-here"
      }
    }
  }
}

Restart Claude Desktop after editing the config.

Available Queries

Once connected, the MCP server exposes the following tools:

apic_list_orgs

Lists all Provider Organisations accessible to the authenticated user.

{
  "name": "apic_list_orgs",
  "description": "List all Provider Organisations",
  "parameters": {}
}

apic_list_catalogs

Lists all Catalogs in a Provider Organisation.

{
  "name": "apic_list_catalogs",
  "description": "List all Catalogs in a Provider Organisation",
  "parameters": {
    "org_id": "string (required)"
  }
}

apic_get_api_usage

Gets API usage metrics for a specified time range.

{
  "name": "apic_get_api_usage",
  "description": "Get API usage metrics",
  "parameters": {
    "org_id": "string (required)",
    "catalog_id": "string (required)",
    "time_range": "string (hourly|daily|weekly|monthly)",
    "from": "string (ISO 8601 date)",
    "to": "string (ISO 8601 date)"
  }
}

apic_get_top_applications

Gets top applications by traffic volume.

{
  "name": "apic_get_top_applications",
  "description": "Get top applications by traffic",
  "parameters": {
    "org_id": "string (required)",
    "catalog_id": "string (required)",
    "limit": "number (default 10)"
  }
}

apic_get_error_distribution

Gets error distribution across APIs.

{
  "name": "apic_get_error_distribution",
  "description": "Get error distribution",
  "parameters": {
    "org_id": "string (required)",
    "catalog_id": "string (required)",
    "time_range": "string (required)"
  }
}

apic_get_plan_performance

Gets plan performance metrics.

{
  "name": "apic_get_plan_performance",
  "description": "Get plan performance metrics",
  "parameters": {
    "org_id": "string (required)",
    "catalog_id": "string (required)"
  }
}

Example Sessions

Example 1: “What were our top 5 APIs by traffic last week?”

In your AI assistant (Claude, etc.), you might ask:

What were the top 5 APIs by traffic volume in the last 7 days?

The AI, using the apic_get_api_usage tool, retrieves the data and responds:

Based on the last 7 days of API Connect analytics:

Top 5 APIs by traffic:
1. /forex/rates       — 2.1M calls
2. /payments/checkout — 1.8M calls
3. /accounts/balance  — 1.2M calls
4. /orders/history    — 890K calls
5. /users/profile     — 654K calls

Example 2: “Are there any APIs with elevated error rates?”

Any APIs with error rates above 1% right now?

The AI calls apic_get_error_distribution and responds with a summary of any APIs exceeding the threshold.

Preview Caveats

As this is a preview release, be aware of the following:

  • Limited tool set: The initial release covers analytics query tools only. CRUD operations on APIs, products, and subscriptions are not yet available via MCP.
  • No streaming: The preview uses request/response only. Streaming responses for long-running queries are not supported.
  • Authentication: Only long-lived API key (bearer token) auth is supported in the preview. OAuth 2.0 / OIDC integration is planned.
  • Rate limiting: The MCP server makes real API Connect REST API calls. Be mindful of rate limits on the API Connect management server.
  • No Windows support: The initial preview may not support Windows. Check the release notes.
  • MCP spec changes: As MCP evolves, the server may need updates to track the protocol.
  • IBM support: Preview releases are typically not covered by standard IBM support contracts. Use in production at your own risk.

Uninstalling

To remove the MCP server:

# Remove the npm package
npm uninstall -g @ibm/apic-analytics-mcp-server

# Remove config directory
rm -rf ~/.config/apic-analytics-mcp

Also remove the MCP server entry from your Claude Desktop config file.

Summary

The API Connect Analytics MCP Server (preview) is an exciting step toward AI-native API operations. The ability to ask natural language questions about your API programme and get answers from live analytics data — without writing any API call code — opens up powerful workflows for operators, programme managers, and AI agents alike.

The preview is limited, but it’s a strong foundation. If you’re building AI-powered operations workflows, it’s worth evaluating now and watching for the production release.