Skip to main content

Add Lightning Payments to Cursor

Set up the Lightning Enable MCP server in Cursor so your AI agent can pay Lightning invoices and access L402-protected APIs.


Step 1: Get a Strike API Key

  1. Create a Strike account
  2. Go to developer.strike.me
  3. Generate an API key

See the Claude Code guide for detailed steps.


Step 2: Install the MCP Server

# .NET
dotnet tool install -g LightningEnable.Mcp

# Or Python
pip install lightning-enable-mcp

Step 3: Configure Cursor

You can configure via the UI or by editing the config file directly.

Option A: Cursor Settings UI

  1. Open Cursor Settings (gear icon)
  2. Go to Tools & MCP
  3. Click New MCP Server
  4. Paste the JSON config below

Option B: Config File

Create or edit .cursor/mcp.json in your project root (project-specific) or ~/.cursor/mcp.json (global):

.NET:

{
"mcpServers": {
"lightning-enable": {
"command": "dotnet",
"args": ["tool", "run", "lightning-enable-mcp"],
"env": {
"STRIKE_API_KEY": "your-strike-api-key"
}
}
}
}

Python:

{
"mcpServers": {
"lightning-enable": {
"command": "uvx",
"args": ["lightning-enable-mcp"],
"env": {
"STRIKE_API_KEY": "your-strike-api-key"
}
}
}
}
warning

Don't commit API keys. Use the global config (~/.cursor/mcp.json) for credentials, or use environment variables set in your shell profile.

Fully restart Cursor after saving (not just close the window).


Step 4: Verify

Open Cursor Settings > Tools & MCP. You should see lightning-enable listed with a green status indicator and all 15 tools available.

Or ask in Cursor's Agent mode:

What MCP tools do you have available?

Test a Payment

Check my Lightning wallet balance

Access an L402 API

Get weather data for New York from agent-commerce.store

Project vs Global Config

LocationScopeBest For
.cursor/mcp.jsonThis project onlySharing tool config with team (no secrets!)
~/.cursor/mcp.jsonAll projectsAPI keys, personal tools

When both exist, project-level takes priority.


Differences from Claude Desktop

The config format is nearly identical. The only differences:

CursorClaude Desktop
Config file.cursor/mcp.json or ~/.cursor/mcp.jsonclaude_desktop_config.json
Root key"mcpServers" (same)"mcpServers" (same)
UI configSettings > Tools & MCPFile edit only
Remote serversSupported (SSE + HTTP)stdio only

Next Steps