mock-llm-mcp

mock-llm-mcp

MCP server to mock OpenAI, Anthropic, and Google Gemini responses for testing AI integrations without real API keys or token spend.

Category
Visit Server

README

mock-llm-mcp

MCP server for Mock LLM API — mock OpenAI, Anthropic, and Google Gemini responses for testing AI integrations. No real API keys or token spend required.

Installation

pip install mock-llm-mcp
# or
uvx mock-llm-mcp

Claude Desktop Configuration

{
  "mcpServers": {
    "mock-llm": {
      "command": "uvx",
      "args": ["mock-llm-mcp"],
      "env": {
        "MOCK_LLM_API_KEY": "your-key-here"
      }
    }
  }
}

No API key required for the free tier (500 calls/day). Get a key at rebaselabs.online for higher limits.

Tools

Tool Description
mock_quick Quickest mock response — provider-agnostic, auto-detects response type
mock_openai_chat Drop-in mock for POST /v1/chat/completions (OpenAI format)
mock_anthropic_message Drop-in mock for POST /v1/messages (Anthropic format)
mock_google_generate Drop-in mock for Google Gemini generateContent
mock_simulate_error Simulate specific LLM errors (rate limit, timeout, invalid key, etc.)
list_mock_models List available mock models for a provider

Use Cases

  • Test without token spend — verify your LLM integration code works without calling real APIs
  • CI/CD pipelines — deterministic, offline-safe tests using seed-based responses
  • Error handling — simulate rate limits, 500 errors, auth failures, context length exceeded
  • Frontend dev — build chat UIs without a real API key
  • Multi-provider testing — test your abstraction layer against OpenAI, Anthropic, and Google formats

Examples

Quick mock (no format needed)

mock_quick(prompt="Explain quantum computing", length="short")

Test OpenAI integration

mock_openai_chat(
    messages=[{"role": "user", "content": "Hello!"}],
    model="gpt-4o",
    response_type="text"
)

Simulate a rate limit error

mock_simulate_error(provider="anthropic", error_type="rate_limit")

Deterministic response with seed

mock_quick(prompt="Write a haiku", seed=42)

Response Control Headers

All mock tools support:

  • length: "short", "medium", "long", "xl", "random"
  • response_type: "auto", "text", "code", "json", "markdown", "list"
  • error: "none", "rate_limit", "server_error", "timeout", "invalid_key", "context_length", "content_filter"
  • delay_ms: 0–5000 — artificial latency
  • seed: integer — reproducible responses

Environment Variables

Variable Description Default
MOCK_LLM_API_KEY API key for authenticated access `` (free tier)
MOCK_LLM_API_URL Override API base URL https://mock-llm-api.rebaselabs.online

Part of the RebaseKit Agent Infrastructure Stack

Mock LLM MCP is part of the RebaseKit suite of agent-native APIs:

  • WeTask — web extraction & browser automation
  • CodeExec — sandboxed code execution
  • PII API — detect & mask sensitive data
  • DocParse — document parsing & OCR
  • DataTransform — data format conversion & querying
  • Mock LLM — mock any LLM provider for testing

"The internet was built for humans. RebaseKit makes it work for agents."

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
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

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