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
- Create a Strike account
- Go to developer.strike.me
- 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
- Open Cursor Settings (gear icon)
- Go to Tools & MCP
- Click New MCP Server
- 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"
}
}
}
}
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
| Location | Scope | Best For |
|---|---|---|
.cursor/mcp.json | This project only | Sharing tool config with team (no secrets!) |
~/.cursor/mcp.json | All projects | API keys, personal tools |
When both exist, project-level takes priority.
Differences from Claude Desktop
The config format is nearly identical. The only differences:
| Cursor | Claude Desktop | |
|---|---|---|
| Config file | .cursor/mcp.json or ~/.cursor/mcp.json | claude_desktop_config.json |
| Root key | "mcpServers" (same) | "mcpServers" (same) |
| UI config | Settings > Tools & MCP | File edit only |
| Remote servers | Supported (SSE + HTTP) | stdio only |
Next Steps
- Spending Security — Budget controls
- All 15 Tools — Complete tool reference
- Agent Commerce Store — L402 APIs to test with