Skip to main content
Cursor supports MCP tools and agent skills, providing a powerful GitNexus integration.
Support Level: MCP + Skills (hooks not supported)

Quick Setup

Run the setup command to configure everything automatically:
This will:
  1. Detect Cursor installation (checks for ~/.cursor/)
  2. Write ~/.cursor/mcp.json with GitNexus MCP configuration
  3. Install skills to ~/.cursor/skills/gitnexus/

Manual MCP Configuration

Create or edit ~/.cursor/mcp.json (global configuration):
Global Configuration: This configuration is global — it works for all projects on your machine. Cursor will spawn the MCP server automatically.

Windows Configuration

On Windows, use:
The gitnexus setup command handles this automatically.

Agent Skills

GitNexus provides 6 agent skill files for Cursor: Skills are installed to ~/.cursor/skills/gitnexus-{skillName}/ by:
  • gitnexus setup — Global skills for all projects
  • gitnexus analyze — Project-level skills in .cursor/skills/
Cursor automatically discovers skills from both ~/.cursor/skills/ (global) and .cursor/skills/ (project).

Global vs Project Configuration

Global configuration applies to all projects:
  • MCP: ~/.cursor/mcp.json
  • Skills: ~/.cursor/skills/gitnexus/
This is the recommended approach for most users.

Project Configuration

Project configuration applies to a single repository:
  • Skills: .cursor/skills/gitnexus/ (installed by gitnexus analyze)
  • Context: AGENTS.md (installed by gitnexus analyze)
  • Rules: .cursorrules (optional, for project-specific instructions)
Cursor does not support project-level MCP configuration. MCP must be configured globally in ~/.cursor/mcp.json.

Multi-Repo Support

The MCP server automatically serves all indexed repositories from the global registry (~/.gitnexus/registry.json).

With One Indexed Repo

The repo parameter is optional:

With Multiple Indexed Repos

Specify which repo to query:
List all indexed repos:
Or read the repos resource:

Verification

Test your Cursor integration:
1

Index a repository

2

Open in Cursor

Open the repository in Cursor
3

Test MCP connection

Ask Cursor:
“List all indexed repositories”
This should trigger the list_repos MCP tool.
4

Test skills

Ask Cursor:
“How should I use GitNexus to understand this codebase?”
Cursor should reference the installed skills.
5

Test resources

Ask Cursor:
“Read gitnexus://repos”
This should show your indexed repositories with stats.

Available Tools

All 7 GitNexus tools are available in Cursor: See Tools Overview for detailed usage.

Available Resources

All 7 GitNexus resources are available: See Resources Overview for details.

Project Context Files

When you run gitnexus analyze, two context files are created:

AGENTS.md

Contains:
  • Codebase overview and stats
  • Tool reference table
  • Skills checklist
  • Graph schema reference
Cursor reads this file automatically as project context.

.cursorrules (Optional)

You can create .cursorrules to add project-specific instructions:

Updating GitNexus

The MCP configuration uses gitnexus@latest, so you automatically get the latest version:
To force an update:
Restart Cursor to pick up the new version.

Troubleshooting

MCP server not starting

  1. Verify Node.js: node --version (requires >= 18)
  2. Check npx works: npx gitnexus --version
  3. Test MCP manually: npx gitnexus mcp (should not exit immediately)
  4. Check ~/.cursor/mcp.json syntax (must be valid JSON)

Tools not appearing

  1. Verify ~/.cursor/mcp.json exists and has correct content
  2. Restart Cursor after configuration changes
  3. Check Cursor MCP logs (if available)

Skills not loading

  1. Verify skills directory: ls ~/.cursor/skills/gitnexus-exploring/SKILL.md
  2. Check skill format (must have SKILL.md filename)
  3. Restart Cursor

”No repositories indexed” error

  1. Run npx gitnexus analyze in your repository
  2. Verify index exists: ls .gitnexus/meta.json
  3. Check global registry: cat ~/.gitnexus/registry.json

Differences from Claude Code

Cursor does not support:
  • PreToolUse Hooks — No automatic enrichment of grep/glob/bash calls
  • Session Hooks — No automatic session context injection
Cursor does support:
  • All MCP Tools — Full access to query, context, impact, etc.
  • All MCP Resources — Can read all gitnexus:// resources
  • Agent Skills — Can load and follow skill workflows
To get knowledge graph enrichment in Cursor, explicitly use GitNexus tools in your queries. For example: “Use query to find auth code, then use context on the results.”

Next Steps

Using the Tools

Learn how to use GitNexus tools effectively

Multi-Repo Usage

Work with multiple indexed repositories

Agent Skills

Understand the installed skill workflows

Resources

Explore MCP resources for structured data