Provides Git workflow integration for task management, branch creation, and version control operations within code projects.
Enables workflow automation with GitHub integration, including creating branches, submitting pull requests, and managing task workflows with GitHub authentication support.
Allows running tests using the Vitest testing framework and retrieving test results for code validation and quality assurance.
@nervusdb/mcp
Official MCP server for NervusDB - Code knowledge graph with repomix integration
Features
Code Knowledge Graph: Build cross-language code knowledge graphs using
@nervusdb/core
andrepomix
Project Insights: Analyze code impact, find related files, and explore project structure
Workflow Automation: Task management with branch creation and PR submission
Code Operations: Read, write files, and run tests with safety checks
Database Tools: Query and maintain the knowledge graph index
Shadow Index Strategy: Ensures reliable indexing with fingerprint validation
Prerequisites
Node.js 20.0.0 or higher
pnpm 8.0.0 or higher
Quick Start
Install Dependencies
Run the Server
Index a Project
Claude Desktop Integration
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json
on macOS):
Alternatively, if you've installed the package globally:
Installation Options:
Configuration
GitHub Authentication (for Workflow Tools)
Workflow tools (workflow.submitForReview
) require GitHub authentication to create pull requests. The server supports 3 authentication methods with automatic fallback:
Method 1: Environment Variables (Recommended for CI/CD)
Method 2: GitHub CLI (Recommended for Local Development)
Method 3: Claude Desktop Configuration
Add environment variables to Claude Desktop config:
Authentication Priority:
GITHUB_TOKEN
environment variable (highest priority)GH_TOKEN
environment variablegh auth token
command (if gh CLI is authenticated)
If no authentication is available, workflow tools will provide clear error messages with setup instructions.
Available Tools
The NervusDB MCP server provides 13 tools across 4 categories:
1. Workflow Tools ⚙️
workflow.startTask
- Create task branch and update ledgerworkflow.submitForReview
- Push branch and create pull request (requires GitHub authentication)
2. Project Tools
project.getStructure
- Get project file structure with statisticsproject.analyzeImpact
- Analyze code impact based on knowledge graphproject.findRelatedFiles
- Find files related to a target fileproject.readFile
- Read arbitrary file content
3. Code Tools
code.readFile
- Read project file contentcode.writeFile
- Write content to project file (requires confirmation)code.runTests
- Run tests using Vitest and return results
4. Database Tools
db.getStats
- Get index metadata and statisticsdb.query
- Execute typed or raw queries against knowledge graphdb.rebuildIndex
- Rebuild project index with telemetrydb.getHealth
- Check index health with fingerprint validation
Usage Example
How It Works
Indexing: Uses
repomix
to collect project files and@nervusdb/core
to build a knowledge graphStorage: Maintains shadow indices with fingerprint validation for data integrity
Query: Provides typed and raw query interfaces to explore code relationships
Workflow: Integrates with Git workflows for task management
Project Structure
Development
Documentation
Tools Overview - Detailed documentation for all 13 tools
Contributing
See CONTRIBUTING.md for development guidelines.
License
MIT
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
Enables building and querying code knowledge graphs for project analysis, with tools for exploring code relationships, managing workflows, and automating development tasks. Integrates with Git and GitHub for branch management and pull request creation.