Skip to main content

What is MCP?

Model Context Protocol (MCP) is an open protocol that allows AI assistants to connect to external tools and data sources. Nogic exposes its code intelligence features through MCP, enabling AI agents to:
  • Search your codebase semantically
  • Find similar code before writing new code
  • Detect naming conventions
  • Explore call graphs and dependencies

Available Tools

When connected to Nogic, AI agents have access to these tools:
ToolDescription
before_writingCheck for similar code and conventions before writing new code
find_similarFind code similar to a description
get_conventionsGet naming conventions (camelCase, snake_case, etc.)
find_symbolFind where a symbol is defined
get_referencesFind who calls a function
get_dependenciesFind what a function calls
assess_impactAssess risk of modifying code
list_filesList all indexed files
get_file_structureGet symbols in a file
describe_projectGet project overview and stats

How It Works

┌─────────────────┐         ┌─────────────────┐
│   AI Agent      │   MCP   │   Nogic MCP     │
│ (Claude, Cursor)│ ◄─────► │   Server        │
└─────────────────┘         └────────┬────────┘


                            ┌─────────────────┐
                            │   Graph DB      │
                            │   + Vectors     │
                            └─────────────────┘
  1. AI agent connects to Nogic’s MCP server
  2. Agent calls tools like find_similar or get_conventions
  3. Nogic queries the graph database
  4. Results are returned to the agent

Configuration

Each AI agent has its own way of configuring MCP servers. See the setup guides:

Example: Before Writing Code

When you ask an AI agent to write new code, it can use Nogic to:
  1. Check for existing code - Find similar functions that might already exist
  2. Follow conventions - Detect whether to use camelCase or snake_case
  3. Avoid duplication - Reuse existing utilities instead of creating new ones
Agent prompt:
“Write a function to validate email addresses”
Nogic helps the agent:
before_writing("email validation function")

→ Found similar: src/utils/validators.py:validate_email (92% match)
→ Conventions: snake_case for functions, PascalCase for classes
→ Recommendation: Use existing validate_email function

Project ID

All MCP tools require a project_id parameter. The AI agent reads this from your project’s .nogic/config.json file:
{
  "project_id": "abc123-def456-..."
}
Make sure you’ve run nogic init in your project directory before using MCP tools.