// Setup

Set up Moxie Docs from inside your AI agent.

Copy the prompt into Claude Code, Cursor, Codex, or any MCP client. It walks you through connecting a repo, writes your MCP config for you, and verifies the connection — you just authorize GitHub and start the trial.

  • Your agent does the wiring. It detects your client and writes the MCP config itself — no JSON by hand.
  • Two clicks from you. Authorize GitHub and start the trial. Everything else the agent handles.
  • Self-verifying. It runs a smoke test against the endpoint until your repo context responds.
Paste into your AI coding agent
You are helping me connect this repository to Moxie Docs so my coding agent gets live, source-backed documentation, conventions, and doc-gap context through Moxie's MCP server. Act as a setup concierge: do every step you can yourself, and for the few steps only I can do (signing in, authorizing GitHub, entering payment), give me the exact link, tell me precisely what to click, then wait for me to confirm before continuing.

Moxie Docs facts you can rely on:
- Web app / sign-in: https://moxiedocs.com
- MCP token page (after sign-in): https://moxiedocs.com/dashboard/mcp
- Hosted MCP endpoint: https://moxiedocs.com/api/mcp  (Streamable HTTP, Bearer auth)
- Auth header format: Authorization: Bearer <TOKEN>

Follow these steps in order. Stop and wait at every step marked [I do this].

Step 0 — Detect my client. Figure out which MCP client/editor you are running inside (Claude Code, Cursor, Codex, Claude Desktop, VS Code/Copilot, Windsurf, Cline, or Gemini CLI). If you can't tell, ask me. You'll use this in Step 4 to write the right config.

Step 1 — Sign in. [I do this] Open https://moxiedocs.com and tell me to click "Sign in with GitHub". New accounts are created automatically on first sign-in. Wait until I confirm I'm signed in and looking at the dashboard.

Step 2 — Connect GitHub + install the app. [I do this] In the dashboard, tell me to click "Connect GitHub" (or "Install GitHub App") and, on the GitHub page that opens, authorize the Moxie Docs app and grant it access to this repository. This is GitHub's own consent screen — it's the only way to grant repo access and you cannot do it for me. Wait until I confirm the repo shows up in Moxie.

Step 3 — Start the trial + pick this repo. [I do this] Tell me to start the 14-day trial and enable indexing for this repo. A card is required by Stripe even though there's no charge during the trial. Wait until I confirm the repo is enabled and indexing has started.

Step 4 — Mint a token, then YOU wire it up.
- Tell me to open https://moxiedocs.com/dashboard/mcp, click "Generate Token", copy it, and paste it back to you here. [I do this]
- Once I paste the token, you write the MCP config for the client you detected in Step 0. Use these exact shapes (replace <TOKEN> with what I pasted):
  - Claude Code — run: claude mcp add --scope user --transport http moxie-docs https://moxiedocs.com/api/mcp --header "Authorization: Bearer <TOKEN>"
  - Cursor — add to .cursor/mcp.json (or my global Cursor MCP config):
    { "mcpServers": { "moxie-docs": { "url": "https://moxiedocs.com/api/mcp", "headers": { "Authorization": "Bearer <TOKEN>" } } } }
  - Codex — run: codex mcp add moxie-docs --url https://moxiedocs.com/api/mcp --bearer-token-env-var MOXIE_DOCS_MCP_TOKEN, then set MOXIE_DOCS_MCP_TOKEN to the token in my environment.
  - VS Code / Copilot — add to .vscode/mcp.json using an inputs promptString for the token so it stays out of source control, with server { "type": "http", "url": "https://moxiedocs.com/api/mcp", "headers": { "Authorization": "Bearer ${input:moxie-token}" } }.
  - Claude Desktop / Windsurf / Cline / Gemini CLI / other — point the client at the Streamable HTTP endpoint https://moxiedocs.com/api/mcp with header Authorization: Bearer <TOKEN>. (Claude Desktop reaches it via the mcp-remote npx proxy.)
- Security: the token is a secret. Prefer user-scoped/global config. If you must write it into a repo file (e.g. .cursor/mcp.json), add that file to .gitignore and tell me you did. Never commit the token.

Step 5 — Verify it works. YOU do this. Run this smoke test and confirm the response lists moxie.* tools:
  curl -s -X POST https://moxiedocs.com/api/mcp \
    -H "Authorization: Bearer <TOKEN>" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
If it returns a JSON list of moxie.* tools, auth and context are live. If indexing is still running, the tools work but repo-specific context fills in once the first index finishes.

Step 6 — Reload + confirm. Tell me to restart or reload my editor/agent so it picks up the new MCP server, then confirm you can see the moxie-docs server and its tools (e.g. moxie.get_ai_context, moxie.search_docs). Summarize what's now connected and suggest I ask you to "read Moxie conventions before editing" on my next change.

What the prompt does

The agent drives. You confirm the two steps only you can.

Signing into GitHub and entering trial billing are the only steps a human has to do — they are third-party consent screens. The agent handles the rest.

  1. 01

    Agent

    Detects your client

    Figures out whether it is running in Claude Code, Cursor, Codex, VS Code, or another MCP client so it can write the right config.

  2. 02

    You

    Sign in with GitHub

    It opens moxiedocs.com and waits while you sign in. New accounts are created on first sign-in.

  3. 03

    You

    Authorize the repo

    It points you at GitHub's consent screen to install the app on this repository, then starts the trial.

  4. 04

    Agent

    Wires up MCP for you

    You paste one token; the agent writes the MCP config itself and runs a smoke test until moxie.* tools respond.

Prefer to click through it yourself?

Connect a repo in the dashboard and the MCP endpoint goes live with the first index.