iTranslated by AI
🚀 After the Ultimate Debugging: Running the Neo4j MCP Server and Integrating a Knowledge Graph into AI Agents
Introduction
In the previous article, we tackled the major obstacle of MCP servers being "unable to start" in a Windows environment, and succeeded in launching the Neo4j server using the brute-force method of specifying the full path of the executable.
This article documents the moment when that effort pays off: a practical test in which Claude Desktop autonomously operates a knowledge graph database (Neo4j) and answers complex questions.
We will explain how powerful MCP-based function extension is, through specific test examples and success logs.
1. Evidence of Success: An Environment Where Three Functions Collaborate
First, the environment we built has the following three servers working together via JSON configuration.
The startup command for the Neo4j server is fixed with a full path to avoid environment dependencies.
| Server Name | Function | Role | Notes |
|---|---|---|---|
| filesystem | File operations | Create/edit local files | Node.js-based |
| fetch | Web page retrieval | Read and summarize URL contents | Python-based |
| movies-neo4j | Knowledge graph search | Execute Cypher queries on Neo4j database | Python-based (launched with full path) |
Lessons from DXT Installation and Full Path Specification (Summary of Memo)
The lesson learned from this experience is the stability of environment setup.
- Installing DXT files: The .dxt file did not work with a double-click; we had to move the file to the Claude Extension folder via Claude Desktop > Settings > Extensions > Advanced settings, then install it.
- Stabilizing startup commands: Avoid environment-dependent commands like
uvxorpython -m, and directly specifying the full path of the executable file, e.g.,"command": "C:\\Users\\...\\mcp-neo4j-cypher.exe", provided the most stable startup.
Execution Attempts, But Errors Occur
We tried entering a prompt, but an error occurred stating that the database could not be connected.
It seemed the environment variables in the claude_desktop_config.json file of the MCP server "mcp-neo4j-cypher" were incorrect.
Before change:
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USERNAME": "neo4j",
"NEO4J_PASSWORD": "recommendations",
"NEO4J_DATABASE": "neo4j"
After change:
"env": {
"NEO4J_URI": "bolt://localhost:7473",
"NEO4J_USERNAME": "recommendations",
"NEO4J_PASSWORD": "recommendations",
"NEO4J_DATABASE": "recommendations"
The port number was wrong, and after changing the username, password, and database all to "recommendations" and executing again, the MCP server started working as shown below.
2. Practical Test: Giving the AI Agent Access to the Knowledge Graph
With the Neo4j server in a Running state, the AI agent acquired a new "tool" to access the knowledge graph.
The test began by first using the existing fetch server to retrieve Neo4j tutorial information.
2-1. Preliminary Investigation Using the Fetch Server

One of the strengths of MCP is the ability to coordinate multiple tools.
First, we used the fetch tool to load the Neo4j tutorial URL and had Claude investigate what kind of questions would be effective.
Instruction to Claude: "Read the specified URL and execute the tutorial for the MCP server mcp-neo4j-cypher. First, show me a concrete example of instructions to the MCP server."
Result: Claude summarized the URL content and generated the following specific example questions.
💡 Example Instructions to Neo4j from Claude


- Basic search query: Find movies directed by Quentin Tarantino in the movie database.
- Related information search: What other popular movies have the actors from Kill Bill appeared in?
- Schema information retrieval and detailed investigation: Tell me more about Tusk.
- Recommendation: Among the movie list obtained from actors in Gattaca and Kill Bill, tell me the highest-rated movie with detailed information.
2-2. Verification of Autonomous Operation and Analysis of Success Logs
By executing these advanced questions, we verify whether the AI agent can autonomously select tools and generate correct parameters (Cypher queries).
The success log when we asked Claude the most basic question, "Find movies directed by Quentin Tarantino," is as follows:
1. Claude's Reasoning and Tool Call (tools/call)
Claude understood the intent of the question and decided to call a tool (likely cypher_query) of the movies-neo4j server.
At that point, it converted the question into Cypher, the language that Neo4j understands.
MATCH (p:Person {name: 'Quentin Tarantino'})-[:DIRECTED]->(m:Movie)
RETURN m.title, m.year, m.imdbRating
ORDER BY m.year
2. Normal Response from the Server
The Neo4j server received this Cypher query and executed it on the database.
The results are returned to Claude Desktop in JSON-RPC format.
[
{"m.title": "Reservoir Dogs", "m.year": 1992, "m.imdbRating": 8.4},
{"m.title": "Pulp Fiction", "m.year": 1994, "m.imdbRating": 8.9},
{"m.title": "Four Rooms", "m.year": 1995, "m.imdbRating": 6.7},
// ... other movies continue
]
Found movies directed by Quentin Tarantino in chronological order:
- Reservoir Dogs (1992) - IMDb Rating: 8.4
- Pulp Fiction (1994) - IMDb Rating: 8.9
- Four Rooms (1995) - IMDb Rating: 6.7
- Jackie Brown (1997) - IMDb Rating: 7.5
- Kill Bill: Vol. 1 (2003) - IMDb Rating: 8.1
- Kill Bill: Vol. 2 (2004) - IMDb Rating: 8.0
- Sin City (2005) - IMDb Rating: 8.1
- Grindhouse (2007) - IMDb Rating: 7.6
- Death Proof (2007) - IMDb Rating: 7.1
- Inglourious Basterds (2009) - IMDb Rating: 8.3
- Django Unchained (2012) - IMDb Rating: 8.5
- The Hateful Eight (2015) - IMDb Rating: 8.0
The highest rated is Pulp Fiction (1994, 8.9), followed by Django Unchained (2012, 8.5).

Claude receives this JSON result as context and generates a response in natural language that humans can understand, completing the entire process.
3. Conclusion: MCP Expands the AI Agent's "Brain"
Through this verification, I realized that building and integrating MCP servers is not just about API integration but about expanding the AI agent's reasoning capabilities.
Although the barrier of environment setup was high, by finding the solution of specifying the full path, we gained the following abilities:
- Advanced information retrieval: Search based on complex relationships (knowledge graphs) within the database is now possible.
- Autonomous language translation: The AI autonomously converts natural language questions into the database query language (Cypher) and executes them.
This success experience is a significant step forward that demonstrates MCP's potential. I will continue to master this knowledge graph and take on more complex tasks.
Reference: claude_desktop_config.json Configuration Example
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"c:\\Users\\Public\\Documents",
"c:\\Users\\Public\\Downloads"
]
},
"fetch": {
"command": "python",
"args": ["-m", "mcp_server_fetch"],
"env": {
"PYTHONIOENCODING": "utf-8"
}
},
"movies-neo4j": {
"command": "C:\\Users\\Koga Hiroaki\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\Scripts\\mcp-neo4j-cypher.exe",
"args": [ "--db-url", "neo4j+s://demo.neo4jlabs.com",
"--user", "recommendations",
"--password", "recommendations" ],
"env": {
"NEO4J_URI": "bolt://localhost:7473",
"NEO4J_USERNAME": "recommendations",
"NEO4J_PASSWORD": "recommendations",
"NEO4J_DATABASE": "recommendations"
}
}
}
}
Reference URL
Discussion