1.1.1 • Published 11 months ago

@lune-inc/mcp v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

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_ID

Example 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-88b3e251bde1

Transport 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_ID

2. 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=3000

When using SSE transport:

  • Connect to /sse to 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 code

Usage 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 build

Run 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_ID

Instructions

  1. Replace YOUR_LUNE_API_KEY with your actual Lune API key.
  2. Run the command to start the MCP Inspector.
  3. Open the MCP Inspector UI in your browser and click Connect to start the MCP server.
  4. 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 key
  • LUNE_NAME: The name of the Lune
  • LUNE_ID: The ID of the Lune
  • TRANSPORT: The transport method to use (stdio or sse)
  • PORT: The port to use for SSE transport (default: 3000)
1.1.1

11 months ago

1.1.0

11 months ago

1.0.0

11 months ago