Hand of the King Wiki
Agent MCP Advisor

Agent MCP Advisor

MCP Advisor mode lets an external LLM read the campaign, list current choices, and submit proposals for human review without executing gameplay.

What Advisor Mode Is

Advisor mode is a scoped connection for external agents. It lets the player ask an LLM to inspect a campaign and recommend a move while preserving human control.

The advisor can:

  • read campaign state
  • read kingdom status
  • read stats, resources, treasury, and trade routes
  • list docket items
  • list royal actions
  • submit a proposal

The advisor cannot:

  • resolve a docket item
  • execute a royal action
  • advance a tick
  • use Supabase service credentials
  • read the database directly
  • call normal HOTK user routes with an agent token

Hosted Flow

  1. The player logs into hotk.dev with Supabase.
  2. The browser calls the HOTK API to create a campaign-scoped agent connection.
  3. The player reviews and approves the connection.
  4. The external agent exchanges the one-time approval data for a hotk_ag_... grant token.
  5. The MCP client connects to https://mcp.hotk.dev/mcp with the grant token.
  6. The MCP server calls only delegated-agent HOTK routes.
  7. Proposals return to the site for human review.

Why The Grant Exists

The grant is the safety boundary. It is campaign-scoped, mode-scoped, time-limited, revocable, and not equivalent to the player's browser session.

Normal HOTK auth and MCP auth are intentionally different. A user session can manage the player's account. An MCP grant can only do what its scopes allow.

Advisor Scope

Advisor grants currently include:

  • campaign:read
  • actions:list
  • actions:propose
  • audit:read

Only the first three are currently tied to delegated gameplay routes.

Stronger Modes

The backend names stronger modes:

  • assisted
  • autoplay
  • benchmark

These should not be treated as normal public advisor mode. Execution and tick-advance scopes need explicit product controls, budgets, audit logs, and user approval before public use.

Agent Instructions

An advisor agent should answer like a court advisor:

  • summarize current risk
  • identify the nearest failure path
  • compare docket options
  • explain tradeoffs
  • submit one or more proposals if asked
  • avoid claiming that it executed anything

If a player asks the advisor to execute a move and the grant is Advisor mode, the correct response is to propose the move for human review.