CentralOps MCP Server

CentralOps MCP Server

Exposes a curated subset of the CentralOps HTTP API as typed tools for Claude Code, enabling drift triage, mapping edits, backfill jobs, and quarantine reprocess without raw HTTP calls.

Category
Visit Server

README

CentralOps MCP Server

Model Context Protocol (MCP) server that exposes a curated subset of the CentralOps HTTP API as typed tools, so internal developers can drive drift triage, mapping edits, backfill jobs and quarantine reprocess from Claude Code without writing raw HTTP calls.

The server runs as a stdio MCP transport inside a container — Claude Code spawns docker run --rm -i ... per session, no extra service is added to the CentralOps compose stack, no port is exposed.

Status

Stable for internal use. Authenticates with a CentralOps Personal Access Token (PAT) or Service Account token issued at /settings/tokens — the same credential model used by external integrations. Cookie/session auth was removed in Fase 2 (commit history under feat(pat): …).

Tools

25 tools, grouped by what they let the agent see or do.

Vendor-side visibility (read)

How the vendor is connected, healthy and behaving.

Tool Purpose
list_integrations Vendors connected, status, last_error, capabilities.
get_integration Full configuration of one integration (secrets masked unless permitted).
get_integration_health Live health check (manager + indexer for Wazuh, OAuth for Sophos…).
get_integration_overview Aggregated dashboard: counters, recent activity, per-stream summary.
list_integration_alerts Alerts already collected and normalized for an integration.
list_supported_platforms Platforms the backend can connect to.

Collection pipeline (read)

What is being polled and from where.

Tool Purpose
list_collector_vendors (platform, stream) pairs the collector knows how to poll.
list_collection_state Per-stream cursor, last_success_at, last_error, consecutive_failures.
get_collector_summary Global view across all integrations the user can see.

Raw payloads & drift (read — the "what is the vendor sending?" set)

Tool Purpose
get_mapping_samples Raw events from the sample reservoir for a (vendor, event_type) — the actual JSON the collector received.
get_quarantine_event One quarantined event with its full raw_payload — useful when a specific shape broke a mapping.
list_quarantine Quarantined events, filterable by vendor/integration/error_kind.
list_drift_fields Unknown raw fields the drift sampler observed but no mapping consumes.
discover_mapping_fields Fields already discovered for this mapping's vendor/event_type — JMESPath autocomplete source.

Mappings catalog & history (read)

Tool Purpose
list_mappings Catalog of mapping definitions.
get_mapping Definition + version history for a single mapping.
diff_mapping_versions Structured diff between two versions of a mapping.
list_mapping_audit Who changed what, when.

Backfill (read)

Tool Purpose
list_backfill_jobs Jobs for an integration.
get_backfill_job One job snapshot.

Mutating — safe

Tool Purpose
dry_run_mapping Validate rules against the sample reservoir. Issues an ack_token when called with definition_id.
request_backfill Enqueue a backfill window (max 90 days). Returns job_id.
reprocess_quarantine Reprocess up to 50 quarantined events. Backend is idempotent.

Destructive — gated

Tool Purpose
commit_mapping Promote a new mapping version. Requires a fresh ack_token from dry_run_mapping for the same definition_id and rules.

Helper

Tool Purpose
wait_for_backfill_job Server-side poll until terminal state. Avoids LLM polling loops.

commit_mapping is the only destructive tool. It requires an ack_token issued by dry_run_mapping for the same definition_id and rules; the token expires in 5 minutes and is single-use. The CentralOps backend re-validates and re-runs the dry-run on commit, so this is defense-in-depth, not the security boundary.

Authentication

The MCP server sends Authorization: Bearer <token> on every request. Generate the token in CentralOps:

  1. Log in to CentralOps as the user that should "own" the MCP traffic.
  2. Go to Settings → API Tokens (/settings/tokens).
  3. Click Criar token, give it a name (e.g. claude-code-mcp), pick an expiration (or "Nunca" for a stable dev workflow), and copy the copsk_… value once — the UI will not show it again.
  4. Optional: select scopes. Without scopes the token inherits the full permission set of the user. For an MCP that only needs to read drift / mappings, restrict to e.g. mappings.read, quarantine.read, integrations.read, audit.read.
  5. Export the token in your shell or paste it into the MCP config below.

Tokens are revocable individually from the same page — losing the laptop or ending the contract no longer means rotating a shared cookie.

A X-Client: centralops-mcp/<version> header is sent on every request so the backend audit log can distinguish MCP traffic from UI traffic.

When the token is rejected the tool returns a 401 with a hint to regenerate at /settings/tokens. When the token is valid but lacks the scope a tool requires, the response is 403 with a permission hint.

Configuration

Env var Default Required Notes
CENTRALOPS_BASE_URL http://localhost:3000/api recommended Trailing /api is part of the URL.
CENTRALOPS_API_TOKEN yes PAT or Service Account token starting with copsk_. Generated at <base_url>/settings/tokens.
CENTRALOPS_TIMEOUT_S 30 no Per-request timeout.
CENTRALOPS_VERIFY_TLS 1 no Set to 0 only for self-signed dev environments.
CENTRALOPS_LOG_LEVEL WARNING no DEBUG to trace requests on stderr.

Build

docker build -t centralops-mcp:dev mcp/

Use from Claude Code

Add to .mcp.json (project) or your Claude Code user settings:

{
  "mcpServers": {
    "centralops": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-e", "CENTRALOPS_BASE_URL",
        "-e", "CENTRALOPS_API_TOKEN",
        "centralops-mcp:dev"
      ],
      "env": {
        "CENTRALOPS_BASE_URL": "https://centralops.local/api",
        "CENTRALOPS_API_TOKEN": "copsk_..."
      }
    }
  }
}

Then restart Claude Code and run /mcp to confirm the tools are listed.

The token is sensitive — do not commit .mcp.json with a real value. Prefer reading from your shell, e.g. CENTRALOPS_API_TOKEN=$(pbpaste), or store it in a secret manager (1Password, macOS Keychain, etc).

Local development

cd mcp
python -m venv .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/pip install pytest pytest-asyncio
.venv/bin/pytest

Smoke test the image

The MCP handshake requires initializenotifications/initializedtools/list. The trailing sleep keeps stdin open long enough for the server to emit the second response before EOF closes the pipe:

{
  printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"smoke","version":"0"}}}'
  printf '%s\n' '{"jsonrpc":"2.0","method":"notifications/initialized"}'
  printf '%s\n' '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
  sleep 2
} | docker run --rm -i \
      -e CENTRALOPS_BASE_URL="http://localhost:3000/api" \
      -e CENTRALOPS_API_TOKEN="copsk_..." \
      centralops-mcp:dev

You should see two JSON-RPC responses; the second contains all 11 tools with their schemas.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured