Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MOCKD_PORTNoMock server port4280
MOCKD_CONFIGNoConfig file path
MOCKD_ADMIN_PORTNoAdmin API port4290
MOCKD_HTTPS_PORTNoHTTPS port (0=disabled)0

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}
resources
{
  "subscribe": true,
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
manage_mock

Create, retrieve, update, delete, list, or toggle mock endpoints. Use 'action' to specify the operation. For list, optionally filter by type or enabled status. For get/update/delete/toggle, provide the mock ID. For create, provide type and protocol-specific configuration.

Examples: List: {"action":"list","type":"http"} Get: {"action":"get","id":"http_060bff782a1de15f"} Create: {"action":"create","type":"http","http":{"matcher":{"method":"GET","path":"/api/hello"},"response":{"statusCode":200,"body":"{"msg":"hello"}"}}} Update: {"action":"update","id":"http_060bff782a1de15f","http":{"response":{"statusCode":201}}} Delete: {"action":"delete","id":"http_060bff782a1de15f"} Toggle: {"action":"toggle","id":"http_060bff782a1de15f","enabled":false}

manage_context

View or switch the active admin server context. Use 'get' to see the current context and all available contexts. Use 'switch' to change which mockd server this session communicates with.

manage_workspace

List available workspaces or switch the active workspace. Workspaces isolate mock configurations. Use 'list' to see all workspaces, 'switch' to route subsequent operations to a specific workspace.

import_mocks

Import mocks from inline content. Supports OpenAPI, Postman, HAR, WireMock, cURL, and mockd YAML/JSON formats. Format is auto-detected if not specified. Use dryRun=true to preview without applying.

export_mocks

Export all current mocks as YAML or JSON configuration. Returns the full mock collection for backup, sharing, or version control.

get_server_status

Get server health, ports, and statistics. Use this FIRST when debugging connectivity or port issues. Combines health check, stats, and port information into a single response.

get_request_logs

Retrieve captured request/response logs. Filter by method, path, mock ID, or protocol. Use this to verify that expected API calls were made to the mock server.

clear_request_logs

Permanently remove all captured request/response logs. Use this for test isolation between test runs. This action cannot be undone.

get_chaos_config

Retrieve the current chaos fault injection configuration including latency, error rate, and bandwidth throttle settings. Returns the active chaos config and injection statistics. Use this to check what chaos rules are active before modifying them.

set_chaos_config

Configure chaos fault injection rules. For simple chaos: set latency ranges, error rates, or bandwidth throttling. For advanced stateful faults: pass raw rules with fault types like circuit_breaker, retry_after, progressive_degradation, or chunked_dribble. Pass enabled=false to disable all chaos. For pre-built configurations, use named profiles like "slow-api" or "flaky".

reset_chaos_stats

Reset chaos injection statistics counters to zero without changing the active chaos configuration. Use this to start fresh measurement after modifying chaos rules.

get_stateful_faults

Retrieve the status of all stateful chaos fault instances: circuit breakers (state, trip count, request count), retry-after trackers (limited/passed counts), and progressive degradation (current delay, request count, error count). Use this to monitor active fault state machines after configuring advanced chaos rules.

manage_circuit_breaker

Manually trip or reset a chaos circuit breaker by its state key. Circuit breaker keys follow the format "ruleIdx:faultIdx" (e.g., "0:0" for the first fault in the first rule). Use get_stateful_faults to discover active circuit breaker keys.

verify_mock

Check whether a mock was called the expected number of times. Returns pass/fail status, actual call count, and invocation details. Optionally assert with expected_count, at_least, or at_most parameters. Use this to assert your application is making the right API calls.

get_mock_invocations

List all recorded invocations (request/response pairs) for a specific mock. Shows method, path, headers, body, and timestamp for each call. Use this to debug what requests actually hit a mock.

reset_verification

Clear verification data (invocation records and counters) for a specific mock or all mocks. Use this to reset counters before running a new test scenario.

manage_state

Manage stateful mock resources — CRUD collections that persist data across requests. Use 'overview' to see all resources, 'add_resource' to create a new resource, 'list_items' to browse items in a resource, 'get_item' for a specific item, 'create_item' to add data, or 'reset' to restore seed data.

Examples: Overview: {"action":"overview"} Add resource:{"action":"add_resource","resource":"users","path":"/api/users"} List items: {"action":"list_items","resource":"users","limit":10} Get item: {"action":"get_item","resource":"users","item_id":"abc123"} Create item: {"action":"create_item","resource":"users","data":{"name":"Alice"}} Reset: {"action":"reset","resource":"users"}

manage_custom_operation

Manage custom operations on stateful resources. Use 'list' to see all operations, 'get' for details, 'register' to create new ones, 'delete' to remove, or 'execute' to run an operation with input data.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
Chaos ConfigurationActive chaos injection rules and statistics
Mock VerificationVerification status and invocations for a mock. Read mock://verification/{mockId} for a specific mock.
Request LogsCaptured HTTP request/response logs
Server ConfigurationCurrent mockd server configuration
Current ContextActive context (admin server connection) and available contexts

Latest Blog Posts

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/getmockd/mockd'

If you have feedback or need assistance with the MCP directory API, please join our Discord server