Deep Linking
You can link directly to a specific configuration of the app using the Link button (🔗). This copies a URL with your current selections.
Fuzzy Search: The occupation parameter supports "contains" matching. For example, using ?occupation=Baker in the URL will automatically select "The Baker".
Untouched dropdowns (defaults) are excluded from the link.
Export/Import
Backup your settlements or move them to another device using the buttons in the Settlement Manager sidebar. Data is saved as a JSON file.
Model Context Protocol (MCP)
This app provides dual-tier access for AI agents (like Claude Desktop, Cursor, or your own scripts) to browse medieval lore and generate NPCs.
Tier 1: Public Lore Access (Basic)
Instant access to 130+ occupation backgrounds. No token required. AI agents can browse the full research database directly from our static API endpoint.
Endpoint: /mcp
Tier 2: Private Bridge (Advanced)
Enables stateful tools like generateNPC and saveBaggedNPC. Requires a Pairing Token generated in Settings.
How it Works: The token acts as a secure rendezvous key. Requests are routed through a real-time tunnel directly to your browser. Your local PWA session then performs the logic and sends it back. No lore or generation data is ever stored on our servers.
- 1. Pair: Go to Settings and click Generate. This creates a unique pairing token and establishes a persistent connection to the relay.
- 2. Configure: In your AI agent's MCP settings, use the endpoint:
https://npc.bagsoffolding.com/mcp
- 3. Authenticate: Provide your token using one of two methods:
- Append it to the URL:
?token=YOUR_TOKEN
- Or send an
Authorization: Bearer YOUR_TOKEN header.
- 4. Stay Active: Keep this browser tab open. The bridge relies on your active session to access the lore. If you close the tab, the AI agent will lose access.
Available tools: getOccupations, getOccupationLore, getNPCTemplate.