Skip to main content

Prerequisites

  • Claude Code CLI installed
  • Nogic CLI installed and authenticated
  • A project initialized with nogic init

Configuration

Add Nogic to your Claude Code MCP settings. Create or edit .mcp.json in your project root:
{
  "mcpServers": {
    "nogic": {
      "url": "https://api.nogic.dev/mcp?api_key=YOUR_API_KEY"
    }
  }
}
Replace YOUR_API_KEY with your Nogic API key (starts with sk_).

Option 2: Global (All Projects)

Edit ~/.claude/settings.json:
{
  "mcpServers": {
    "nogic": {
      "url": "https://api.nogic.dev/mcp?api_key=YOUR_API_KEY"
    }
  }
}

Verify Connection

Start Claude Code and check that Nogic tools are available:
claude
Ask Claude to list available tools or try a Nogic command:
“What Nogic tools do you have access to?”
Claude should respond with a list including before_writing, find_similar, etc.

Usage Examples

Before Writing New Code

“I need to write a function to parse JSON configuration files”
Claude will automatically call before_writing to check for similar existing code and detect your naming conventions.

Find Similar Code

“Find code similar to user authentication”

Explore Dependencies

“What functions does processPayment call?”

Check Impact

“What would be affected if I modify the validateInput function?”

Troubleshooting

”Invalid API key” Error

  • Make sure you’ve replaced YOUR_API_KEY with your actual key
  • Verify your key works: nogic projects list
  • Check the key hasn’t been revoked at nogic.dev

”No project_id” Error

  • Make sure you’ve run nogic init in your project
  • Check that .nogic/config.json exists and contains a project_id

Tools Not Appearing

  • Restart Claude Code after editing the MCP configuration
  • Check for JSON syntax errors in your config file

Next Steps

MCP Tools Reference

Learn about all available MCP tools