Skip to main content
Glama
DiscreteTom

Mock MCP Server

by DiscreteTom
README.md
# Mock MCP Server

[![PyPI - Version](https://img.shields.io/pypi/v/mock-mcp-server)](https://pypi.org/project/mock-mcp-server/)

A mock MCP server for testing MCP client implementations and development workflows.

Support tools, prompts and resources.

## Usage

### Full CLI Usage

<details>

<summary><code>uvx mock-mcp-server --help</code></summary>

```sh
 Usage: mock-mcp-server [OPTIONS]

 Mock MCP Server for testing.

╭─ Options ───────────────────────────────────────────────────────────────────────────╮
│ --transport  [stdio|http|sse|streamable-http]  Transport type [default: stdio]      │
│ --host       TEXT                              Host to bind to [default: 127.0.0.1] │
│ --port       INTEGER                           Port to bind to [default: 8000]      │
│ --version                                      Show version and exit                │
│ --help                                         Show this message and exit.          │
╰─────────────────────────────────────────────────────────────────────────────────────╯
```

</details>

### Stdio

Add to your MCP client configuration:

[![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=mock-stdio&config=eyJjb21tYW5kIjoidXZ4IG1vY2stbWNwLXNlcnZlciJ9)
[![Add to Kiro](https://kiro.dev/images/add-to-kiro.svg)](https://kiro.dev/launch/mcp/add?name=mock-stdio&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22mock-mcp-server%22%5D%7D)

```json
{
  "mcpServers": {
    "mock-stdio": {
      "command": "uvx",
      "args": ["mock-mcp-server"]
    }
  }
}
```

### Streamable HTTP

Start server first:

```sh
uvx mock-mcp-server --transport http --host 127.0.0.1 --port 7788
```

Then configure your MCP client:

[![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=mock-streamable-http&config=eyJ1cmwiOiJodHRwOi8vMTI3LjAuMC4xOjc3ODgvbWNwIn0%3D)
[![Add to Kiro](https://kiro.dev/images/add-to-kiro.svg)](https://kiro.dev/launch/mcp/add?name=mock-streamable-http&config=%7B%22url%22%3A%22http%3A%2F%2F127.0.0.1%3A7788%2Fmcp%22%7D)

```json
{
  "mcpServers": {
    "mock-streamable-http": {
      "url": "http://127.0.0.1:7788/mcp"
    }
  }
}
```

### SSE

Start server first:

```sh
uvx mock-mcp-server --transport sse --host 127.0.0.1 --port 7789
```

Then configure your MCP client:

[![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=mock-sse&config=eyJ1cmwiOiJodHRwOi8vMTI3LjAuMC4xOjc3ODkvc3NlIn0%3D)
[![Add to Kiro](https://kiro.dev/images/add-to-kiro.svg)](https://kiro.dev/launch/mcp/add?name=mock-sse&config=%7B%22url%22%3A%22http%3A%2F%2F127.0.0.1%3A7789%2Fsse%22%7D)

```json
{
  "mcpServers": {
    "mock-sse": {
      "url": "http://127.0.0.1:7789/sse"
    }
  }
}
```

## [CHANGELOG](./CHANGELOG.md)

TDQS

B3.2/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion or overlap between tools. The tool 'mock_echo' has a single, clear purpose of echoing messages, making it perfectly distinct.

Naming Consistency5/5

The tool name 'mock_echo' follows a consistent verb_noun pattern (echo as the verb, implied message as the noun). Since there is only one tool, naming consistency is inherently perfect with no deviations to assess.

Tool Count2/5

A single tool is generally too few for most server purposes, as it limits functionality and suggests a trivial or incomplete scope. For a server named 'Mock MCP Server', which implies broader mocking capabilities, one tool feels insufficient and under-scoped.

Completeness2/5

The server's purpose is unclear from the name 'Mock MCP Server', but a single echo tool suggests severe incompleteness. It lacks coverage for common mocking operations like simulating data, errors, or varied responses, creating significant gaps that could cause agent failures in typical use cases.

Maintenance

ActivityInactive
ResponsivenessNo issues