Skip to main content
Glama

mcp-ops-toolkit

30-Minute Production Boilerplate for Node.js + TypeScript MCP Servers (stdio + HTTP/SSE)
Connect Claude Code, Cursor, and custom AI agents to external REST/GraphQL metrics APIs, structured Google Sheets / Webhook sinks, and Slack operational alerts — with zero-secret indirection, exponential-backoff retries, SSRF guards, and Docker health checks built in.

Node.js >= 20 TypeScript MCP SDK License: MIT


Architecture

flowchart LR
    Agent["AI Agent<br/>(Claude Code / Cursor / Custom)"]
    Agent -->|"stdio (local) or<br/>Streamable HTTP /mcp &amp; /sse"| Server["mcp-ops-toolkit<br/>(Node.js + TypeScript + Zod)"]

    Server --> T1["Tool 1: fetch_external_api_metrics<br/>REST &amp; GraphQL · Timeout · Backoff · SSRF Guard"]
    Server --> T2["Tool 2: append_structured_sheet_row<br/>Google Sheets API v4 (RS256 JWT) or Webhook"]
    Server --> T3["Tool 3: send_ops_alert<br/>Slack Block Kit · Severity · Dedupe"]

    T1 --> APIs["Financial / Ads / SaaS APIs"]
    T2 --> Sheets["Google Sheets / n8n Webhook"]
    T3 --> Slack["Slack Ops Channel"]

Why This Boilerplate Exists

Most demo MCP servers omit production fundamentals. mcp-ops-toolkit ships ready for real operational workflows from minute one:

  • Zero-Secret Context Hygiene: Agents pass environment variable names (authEnvVar, webhookEnvVar), never raw API keys.

  • Resilient HTTP Engine: Native fetch with AbortController timeouts, exponential backoff + jitter, and Retry-After handling on 408/429/5xx.

  • SSRF Protection by Default: Plain HTTP and private/cloud-metadata IP ranges (169.254.169.254, RFC1918, loopback) are blocked unless ALLOW_PRIVATE_NETWORKS=true is explicitly enabled.

  • Zero-Dependency Google Sheets Auth: Native node:crypto RS256 Service Account JWT signing (no bloated SDKs) plus webhook fallback for n8n / Make.

  • Dual Transport + Container Ready: Runs locally over stdio or remotely over Streamable HTTP (/mcp) + SSE (/sse) with GET /api/health and optional constant-time Bearer token auth (MCP_HTTP_AUTH_TOKEN).


Related MCP server: AgentSentinel MCP Gateway

Quick Start (< 2 Minutes)

1. Install, Build & Test

git clone https://github.com/gabrieldave/mcp-ops-toolkit.git
cd mcp-ops-toolkit
cp .env.example .env
npm install
npm run build
npm test

2. Run in stdio Mode (Claude Code / Cursor)

npm start

3. Run in HTTP / SSE Mode (Docker / VPS / Remote Agents)

MCP_TRANSPORT=http PORT=3000 npm start
# Health check:
curl http://localhost:3000/api/health

4. Run with Docker (Production Multi-Stage Image)

docker build -t mcp-ops-toolkit .
docker run --rm -p 3000:3000 --env-file .env mcp-ops-toolkit

Connecting to Claude Code & Cursor

Cursor (.cursor/mcp.json) or Claude Desktop (stdio)

{
  "mcpServers": {
    "mcp-ops-toolkit": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-ops-toolkit/dist/index.js"],
      "env": {
        "METRICS_API_TOKEN": "YOUR_METRICS_TOKEN",
        "OPS_SHEET_WEBHOOK_URL": "https://your-n8n-host/webhook/sheet-sink",
        "SLACK_WEBHOOK_URL": "https://hooks.slack.com/services/T000/B000/XXX"
      }
    }
  }
}

Remote Streamable HTTP Client (/mcp)

{
  "mcpServers": {
    "mcp-ops-toolkit-remote": {
      "url": "https://your-mcp-host.example.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_MCP_HTTP_AUTH_TOKEN"
      }
    }
  }
}

See SKILL.md for drop-in agent instructions covering dry-run validation, auth indirection, and end-to-end tool chaining.


Tool Reference

Tool

Purpose

Key Capabilities

fetch_external_api_metrics

Pull metrics from financial, SaaS, or ads APIs

mode: "rest" | "graphql", authEnvVar indirection, extractPath dot-notation slicing, timeout + exponential backoff, dryRun

append_structured_sheet_row

Log validated JSON rows from call transcripts or reports

destination: "google_sheets" | "webhook", deterministic 7-column schema, native RS256 Google JWT auth, idempotencyKey, dryRun

send_ops_alert

Dispatch structured incident & KPI alerts to Slack

Slack Block Kit formatting, severity (info/success/warning/critical), structured metric fields, actionUrl, dedupeKey, dryRun


Security & Verification

npm run typecheck    # Strict TypeScript check
npm test             # Unit + live mock HTTP integration tests
npm run secret-scan  # Fails if any credential pattern exists in tracked sources

Available Tools

3 tools
append_structured_sheet_rowAppend Structured Sheet Row (Google Sheets / Webhook)A

Validates structured JSON from call transcripts, financial reports, or ops pipelines and appends a deterministic row to Google Sheets API v4 or a downstream webhook (n8n / Make / REST).

Inputs: source (required), summary (required), tags, dryRun, +9 more.

fetch_external_api_metricsFetch External API Metrics (REST / GraphQL)B
Read-onlyIdempotent

Typed REST/GraphQL client with timeout, exponential-backoff retries, SSRF protection, and env-var auth indirection for financial, SaaS, and advertising metrics.

Inputs: url (required), body, mode, dryRun, +11 more.

send_ops_alertSend Structured Ops Alert (Slack)B

Dispatches structured Slack Block Kit operational alerts with severity badges, KPI fields, runbook links, and exponential-backoff retry.

Inputs: title (required), message (required), dryRun, metrics, +6 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 3 tools

    Disambiguation4/5

    Each tool maps to a distinct pipeline stage: fetch (read external metrics), append (persist a row), and alert (notify via Slack). The only mild overlap is that fetch_external_api_metrics and append_structured_sheet_row both touch external systems, but the read-vs-write verbs make selection clear.

    Naming Consistency5/5

    All three names follow a consistent snake_case verb_noun_object pattern (fetch_/append_/send_ plus a scoped noun). No mixed conventions or casing deviations.

    Tool Count3/5

    Three tools is thin for a toolkit that spans ingestion, persistence, and alerting; it covers a single happy-path pipeline. Each tool is substantive, but there is little room for reading back or managing configurations.

    Completeness4/5

    The fetch → append → alert pipeline is closed for the write path, but there is no way to read or update sheet rows, query existing metrics, or manage alert routing. These are minor gaps agents could work around but limit lifecycle coverage.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables secure exposure of internal tools to LLM clients with API-key authentication, tenant isolation, per-tool guardrails, PII scrubbing, rate limiting, audit logging, and telemetry over stdio and HTTP/SSE.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents to run shell commands, perform sandboxed file operations, and make HTTP requests through zero-trust guards that block command injection, path traversal, and SSRF while redacting secrets from inputs and outputs. Circuit breakers, per-session rate limits, and an append-only audit ledger prevent runaway loops, excessive token spend, and provide post-hoc traceability.
      5
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables developers to expose product operations as model-callable tools over stdio or Streamable HTTP with bearer-token auth, per-client rate limits, host allow-listing, structured call logging, and a swappable backend for secure, testable deployments.
      3
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI agents to run 700+ backend actions across data, auth and RBAC, payments and wallets, CRM, hosting, RAG, bots, scheduling, and automation through a single execute tool, remotely or via a stdio bridge.
      2
      1
      MIT