NeoCoder: Neo4j-Guided AI Coding Workflow

by angrysky56

20 532 downloads Not rated yet MIT
GitHub

About

An MCP server allowing AI assistants to use a Neo4j knowledge graph as their primary, dynamic instruction manual and long term project memory with adaptive templating and autonomous tool development tools.

Details

License
MIT

Explore

- Hybrid Knowledge Reasoning: Seamlessly combine structured facts with semantic context
- Dynamic Knowledge Extraction: Process documents, code, and conversations into interconnected knowledge structures
- Citation-Based Analysis: Every claim tracked to its source across multiple databases
- Multi-Incarnation System: Specialized modes for coding, research, decision support, and knowledge management
- Intelligent Workflow Templates: Neo4j-guided procedures with mandatory verification steps

🧠 Smart Query Routing: AI automatically determines optimal data source (graph, vector, or hybrid)
🔬 Research Analysis Engine: Process academic papers with citation graphs and semantic content
⚡ F-Contraction Processing: Dynamically merge similar concepts while preserving provenance
🎯 Context-Augmented Reasoning: Generate insights impossible with single data sources
📊 Full Audit Trails: Complete tracking of knowledge synthesis and workflow execution
🛡️ Production-Ready Process Management: Automatic cleanup, signal handling, and resource tracking to prevent process leaks
🔧 Enhanced Tool Handling: Robust async initialization with proper background task management

New from an idea I had-
Lotka-Volterra Ecological Framework integrated into Knowledge Graph Incarnation

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name NeoCoder: Neo4j-Guided AI Coding Workflow
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- Neo4j: Running locally or remote instance (for structured knowledge graphs)
- Qdrant: Vector database for semantic search and embeddings (for hybrid reasoning)
- Python 3.10+: For running the MCP server
- uv: The Python package manager for MCP servers
- Claude Desktop: For using with Claude AI

- MCP-Desktop-Commander: Invaluable for CLI and filesystem operations

- For the Lotka-Volterra Ecosystem and generally enhanced abilities-

- wolframalpha-llm-mcp: really nice!

- mcp-server-qdrant-enhanced: My qdrant-enhanced mcp server

- Optional for more utility
- arxiv-mcp-server

This incarnation is still being developed
- For Code Analysis Incarnation: AST/ASG: Currently needs development and an incarnation re-write

- Get a free API key from WolframAlpha:

To get a free API key (AppID) for Wolfram|Alpha, you need to sign up for a Wolfram ID and then register an application on the Wolfram|Alpha Developer Portal.

Create a Wolfram ID: If you don't already have one, create a Wolfram ID at https://account.wolfram.com/login/create

Navigate to the Developer Portal: Once you have a Wolfram ID, sign in to the Wolfram|Alpha Developer Portal https://developer.wolframalpha.com/portal/myapps

Sign up for your first AppID: Click on the "Sign up to get your first AppID" button.

Fill out the AppID creation dialog: Provide a name and a simple description for your application.

Receive your AppID: After filling out the necessary information, you will be presented with your API key, also referred to as an AppID.

The Wolfram|Alpha API is free for non-commercial usage, and you get up to 2,000 requests per month.

Each application requires its own unique AppID.

Make sure you have pyenv and uv installed.

pyenv install 3.11.12  # if not already installed
pyenv local 3.11.12
uv venv
source .venv/bin/activate
uv pip install -e '.[dev,docs,gpu]'

async def initialize_schema(self):
"""Initialize the schema for your incarnation."""

async def your_tool_name(self, param1: str, param2: Optional[int] = None) -> List[types.TextContent]:
"""Tool description."""

The MCP server provides the following tools to AI assistants:

- check_connection: Verify Neo4j connection status
- get_guidance_hub: Entry point for AI navigation
- get_action_template: Get a specific workflow template
- list_action_templates: See all available templates
- get_best_practices: View coding standards
- get_project: View project details including README
- list_projects: List all projects in the system
- log_workflow_execution: Record a successful workflow completion
- get_workflow_history: View audit trail of work done
- add_template_feedback: Provide feedback on templates
- run_custom_query: Run direct Cypher queries
- write_neo4j_cypher: Execute write operations on the graph

- get_current_incarnation: Get the currently active incarnation
- list_incarnations: List all available incarnations
- switch_incarnation: Switch to a different incarnation
- suggest_tool: Get tool suggestions based on task description

Each incarnation provides additional specialized tools that are automatically registered when the incarnation is activated.

The Knowledge Graph incarnation provides advanced hybrid reasoning capabilities that combine structured graph data with semantic vector search:

Core Knowledge Management:
- create_entities: Create multiple entities with observations and proper Neo4j labeling
- create_relations: Connect entities with typed relationships and timestamps
- add_observations: Add timestamped observations to existing entities
- delete_entities: Remove entities with cascading deletion of relationships
- delete_observations: Targeted removal of specific observation content
- delete_relations: Remove specific relationships while preserving entities
- read_graph: View entire knowledge graph with entities, observations, and relationships
- search_nodes: Full-text search across entity names, types, and observation content
- open_nodes: Get detailed entity information with incoming/outgoing relationships

Advanced Hybrid Reasoning Tools:
- KNOWLEDGE_QUERY Workflow: Intelligent hybrid querying system
- Smart query routing (graph-centric, vector-centric, or hybrid)
- Parallelized data retrieval from Neo4j and Qdrant
- Cross-database synthesis with mandatory citation tracking
- Conflict detection and source prioritization

- KNOWLEDGE_EXTRACT Workflow: Dynamic knowledge extraction with F-Contraction
- Document ingestion with metadata extraction
- Dual storage: text chunks in Qdrant, entities in Neo4j
- LLM-powered entity extraction and relationship discovery
- F-Contraction merging of similar concepts with source preservation
- Cross-reference mapping between graph and vector data
- Quality validation and extraction reporting

Research Analysis Capabilities:
- Citation Graph Construction: Build paper-author-institution networks
- Multi-Hop Synthesis: Trace concept evolution through connected sources
- Temporal Analysis: Track changes and developments over time
- Conflict Resolution: Handle contradictory information from multiple sources
- Source Attribution: Complete provenance tracking from raw data to conclusions

Integration Features:
- Qdrant Collections: Seamless integration with vector databases for semantic search
- Cross-Database Navigation: Bi-directional linking between structured and semantic data
- Memory Integration: Connect with long-term memory systems for continuity
- MCP Orchestration: Advanced tool coordination and workflow management

The MCP server includes a toolkit for managing and searching Cypher query snippets:

- list_cypher_snippets: List all available Cypher snippets with optional filtering
- get_cypher_snippet: Get a specific Cypher snippet by ID
- search_cypher_snippets: Search for Cypher snippets by keyword, tag, or pattern
- **create_cypher

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "neocoder: neo4j-guided ai coding workflow": {
            "NeoCoder-neo4j-ai-workflow": {
                "command": "uv",
                "args": [
                    "venv"
                ]
            }
        }
    }
}

McpServers

{
    "NeoCoder-neo4j-ai-workflow": {
        "command": "uv",
        "args": [
            "venv"
        ]
    }
}

An MCP server implementation that enables AI assistants like Claude to use a Neo4j knowledge graph as their primary, dynamic "instruction manual" and project memory for standardized coding workflows.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.