MCP servers
Moonspell runs two Model Context Protocol servers. They do different jobs, and you can add both.
| Docs server | Moonspell server | |
|---|---|---|
| URL | https://docs.moonspell.app/mcp | https://mcp.moonspell.app/mcp |
| Sign-in | None. Public, no account or key | A Moonspell account, with Google (OAuth in the browser) |
| What it gives the agent | Search and read these docs: search_docs, read_doc, list_docs | The engine's skills and docs, your games, share links with QR codes, invites, and the commands that set up a game folder |
| What it cannot do | See your code, your game or your account | Touch your files. Saving and publishing are done by the crescent CLI in the game folder |
| Suggested name | moonspell-docs | moonspell (the name the starter's .mcp.json uses) |
| Use it when | You use the engine on its own (plain Expo), or you want answers from these pages | You build in local developer mode and publish to the Moonspell app |
Both use the Streamable HTTP transport. Give them different names in your client, so one does not replace the other.
The docs server
It is stateless and only reads the public pages of this site, the same content as llms.txt and the Markdown pages.
Tools
| Tool | Input | Returns |
|---|---|---|
search_docs | query (string), limit (number, optional, default 8) | Pages ranked by how well they match: title, path, URL, description and the best-matching excerpt. |
read_doc | path (string), a page's path without .md, for example engine/audio | The page's Markdown. |
list_docs | section (string, optional), a sidebar section | Every page, or every page in that section: section, title, path and description. |
A typical agent call sequence is search_docs with the question, then read_doc on the best result.
Claude Code
claude mcp add --transport http moonspell-docs https://docs.moonspell.app/mcp
This adds it for you in the current project. To share it with everyone who opens the game repo, add it at project scope, which writes .mcp.json at the repo root (commit it):
claude mcp add --transport http moonspell-docs --scope project https://docs.moonspell.app/mcp
{
"mcpServers": {
"moonspell-docs": {
"type": "http",
"url": "https://docs.moonspell.app/mcp"
}
}
}
Claude Code asks you to approve a project-scoped server the first time it sees it. Run claude mcp list to check the connection.
Claude Desktop
Add it as a custom connector: open Settings, choose Connectors, click Add, then Add custom connector, and enter https://docs.moonspell.app/mcp. Custom connectors depend on your Claude plan.
claude_desktop_config.json starts local servers by command, so a remote URL there goes through a local bridge. With the community mcp-remote package (needs Node.js):
{
"mcpServers": {
"moonspell-docs": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://docs.moonspell.app/mcp"]
}
}
}
Restart Claude Desktop after editing the file.
Cursor
Add the server to .cursor/mcp.json in the project, or to ~/.cursor/mcp.json for every project:
{
"mcpServers": {
"moonspell-docs": {
"url": "https://docs.moonspell.app/mcp"
}
}
}
VS Code
Add the server to .vscode/mcp.json in the workspace:
{
"servers": {
"moonspell-docs": {
"type": "http",
"url": "https://docs.moonspell.app/mcp"
}
}
}
The tools are then available to the chat in agent mode.
Questions to ask once connected
- "Search the Moonspell docs: how do I add a live leaderboard, and which board names does the backend accept?"
- "Read engine/audio and wire a jump sound and background music into my game."
- "List the Game modules pages. Which module fits a farming game with a story?"
- "How does a turn-based game's computer opponent work without a backend?"
- "What do I need to deploy the game backend to my own Cloudflare account?"
The agent answers from the pages it read. For the skills and docs inside the game repo itself, it reads the files directly; the MCP server covers this site.
The Moonspell server
The Moonspell server is the front door of local developer mode. The first time your agent connects, it opens a Moonspell page in the browser that says which app is asking; you allow it and sign in with Google. You can end the connection at any time by revoking its token in Moonspell's Settings, where it is listed as MCP: <the app's name>.
Tools
| Tool | What it does |
|---|---|
moonspell_status | Who is signed in through this connection, and which starter the skills and docs come from |
moonspell_games | Your games (owned or collaborated on), with the latest share link and the developer page |
moonspell_game | One game: its versions, the people building it, its developer page |
moonspell_create_game | Registers a new game (no folder yet; moonspell_start sets one up) |
moonspell_links | The latest version's share link, its QR code as text and as an image, and the developer page |
moonspell_invite | An invite link: play (anyone with the link plays the latest version) or build (owner only: the person becomes a collaborator) |
moonspell_start | The commands that set up a game folder on your computer, signed in with a one-time code |
moonspell_skills, moonspell_skill, moonspell_skill_file | The engine's skills: the list, one skill's SKILL.md, and its other files |
moonspell_engine_docs | The template's docs/ and its rules |
It also serves the skills and docs as resources (moonspell://skills/<name>, moonspell://docs/<topic>) and two prompts, new_game and change_game. Inside a game folder, the folder's own .claude/skills win.
Setup
claude mcp add --transport http moonspell https://mcp.moonspell.app/mcp
Then run /mcp in a Claude Code session, pick moonspell and authenticate. The starter's .mcp.json already registers it this way.
- Claude Desktop and Claude.ai: Settings, Connectors, Add custom connector, with
https://mcp.moonspell.app/mcp. Claude signs in through the same page. - Cursor: in
.cursor/mcp.jsonor~/.cursor/mcp.json,{"mcpServers": {"moonspell": {"url": "https://mcp.moonspell.app/mcp"}}}. Cursor registers itself and opens the sign-in. - Codex: in
~/.codex/config.toml(or the project's.codex/config.toml), thencodex mcp login moonspell:
[mcp_servers.moonspell]
url = "https://mcp.moonspell.app/mcp"
An agent that cannot use a remote server runs the CLI's local server in the game folder instead (npx --no-install crescent mcp), with the same tool names plus the ones that touch files (the commands). How the server works is on The Moonspell MCP server.