mock-llm-mcp
OfficialAllows mocking Google Gemini generateContent API responses for testing without actual API calls.
Allows mocking OpenAI chat completions API responses for testing without actual API calls.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mock-llm-mcpmock a quick response to 'hello world'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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-mcpRelated MCP server: mcp-consultant
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 |
| Quickest mock response — provider-agnostic, auto-detects response type |
| Drop-in mock for |
| Drop-in mock for |
| Drop-in mock for Google Gemini |
| Simulate specific LLM errors (rate limit, timeout, invalid key, etc.) |
| 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 latencyseed: integer — reproducible responses
Environment Variables
Variable | Description | Default |
| API key for authenticated access | `` (free tier) |
| Override API base URL |
|
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."
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceA mock MCP server for testing MCP client implementations and development workflows. Supports tools, prompts, and resources across multiple transport protocols (stdio, HTTP, SSE).Last updated21MIT
- Flicense-qualityDmaintenanceMCP server that interfaces with Gemini and OpenAI CLI tools to enable AI model interactions. It provides a bridge to external AI CLIs with predefined model configurations.Last updated
- Flicense-qualityDmaintenanceLocal MCP server that exposes fixed tools for GPT, Claude, and Gemini while routing to any OpenAI-compatible chat completions backend with independent configuration per target.Last updated1
- AlicenseAqualityCmaintenanceAn MCP server for interacting with MockServer, enabling AI assistants to create mock HTTP expectations, verify requests, clear state, and manage MockServer instances programmatically.Last updated6491MIT
Related MCP Connectors
Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/rebaselabs-framework/mock-llm-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server