Skip to main content

Prerequisites

  • Cursor installed
  • Nogic CLI installed (uv tool install nogic or pip install nogic)
  • A project initialized with nogic init

Configuration

Add to your Cursor MCP config (~/.cursor/mcp.json):
{
  "mcpServers": {
    "nogic": {
      "command": "nogic",
      "args": ["mcp"],
      "env": {
        "NOGIC_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}
Replace YOUR_API_KEY with your Nogic API key (starts with sk_).

Verify Connection

After adding the config:
  1. Restart Cursor
  2. Open the Cursor chat
  3. Ask: “What Nogic tools do you have access to?”
Cursor should list tools like before_writing, find_similar, etc.

Usage Examples

Intelligent Code Writing

When you start writing code, Cursor can use Nogic to check for existing similar code, follow your project’s naming conventions, and suggest existing utilities instead of duplicating.

Ask About Your Codebase

“Find all functions related to authentication”
“What calls the processOrder function?”
“Show me the project structure”

Before Refactoring

“What would be affected if I rename getUserById to fetchUser?”

Troubleshooting

“nogic: command not found” — Make sure Nogic is installed: uv tool install nogic or pip install nogic. Verify with nogic --version. Connection failed — Verify your API key is correct and that Cursor was restarted after adding the config. Tools not working — Make sure .nogic/config.json exists in your project root. Run nogic status to verify.

Next Steps

MCP Tools Reference

See all available MCP tools