@lune-inc/mcp
v1.1.1
Published
A Model Context Protocol (MCP) server for Lune that provides up-to-date technical context
Maintainers
Readme
Lune Model Context Protocol
The Lune Model Context Protocol server allows you to integrate with individual Lunes (knowledge bases composed of documentation, code repositories, forum discussions, etc.) through function calling.
Lunes are currently to assist agents and LLMs with codegen and are not for interfacing with their respective APIs. Please refer to other amazing MCP servers, like Stripe's for that.
Setup
To run a Lune MCP server using npx, first go to the Lunes and find click "Use MCP" for the Lunes you want to use which will copy the command to your clipboard like below. Make sure to replace YOUR_LUNE_API_KEY with your actual Lune API key which you can grab at https://www.lune.dev/profile.
# Replace YOUR_LUNE_API_KEY with your actual Lune API key
npx -y @lune-inc/mcp --api-key=YOUR_LUNE_API_KEY --lune-name=LUNE_NAME --lune-id=LUNE_IDExample with the Lune on Model Context Protocol Docs, check out the Lune here: https://www.lune.dev/lunes/v-model-context-protocol-mcp:
npx -y @lune-inc/mcp --api-key=YOUR_LUNE_API_KEY --lune-name=MCP --lune-id=c2d40d37-9432-44e4-bc78-88b3e251bde1Transport Options
The Lune MCP server supports two transport methods:
1. Standard Input/Output (stdio) - Default
This is the default transport method and is used when no transport is specified:
npx -y @lune-inc/mcp --api-key=YOUR_LUNE_API_KEY --lune-name=LUNE_NAME --lune-id=LUNE_ID2. Server-Sent Events (SSE)
To use SSE transport, specify the --transport=sse flag and optionally a port (default is 3000):
npx -y @lune-inc/mcp --api-key=YOUR_LUNE_API_KEY --lune-name=LUNE_NAME --lune-id=LUNE_ID --transport=sse --port=3000When using SSE transport:
- Connect to
/sseto establish an SSE connection - Send messages to
/messages
Usage in Cursor
You can either use it in SSE mode or stdio mode.
Open Cursor Settings, find features, and add the following:
Stdio Mode
Name: lune-[LUNE_NAME]-mcp
Type: command
npx -y @lune-inc/mcp --api-key=YOUR_LUNE_API_KEY --lune-name=LUNE_NAME --lune-id=LUNE_ID(Going to https://www.lune.dev/lunes and clicking "Use MCP" will copy this command to your clipboard)
SSE Mode
Name: lune-[LUNE_NAME]-mcp
Type: sse
Run the previous instructions for SSE mode, and then put in the following:
http://localhost:3000/sse
Prompt Examples for Cursor Agent
Using the lune-stripe-documentation-mcp server, use the lookup_context_for_stripe_documentation tool to get accurate context on how to implement usage based billing meters and implement it into my codeUsage with Claude Desktop
Add the following to your claude_desktop_config.json. See here for more details.
{
"mcpServers": {
"lune": {
"command": "npx",
"args": [
"-y",
"@lune-inc/mcp",
"--api-key=LUNE_API_KEY",
"--lune-name=LUNE_NAME",
"--lune-id=LUNE_ID"
]
}
}
}Usage with Windsurf and other tools
Similar to instructions for Cursor and Claude Desktop.
Debugging the Server
To debug your server, you can use the MCP Inspector.
First build the server
npm run buildRun the following command in your terminal:
# Start MCP Inspector and server with all tools
npx @modelcontextprotocol/inspector node dist/index.js --api-key=YOUR_LUNE_API_KEY --lune-name=LUNE_NAME --lune-id=LUNE_IDInstructions
- Replace
YOUR_LUNE_API_KEYwith your actual Lune API key. - Run the command to start the MCP Inspector.
- Open the MCP Inspector UI in your browser and click Connect to start the MCP server.
- You can see the list of tools you selected and test each tool individually.
Environment Variables
You can also configure the server using environment variables:
LUNE_API_KEY: Your Lune API keyLUNE_NAME: The name of the LuneLUNE_ID: The ID of the LuneTRANSPORT: The transport method to use (stdioorsse)PORT: The port to use for SSE transport (default: 3000)
