# Houseruled developer docs: MCP server and API

Houseruled exposes its card game catalog, rules, house-rule variants, and community library to agents through a public MCP server and a small JSON API. Both are read-only and need no API key.

## MCP server

Endpoint: `/mcp` (Streamable HTTP, stateless, JSON responses). It supports MCP protocol 2026-07-28 (`server/discover`) and legacy clients that send `initialize` (2025-03-26 through 2025-11-25). Its MCP Server Card is at [/mcp/server-card](https://playhouseruled.pages.dev/mcp/server-card), and domain-level discovery is at [/.well-known/ai-catalog.json](https://playhouseruled.pages.dev/.well-known/ai-catalog.json).

### Tools

- `list_games`: every built-in game with player counts, a one-line summary, and whether it accepts free-text house rules.
- `get_game_rules`: goal, step-by-step rules, a tip, and the curated house-rule variants for one game.
- `search_community_games`: search player-invented games in the community library by text or base game.
- `get_community_game`: one saved community game with its full house rules and a play link.

### Connect a client

```json
{
  "mcpServers": {
    "houseruled": { "type": "http", "url": "https://playhouseruled.pages.dev/mcp" }
  }
}
```

## JSON API

- `GET /api/games?search=&base=&sort=plays|new`: list community games.
- `GET /api/games/{slug}`: one community game, or 404.
- Machine-readable spec: [/openapi.json](https://playhouseruled.pages.dev/openapi.json) (OpenAPI 3.1).

## Markdown for agents

Every public page answers `Accept: text/markdown` with a Markdown version (and `Vary: Accept`). Unknown paths return a Markdown 404. See [llms.txt](https://playhouseruled.pages.dev/llms.txt) for the full index.

## Limits and terms

Be gentle: the service is free and runs on a hobby budget. AI rule parsing is rate limited per IP. Write endpoints exist for the web client but are not part of the public agent surface. Questions go to [Contact](https://playhouseruled.pages.dev/contact).

---

[Home](https://playhouseruled.pages.dev) · [Games](https://playhouseruled.pages.dev/games) · [About](https://playhouseruled.pages.dev/about) · [Contact](https://playhouseruled.pages.dev/contact) · [Privacy](https://playhouseruled.pages.dev/privacy) · [Developers](https://playhouseruled.pages.dev/developers) · [llms.txt](https://playhouseruled.pages.dev/llms.txt)
