LunaDocs

Loading search...

PortuguêsSign in to the console
On this page

Use the documentation in your editor (MCP)

Use with AI

The Luna documentation has a public MCP server. Connected to your editor or assistant, the AI searches the guides and the reference on its own, and reads each route’s exact contract before writing the integration code. The address is https://lunahia.com.br/mcp.

The server is read-only, asks for no key and stores nothing about you. It reads from the same content that generates this documentation, each page’s .md file and llms-full.txt: when a guide or the API reference changes, the MCP changes with it, with nothing for you to update. It does not call the Luna API and does not send messages; for that use the API key and the reference.

The four tools#

ToolWhat it does
list_pagesLists the pages (guides and reference) with the identifier (slug), the title and a one-line summary.
read_pageReturns a page’s Markdown, identical to its .md file. Long pages come in pieces; the answer says which offset to ask for to continue.
search_docsSearches the guides, routes, webhook events and error codes, and returns the best sections with slug, anchor, link and an excerpt.
get_endpointReturns a route’s OpenAPI operation (method and path), with the schemas already resolved: the exact contract to generate the client code. Big routes accept part (request or responses) to bring only half.

All of them accept lang: pt (default) or en. Each answer has at most 24,000 characters; beyond that the text is cut with a notice, and read_page and get_endpoint accept offset to ask for the rest.

Connect your client#

In all of them, the name luna-docs is just a label; change it if you like. There is no authentication header to set up.

Claude Code#

One line in the terminal:Texto
claude mcp add --transport http luna-docs https://lunahia.com.br/mcp

By default the setup applies only to you, in the current project. With --scope user it applies to all your projects, and with --scope project the command writes the .mcp.json below at the repository root, for the whole team to use. Check it with claude mcp list or, inside Claude Code, with /mcp.

.mcp.jsonJSON
{
  "mcpServers": {
    "luna-docs": {
      "type": "http",
      "url": "https://lunahia.com.br/mcp"
    }
  }
}

Cursor#

Create .cursor/mcp.json in the project, or ~/.cursor/mcp.json to apply to all of them:

.cursor/mcp.jsonJSON
{
  "mcpServers": {
    "luna-docs": {
      "url": "https://lunahia.com.br/mcp"
    }
  }
}

VS Code#

Create .vscode/mcp.json. Note that VS Code uses the servers key, not mcpServers. You can also use the MCP: Add Server command from the command palette, choose HTTP and paste the address.

.vscode/mcp.jsonJSON
{
  "servers": {
    "luna-docs": {
      "type": "http",
      "url": "https://lunahia.com.br/mcp"
    }
  }
}

Claude (remote connector)#

On claude.ai, go to Customize > Connectors, click Add and Add custom connector, give it a name (for example Luna docs) and paste https://lunahia.com.br/mcp as the address. Under authentication, choose No sign in. Team and Enterprise plans: the organization administrator adds it, in Organization settings > Connectors. Then, in each chat, turn the connector on with the + button.

ChatGPT#

ChatGPT accepts a remote MCP server through developer mode, in the apps and connectors settings: create an MCP app, paste https://lunahia.com.br/mcp as the address and choose no authentication. Then turn it on in the chat. These menus change place and name between versions and plans, and Helsen could not check the steps against OpenAI’s documentation, so follow what your ChatGPT shows.

What to ask the AI#

  • “Using the Luna documentation, write the Node code that sends an approved template.”
  • “What is the exact contract of POST /v1/messages? Generate the TypeScript types.”
  • “How do I check a Luna webhook signature? Show an example in Python.”
  • “What does the window_closed error mean and what do I do?”

Technical details#

  • Streamable HTTP transport, with no session: each call is a POST with one JSON-RPC message, and the answer is a JSON. GET and DELETE answer 405.
  • Protocol versions: 2025-03-26, 2025-06-18, 2025-11-25 (with initialize) and 2026-07-28 (no handshake, with server/discover).
  • Open CORS, for browser clients, and no credentials: there is no cookie or key to protect.

To test with no client at all, call a tool directly:

Shell
curl -X POST https://lunahia.com.br/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_docs","arguments":{"query":"enviar template"}}}'