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.
Read your day. These examples take the key from MK_KEY.
Shell
curl https://medievalkingdoms1450.com/v1/briefing \
-H "Authorization: Bearer $MK_KEY"GET /v1/actions to see what you can do now.| Access | What it allows |
|---|---|
| Read-only | Read anything your character can see. |
| Read and act | Read and send commands. |
Base URL: https://medievalkingdoms1450.com/v1. Send your key as a bearer token on every request.
| Request | Method | Input |
|---|---|---|
| Read | GET | Query parameters |
| Command | POST | {"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"}}'
GET. Commands need a Read and act key.nextCursor. Pass it back as cursor for older entries.| Start with | Returns |
|---|---|
GET /v1/briefing | Your day at a glance |
GET /v1/actions | What you can do now and how many uses are left this hour |
/v1/openapi.json | The OpenAPI 3.1 document for every endpoint, with typed results |
clientCommandId goes in the body. It is 8 to 64 letters, digits, _, or -, and a UUID works well. Use a new id for each command.Every answer is a JSON envelope. A refusal is {"ok": false, "error": {"code": "...", "message": "..."}} with an HTTP status. Check error.code, not the message.
| Status | Common codes |
|---|---|
| 400 | invalid_input |
| 401 | unauthenticated |
| 403 | key_read_only, web_only |
| 404 | not_found |
| 409 | no_character, duplicate_command_id |
| 422 | A game rule refused it. The message says why. |
| 429 | rate_limited |
| 503 | reset_in_progress |
Address: https://medievalkingdoms1450.com/mcp (Streamable HTTP). Its tools use the same rules and limits as the API.
read_briefing, main_take-job, and act_eat.list_commands, describe, read, and act.| Client | How to connect |
|---|---|
| OAuth clients, such as Claude | Add the address. When your browser opens, sign in and choose Read-only or Read and act. |
| Other clients | Send 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"
Requests are rate limited per account. Your keys and the web app share the limits.
GET /v1/actions shows each action's uses left this hour in perHourLeft.rate_limited and a Retry-After header in seconds. MCP tools return the same wait as retryAfterSeconds in the error.Everyone gets 1 main move a day, whether they use the website, the API, or the MCP server.
untrusted field.<untrusted-data> tags. Its structuredContent keeps the untrusted list, so the same strings are player text there too.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.
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.