Skip to main content
Glama
BrianGTRxx

api-mock-sandbox

by BrianGTRxx
README.md
# API Mock Sandbox

An MCP server that gives Claude two tools for spinning up a local, persistent REST mock API on demand: describe the data you need in plain language, get a working CRUD backend a few seconds later, with data that survives restarts because it's written to disk instead of kept in memory.

Full documentation, in English and Spanish, lives in [`docs/`](./docs):

- [English guide](./docs/en/README.md) · [security](./docs/en/SECURITY.md) · [limitations](./docs/en/LIMITATIONS.md)
- [Guía en español](./docs/es/README.md) · [seguridad](./docs/es/SEGURIDAD.md) · [limitaciones](./docs/es/LIMITACIONES.md)

## Quick start

```bash
npm install
npm run build
```

Then register it in `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "api-mock-sandbox": {
      "command": "node",
      "args": ["ABSOLUTE_PATH_TO_PROJECT/dist/index.js"]
    }
  }
}
```

Restart Claude Desktop, then ask it to set up a mock API for whatever you're building. See the full guide for tool parameters, the REST endpoint reference, and troubleshooting.

**Before you plan a project around Claude Artifacts calling this API:** they can't. Published Artifacts run in a CSP sandbox that silently blocks requests to `localhost`. Read [`docs/en/LIMITATIONS.md`](./docs/en/LIMITATIONS.md) for why, and for the local test console (`public/index.html`, served at `http://localhost:<port>/`) that works instead.

## License

[MIT](./LICENSE)

---

Built with [Claude Code](https://claude.com/claude-code).

TDQS

A4.6/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct roles: one creates/reconfigures the mock API and the other queries its runtime status. There is no overlap or ambiguity between them.

Naming Consistency5/5

Both tool names follow a consistent verb_noun pattern using snake_case: setup_mock_api and get_mock_api_status. The style is uniform and predictable.

Tool Count4/5

With only two tools, the surface is minimal but arguably appropriate for a focused mock server utility. It feels slightly thin for a full lifecycle but is not unreasonable.

Completeness3/5

The set covers setup and status checking, but lacks obvious lifecycle operations like stopping/resetting the server or clearing collections. Agents can work around this, but the surface leaves gaps.

Maintenance

ActivityMaintained
ResponsivenessNo issues