Cursor IDE Integration

Give your Cursor AI assistant a Bitcoin wallet via Lightning Network.

Prerequisites

Before you begin, make sure you have:

Installation

1 Install the MCP Server
npm install -g lightning-faucet-mcp
2 Find Your Cursor Config

Cursor stores MCP configuration in:

# macOS/Linux ~/.cursor/mcp.json # Windows %APPDATA%\Cursor\mcp.json
3 Add Lightning Faucet MCP

Add to your mcp.json:

{ "mcpServers": { "lightning-faucet": { "command": "npx", "args": ["lightning-faucet-mcp"] } } }
4 Restart Cursor

Close and reopen Cursor to load the MCP server.

First-Time Setup

After restarting Cursor, ask the AI assistant:

"Register a new Lightning Faucet operator account"

Cursor will use the register_operator tool to create your account. Save the API key and recovery code!

Important: The recovery code is the only way to regain access if you lose your API key. Store it securely.

Funding Your Account

Ask Cursor:

"Create a deposit invoice for 10000 sats"

Pay the returned Lightning invoice with your wallet. Once paid, your balance is available.

Creating Agents

Create agents with spending limits:

"Create an agent called 'Code Assistant' with a budget of 5000 sats"

Then fund the agent:

"Fund the Code Assistant agent with 1000 sats"

Making Payments

Switch to agent mode and make payments:

"Switch to the Code Assistant agent and check the balance"

Access L402 APIs:

"Get a fortune from the Lightning Faucet L402 API"

Troubleshooting

MCP server not loading

Make sure Node.js 18+ is installed and the npm global bin is in your PATH.

"No API key configured" error

Use register_operator first, then set_operator_key to activate the credentials.

← Back to Documentation