Back to Home
dwmkerr icon

mock-llm

Verified Safe

by dwmkerr

Overview

Provides a configurable mock API server compatible with OpenAI's API, the Model Context Protocol (MCP), and the Agent-to-Agent (A2A) Protocol, primarily for deterministic testing and development of AI applications.

Installation

Run Command
npm install -g mock-llm && mock-llm

Environment Variables

  • HOST
  • PORT
  • AGENT_CARD_HOST
  • AGENT_CARD_PORT

Security Notes

The server's core functionality for mocking responses and templating (using JMESPath) does not appear to use inherently dangerous functions like 'eval' or direct command execution with user input, making it safe for its intended purpose. Environment variables are used for host and port configuration, which is a good practice. However, the `/config` API endpoints (GET, POST, PATCH, DELETE) allow for runtime modification and reset of the server's rules and streaming configuration. If this mock server is deployed in an environment accessible by unauthorized parties without additional security layers (e.g., API Gateway authentication), an attacker could reconfigure the mock responses, potentially disrupting client testing or manipulating test data. This is a common pattern for mock servers and acceptable for local or isolated testing environments but poses a risk in shared or production-like setups without proper access controls.

Similar Servers

Stats

Interest Score26
Security Score8
Cost ClassLow
Stars1
Forks5
Last Update2026-01-06

Tags

mock-serveropenai-apiai-testingmcp-protocola2a-protocoldevelopment-tool