Neo4j MCP Server
Provides Cypher query execution and schema exploration for Neo4j graph databases, enabling AI agents to read and write data, retrieve node labels, attributes, and relationships.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Neo4j MCP Serverfind all movies directed by Christopher Nolan"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
πβοΈ Neo4j MCP Server (TypeScript)
π Overview
A Model Context Protocol (MCP) server implementation in TypeScript that provides database interaction and allows graph exploration capabilities through Neo4j. This server enables running Cypher graph queries, analyzing complex domain data, and automatically generating business insights that can be enhanced with Claude's analysis.
This is a TypeScript port of the original Python mcp-neo4j-cypher server.
Related MCP server: Neo4j MCP Server
π§© Components
π οΈ Tools
The server offers these core tools:
π Query Tools
read_neo4j_cypherExecute Cypher read queries to read data from the database
Input:
query(string): The Cypher query to executeparams(object, optional): Parameters to pass to the Cypher query
Returns: Query results as JSON serialized array of objects
write_neo4j_cypherExecute updating Cypher queries
Input:
query(string): The Cypher update queryparams(object, optional): Parameters to pass to the Cypher query
Returns: A JSON serialized result summary counter with update statistics
πΈοΈ Schema Tools
get_neo4j_schemaGet a list of all node types in the graph database, their attributes with name, type and relationships to other node types
No input required
Returns: JSON serialized list of node labels with two dictionaries: one for attributes and one for relationships
π·οΈ Namespacing
The server supports namespacing to allow multiple Neo4j MCP servers to be used simultaneously. When a namespace is provided, all tool names are prefixed with the namespace followed by a hyphen (e.g., mydb-read_neo4j_cypher).
π¦ Installation
Clone this repository or copy the source files to your project
Install dependencies:
cd neo4j-mcp-typesccript yarn installBuild the TypeScript code:
yarn build
π§ͺ Testing the Connection
Before running the server, you can test your Neo4j connection:
yarn test:connectionThis will verify that the server can connect to your Neo4j instance.
π Usage
π₯οΈ Command Line
You can run the server directly from the command line:
# Using stdio transport (default)
node dist/index.js --db-url bolt://localhost:7687 --username neo4j --password password
# Using HTTP transport
node dist/index.js --transport http --server-host 0.0.0.0 --server-port 8000
# Using SSE transport
node dist/index.js --transport sse --server-host 0.0.0.0 --server-port 8000π§ Environment Variables
You can also configure the server using environment variables:
# Neo4j Connection
export NEO4J_URI=bolt://localhost:7687
export NEO4J_USERNAME=neo4j
export NEO4J_PASSWORD=password
export NEO4J_DATABASE=neo4j
# MCP Server Configuration
export NEO4J_TRANSPORT=stdio
export NEO4J_NAMESPACE=mydb
export NEO4J_MCP_SERVER_HOST=127.0.0.1
export NEO4J_MCP_SERVER_PORT=8000
export NEO4J_MCP_SERVER_PATH=/mcp/
# Then run
node dist/index.jsπ» Claude Desktop Integration
Add the server to your claude_desktop_config.json:
{
"mcpServers": {
"neo4j-typescript": {
"command": "node",
"args": ["/path/to/neo4j-mcp-typescript/dist/index.js"],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USERNAME": "neo4j",
"NEO4J_PASSWORD": "your-password",
"NEO4J_DATABASE": "neo4j"
}
}
}
}π³ Docker Support
You can also run this in a Docker container. Create a Dockerfile:
FROM node:18-alpine
WORKDIR /app
# Copy package files
COPY package*.json ./
RUN npm install
# Copy source files
COPY . .
# Build TypeScript
RUN npm run build
# Set environment variables
ENV NEO4J_URI="bolt://host.docker.internal:7687"
ENV NEO4J_USERNAME="neo4j"
ENV NEO4J_PASSWORD="password"
ENV NEO4J_DATABASE="neo4j"
ENV NEO4J_TRANSPORT="http"
ENV NEO4J_MCP_SERVER_HOST="0.0.0.0"
ENV NEO4J_MCP_SERVER_PORT="8000"
ENV NEO4J_MCP_SERVER_PATH="/api/mcp/"
EXPOSE 8000
CMD ["node", "dist/index.js"]π Transport Modes
The server supports different transport protocols:
STDIO (default for local development): Standard input/output for Claude Desktop and local tools
HTTP: RESTful HTTP for web deployments and microservices
SSE: Server-Sent Events for web-based deployments
π§ Development
Clone the repository
Install dependencies:
yarn installRun in development mode:
yarn devBuild for production:
yarn buildRun tests:
yarn test(if tests are added)
π License
This MCP server is licensed under the MIT License.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yarinvak/neo4j-mcp-typescript'
If you have feedback or need assistance with the MCP directory API, please join our Discord server