Claude Code

Connect Moonlit to Claude Code with one command, then sign in from inside a session.

Before you start

  • A Moonlit account. Sign in at app.moonlit.ai with your email and the one-time code it sends you, or with Google or Microsoft. Organizations can use single sign-on. Signing in creates the account if you do not have one.

The server URL:

https://mcp.moonlit.ai/mcp

Add the server

claude mcp add --transport http moonlit https://mcp.moonlit.ai/mcp

Without a scope flag the server is available in the current project only. Add --scope user to use it in every project, or --scope project to share it with your team through a .mcp.json at the project root that Claude Code writes for you:

{
  "mcpServers": {
    "moonlit": {
      "type": "http",
      "url": "https://mcp.moonlit.ai/mcp"
    }
  }
}

A project-scoped server asks for approval the first time a teammate opens Claude Code in that project.

Sign in

Start a session and run /mcp, then follow the browser sign-in. Or sign in from the command line:

claude mcp login moonlit

Check it works

Run claude mcp list; Moonlit reports as connected, and /mcp inside a session shows its nine tools. Then ask:

Prompt

Find the official text of Article 6 of the EU AI Act.

A good answer cites CELEX 32024R1689, links to the official publication, and quotes the article.

Use an MCP key instead

For a configuration shared with your team, or a machine that cannot open a browser, an organization MCP key replaces the sign-in. Keys come from Organizations; keep them in an environment variable, never in the file itself.

claude mcp add --transport http moonlit https://mcp.moonlit.ai/mcp \
  --header "Authorization: Bearer $MOONLIT_MCP_KEY"

In a shared .mcp.json, reference the variable instead of the key; Claude Code expands it when it loads the file:

{
  "mcpServers": {
    "moonlit": {
      "type": "http",
      "url": "https://mcp.moonlit.ai/mcp",
      "headers": {
        "Authorization": "Bearer ${MOONLIT_MCP_KEY}"
      }
    }
  }
}

If something fails

  • Check that the URL ends in /mcp.
  • Remove the server entry, add it again, and sign in once more.
  • Ask for your Moonlit account status. The check is free and shows your remaining calls.
  • claude mcp list shows Moonlit as failed: run claude mcp remove moonlit, add it again, and sign in with /mcp.
  • A project-scoped server never appears: you may have declined it once. Run claude mcp reset-project-choices and open the project again.

For the app's own steps, see the Claude Code MCP documentation. Still stuck? Email support@moonlit.ai with what you see.

esc
↑↓ navigateenter openesc close