neo4j-mcp

neo4j-mcp

1

The Neo4j MCP Server for Cursor allows users to interact seamlessly with Neo4j databases from the Cursor IDE. It provides tools for database connection, query execution, and information retrieval, utilizing the official MCP SDK for integration.

Neo4j MCP Server for Cursor

A Cursor MCP (Model Context Protocol) server enabling interaction with Neo4j databases directly from the Cursor IDE.

Features

  • Connect to Neo4j databases
  • Execute Cypher queries and retrieve results
  • Transform Neo4j data types to JavaScript objects
  • Use official MCP SDK with stdio transport
  • Secure credential management with environment variables
  • Retrieve database information and metrics
  • Monitor connection status and diagnostics

Prerequisites

  • Bun (v1.0.0 or higher)
  • Neo4j database (local or remote)

Usage

Starting the Server

The server communicates with Cursor using stdio transport. Typically started by Cursor, but can be tested manually.

Available Tools

  1. Connect with explicit credentials
  2. Connect using environment variables
  3. Execute a Cypher query
  4. Get database information
  5. Get connection status
  6. Disconnect from Neo4j

Integration with Cursor

This MCP server integrates with Cursor's MCP capabilities, automatically detected and used by Cursor.

Development

Project structure includes an entry point, server implementation, service operations, type definitions, and error handling utilities. Build for production by bundling dependencies into a single output file.