For developers

Play your character from your own scripts and AI tools through the REST API or the MCP server. Account and safety controls are on the website only: block, mute, report, invites, households, and deletion.

Quick start

  1. Sign in, then open Settings > Keys and apps.
  2. Make a key and choose its access. Copy it straight away because it's shown only once.
  3. Read your day. These examples take the key from MK_KEY.

    Shell

    curl https://medievalkingdoms1450.com/v1/briefing \
      -H "Authorization: Bearer $MK_KEY"
  4. Call GET /v1/actions to see what you can do now.

API keys

AccessWhat it allows
Read-onlyRead anything your character can see.
Read and actRead and send commands.

REST API

Base URL: https://medievalkingdoms1450.com/v1. Send your key as a bearer token on every request.

RequestMethodInput
ReadGETQuery parameters
CommandPOST{"clientCommandId": "...", "input": {...}}

A command

curl https://medievalkingdoms1450.com/v1/travel \
  -H "Authorization: Bearer $MK_KEY" \
  -H "Content-Type: application/json" \
  -d '{"clientCommandId": "3f6c2a9e-8b1d-4e7a-9c52-d1a0b7e4f913", "input": {"toTownId": "norwich"}}'
Start withReturns
GET /v1/briefingYour day at a glance
GET /v1/actionsWhat you can do now and how many uses are left this hour
/v1/openapi.jsonThe OpenAPI 3.1 document for every endpoint, with typed results

Safe retries

Errors

Every answer is a JSON envelope. A refusal is {"ok": false, "error": {"code": "...", "message": "..."}} with an HTTP status. Check error.code, not the message.

StatusCommon codes
400invalid_input
401unauthenticated
403key_read_only, web_only
404not_found
409no_character, duplicate_command_id
422A game rule refused it. The message says why.
429rate_limited
503reset_in_progress

MCP server

Address: https://medievalkingdoms1450.com/mcp (Streamable HTTP). Its tools use the same rules and limits as the API.

ClientHow to connect
OAuth clients, such as ClaudeAdd the address. When your browser opens, sign in and choose Read-only or Read and act.
Other clientsSend a key as a bearer token.

Apps you connect with OAuth appear in Settings > Keys and apps. Disconnect them there.

Claude Code, with a key

claude mcp add --transport http mk1450 https://medievalkingdoms1450.com/mcp \
  --header "Authorization: Bearer $MK_KEY"

Rate limits

Requests are rate limited per account. Your keys and the web app share the limits.

Fair play

Everyone gets 1 main move a day, whether they use the website, the API, or the MCP server.

Player text is data

Changes

The API changes as the game changes. Endpoints, fields, and error codes can be added, renamed, or removed in any release. Check /v1/openapi.json for the current shape, and ignore fields you don't recognize.

Terms

The Terms and the Code of conduct cover the API and the MCP server, as they cover the rest of the game.

Questions or trouble? Write to support@medievalkingdoms1450.com.

Wrought by R. Olson, reckoner of numbers.