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:| Tool | Description |
|---|---|
before_writing | Check for similar code and conventions before writing new code |
find_similar | Find code similar to a description |
get_conventions | Get naming conventions (camelCase, snake_case, etc.) |
find_symbol | Find where a symbol is defined |
get_references | Find who calls a function |
get_dependencies | Find what a function calls |
assess_impact | Assess risk of modifying code |
list_files | List all indexed files |
get_file_structure | Get symbols in a file |
describe_project | Get project overview and stats |
How It Works
- AI agent connects to Nogic’s MCP server
- Agent calls tools like
find_similarorget_conventions - Nogic queries the graph database
- 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:- Check for existing code - Find similar functions that might already exist
- Follow conventions - Detect whether to use
camelCaseorsnake_case - Avoid duplication - Reuse existing utilities instead of creating new ones
“Write a function to validate email addresses”Nogic helps the agent:
Project ID
All MCP tools require aproject_id parameter. The AI agent reads this from your project’s .nogic/config.json file:
nogic init in your project directory before using MCP tools.