Lune Logo

© 2025 Lune Inc.
All rights reserved.

support@lune.dev

How to use MCP servers inside coding tools

Lune Team

@lune_inc

How to use MCP servers inside coding tools

Guide to getting started with MCP

In this post, we will explore how you can get set up using MCP servers inside coding tools like Cursor, Windsurf, and more in minutes.

What is MCP?

The Model Context Protocol (MCP) is an open, standardized protocol that acts as a universal interface, like a "USB-C port for AI"—connecting LLMs to various data sources and tools. Using a client-server architecture, MCP enables host applications (e.g., Claude, IDEs, or AI tools) to access local data (files, databases) and remote services (web APIs) securely. It offers pre-built integrations and flexibility to switch LLM providers, empowering developers to create advanced agents and workflows by streamlining LLM interactions with external resources.

Installing Node.js (Prerequisite)

You should have Node.js installed on your computer to use Lune MCP servers. Here's how to install Node.js (skip if you already have it installed):

Windows

  1. Visit the official Node.js website
  2. Download the LTS (Long Term Support) version recommended for most users
  3. Run the installer and follow the installation wizard
  4. Verify installation by opening Command Prompt and typing:
    node --version
    npm --version
    

macOS

Using Homebrew (recommended):

  1. Install Homebrew if you don't have it already:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
  2. Install Node.js:
    brew install node
    
  3. Verify installation:
    node --version
    npm --version
    

Using the installer:

  1. Visit nodejs.org
  2. Download the macOS installer (LTS version)
  3. Run the installer and follow the instructions
  4. Verify installation in Terminal

Linux (Ubuntu/Debian)

  1. Update your package index:
    sudo apt update
    
  2. Install Node.js:
    sudo apt install nodejs npm
    
  3. Verify installation:
    node --version
    npm --version
    

For other Linux distributions, please refer to the Node.js downloads page.

How to Set Up Lune MCP Servers in Cursor

In order to use the MCP server with STDIO (our recommended method) you need to copy the command that sets up the MCP server inside Cursor.

The command includes your API key, the name of the Lune, and the unique identifier of the Lune you are using.

To copy the command for any Lune you want to use MCP with, simply navigate to the Explore Lunes page, search for the Lune you would like to use, and click on Copy MCP Command.

Copy MCP Command

Even if you haven't generated an API key, clicking Copy MCP Command should generate one automatically for you. If you get an error you can visit your profile page to generate one manually.

The command you will paste into Cursor will take this format:

# Replace YOUR_LUNE_API_KEY with your actual Lune API key
# Lune name determines the name of the MCP tool, recommended to use the default name of Lune
# Get the Lune ID manually by clicking on Details for each Lune at www.lune.dev/lunes
npx -y @lune-inc/mcp --api-key=YOUR_LUNE_API_KEY --lune-name=LUNE_NAME --lune-id=LUNE_ID

Once you have the command, navigate to Cursor's MCP settings, and click + Add new MCP Server.

Paste the STDIO command in the command field, set the type field to command, and enter a name for your MCP server. We recommend naming it something like lune-[LUNE_NAME]-mcp, but you can name it whatever you want.

Once all the fields are set click "Add". If the MCP server is initially red, click on the refresh button once and it should load the tools correctly.

Paste Commmand Into Cursor

IMPORTANT:

Make sure that when prompting Cursor Agent(Or other coding tools using MCP), that you explicitly ask it to use the Lune-[LUNE_NAME]-mcp server to look up context. Here is an example of a prompt using the DaisyUI Lune MCP server inside Cursor:

Implement a nextJS website landing page from scratch that contains a navbar, hero page, and the countdown component using daisy UI. 

The website should be sleek, dark themed, with popping high contrast neon text.

Anytime you are implementing a daisy ui component use the lune-daisyui-docs-mcp server's lookup context tool to get up to date context on how to implement the component correctly. The same goes for installation, anytime you are installing daisy ui, use the lune-daisyui-docs-mcp server to get up to date instructions on how to install correctly and follow those instructions. 

Setting up MCP in Windsurf

Replace the placeholders with your API key, Lune name, and Lune unique identifier in the json below and copy and paste it into the Cascade MCP settings. You can copy the command from lune.dev/lunes and reformat it.

# Replace YOUR_LUNE_API_KEY with your actual Lune API key
# Lune name determines the name of the MCP tool, recommended to use the default name of Lune
# Get the Lune ID manually by clicking on Details for each Lune at www.lune.dev/lunes
{
    "mcpServers": {
        "lune": {
            "command": "npx",
            "args": [
                "-y",
                "@lune-inc/mcp",
                "--api-key=LUNE_API_KEY",
                "--lune-name=LUNE_NAME",
                "--lune-id=LUNE_ID"
            ]
        }
    }
}

Click refresh after the config file is saved to see the MCP server load.

Paste Commmand Into WindSurf

Setting up in Claude Desktop

Replace the placeholders with your API key, Lune name, and Lune unique identifier in the json below and copy and paste it into the claude desktop config file.

{
    "mcpServers": {
        "lune": {
            "command": "npx",
            "args": [
                "-y",
                "@lune-inc/mcp",
                "--api-key=LUNE_API_KEY",
                "--lune-name=LUNE_NAME",
                "--lune-id=LUNE_ID"
            ]
        }
    }
}

Paste Commmand Into Claude Desktop

After saving the config file, restart the desktop app and the MCP server should be ready to use.

Wrapping Up

And that's it! You can now use Lune MCP servers inside Cursor for as many Lunes as you want. If you want to watch a video that goes over the setup step by step, check it out here.

Please note that free tier API keys are limited to 10 queries. To upgrade to pro or to check out our pricing, visit https://www.lune.dev/profile/plan

Troubleshooting

If the copied command for the the MCP server has an undefined API key e.g.

npx -y @lune-inc/mcp --api-key=undefined --lune-name=daisy-ui-v --lune-id=8f3f8125-dec2-4627-b905-d9881b471ed0 

Please wait a second before clicking the Copy MCP Command button again, and the API key should be correctly added to the command.

For more details regarding MCP usage, please refer to our NPM package README. Our open-source MCP integration is available here.