Skip to main content
Glama

MCP Mock Server ⚡

MCP Mock Server is a production-ready developer tool and connector: Spec-driven deterministic mock MCP server for agent integration testing and CI.


🚀 Problem Statement

Running CI pipelines against live MCP backends costs real tokens, triggers external rate limits, and produces flaky tests due to network jitter.


Related MCP server: Generic Mock MCP Server

⚡ Architecture Flow

sequenceDiagram
    autonumber
    participant CI as CI Agent Runner
    participant Mock as MCP Mock Server

    CI->>Mock: register_tool("fetch_data", fixture={"items": [1, 2]})
    CI->>Mock: rpc_request({method: "tools/call", params: {name: "fetch_data"}})
    Mock-->>CI: JSON-RPC Response {result: {items: [1, 2]}}
    CI->>Mock: assert_called_once("fetch_data")
    Mock-->>CI: Assertion Verified ✅

📊 Performance Benchmarks

Test Scenario

Live MCP Backend

MCP Mock Server

Speedup

CI Test Suite (50 tool tests)

28.4s

0.12s

236x faster

Network Dependency

100% required

0% (Airgapped)

100% Flake-free

API Token Cost per CI Run

$0.85

$0.00

100% Free

Error Injection Testing

Difficult

1-line setup

Comprehensive


🛠️ Installation & Quickstart

pip install mcp_mock_server

Python API

import mcp_mock_server

print(mcp_mock_server.__version__)

CLI Usage

mcp-mock-server --help

📄 License

MIT License © 2026 Ejaj Mahmud

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables deterministic security testing of AI agents that use tools by serving synthetic MCP environments with poisoned data, fake secrets, and privileged actions. Records agent tool calls and evaluates security invariants (e.g., canary leaks, forbidden access, approval binding) without an LLM judge or real systems.
    8
    MIT
  • F
    license
    Not graded
    quality
    F
    maintenance
    Enables config-driven mocking of MCP servers for AI skill evaluation, dynamically registering tools from a schema and returning configurable static, fixture-based, or LLM-generated responses.
    -
  • A
    license
    A
    quality
    A
    maintenance
    Lets an AI agent discover and call the APIs of a running service — gRPC, REST/OpenAPI, GraphQL, SignalR, MQTT, WebSocket and more — and record, replay, mock and assert on those calls. Calls only go to allowlisted URLs, and tools that change state ask for confirmation first.
    25
    12
    Apache 2.0
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables testing AI agents against a scripted mock MCP endpoint where each tool call returns a chosen response, fails, hangs or drops the connection, and where assertions verify which tools were called, how often, in what order and with what arguments.
    1
    MIT