loading…
Search for a command to run...
loading…
Enables graph database operations on FalkorDB via MCP, allowing Cypher queries, node retrieval, and graph listing.
Enables graph database operations on FalkorDB via MCP, allowing Cypher queries, node retrieval, and graph listing.
MCP server for graph database operations using FalkorDB - a high-performance graph database via Redis protocol.
Status: ✅ Production Ready
All tools support multiple output formats (JSON, Markdown, RAW) for flexible integration with different clients.
# Using Docker (Recommended)
docker run -p 6379:6379 falkordb/falkordb:latest
# Or using docker-compose
docker-compose up -d
Or install locally: FalkorDB Quick Start
cd /path/to/w3-mcp-server-falkordb
# Remove old lockfile and venv
rm -rf uv.lock .venv venv
# Unset old environment variable
unset VIRTUAL_ENV
# Install Python dependencies (using uv)
uv sync
# (Optional) Install MCP CLI for dev inspector
uv pip install 'mcp[cli]'
Create a .env file or export environment variables:
# FalkorDB (supports redis://, http://, and https:// schemes)
export FALKORDB_URL=redis://localhost:6379
export FALKORDB_PASSWORD= # Optional if using authentication
# Or create .env file
cat > .env << EOF
FALKORDB_URL=redis://localhost:6379
FALKORDB_PASSWORD=
EOF
# Check FalkorDB health
curl http://localhost:6379/health 2>/dev/null || echo "FalkorDB running on port 6379"
# Check Python env
uv run python -c "from mcp.server.fastmcp import FastMCP; print('✓ MCP ready')"
For interactive testing with a web UI:
# Start MCP dev inspector (requires MCP CLI)
uv run mcp dev server.py
Opens URL like: http://localhost:5173
Features:
Note: If you just want to run the server for Claude Code integration, use uv run python server.py instead.
Simplest way to run the server:
cd /path/to/w3-mcp-server-falkordb
# Run server (stdio mode)
uv run python server.py
Best way to test and debug interactively:
cd /path/to/w3-mcp-server-falkordb
# Start MCP dev inspector (requires MCP CLI)
uv run mcp dev server.py
Opens web UI at http://localhost:5173:
pip install w3-mcp-server-falkordb
# or
uv pip install w3-mcp-server-falkordb
Edit ~/.claude/claude_config.json:
{
"mcpServers": {
"falkordb": {
"type": "stdio",
"command": "uv",
"args": ["run", "--with", "w3-mcp-server-falkordb", "w3-mcp-server-falkordb"],
"env": {
"FALKORDB_URL": "redis://localhost:6379",
"FALKORDB_PASSWORD": ""
}
}
}
}
Edit ~/.claude/claude_config.json:
{
"mcpServers": {
"falkordb": {
"type": "stdio",
"command": "uv",
"args": ["run", "server.py"],
"cwd": "/path/to/w3-mcp-server-falkordb",
"env": {
"FALKORDB_URL": "redis://localhost:6379",
"FALKORDB_PASSWORD": ""
}
}
}
}
Then restart Claude Code.
| Tool | Read-Only | Idempotent | Safe |
|---|---|---|---|
| falkordb_query | ❌ No (supports writes) | ❌ No | ⚠️ Use params for safety |
| falkordb_get_nodes | ✅ Yes (read-only) | ✅ Yes | ✅ Safe |
| falkordb_list_graphs | ✅ Yes (read-only) | ✅ Yes | ✅ Safe |
Execute a Cypher query against FalkorDB with optional parameterization.
Parameters:
query (string, required): Cypher query to executegraph (string, required): Graph name to queryparams (object, optional): Query parameters/variables ($name, $value, etc.)response_format (string): "json", "markdown", or "raw" (default: "json")Examples:
{
"query": "MATCH (n:Person) RETURN n.name, n.age LIMIT 10",
"graph": "default",
"response_format": "markdown"
}
{
"query": "MATCH (n:Person {name: $name}) RETURN n",
"graph": "default",
"params": {"name": "Alice"},
"response_format": "json"
}
Output (Markdown):
## Query Results
Graph: `default`
Status: ✓ Success
### Results — 2 row(s)
Columns: `name, age`
**Row 1:**
- **name:** `Alice`
- **age:** `30`
**Row 2:**
- **name:** `Bob`
- **age:** `25`
Output (JSON):
{
"success": true,
"data": {
"columns": ["name", "age"],
"rows": [
{"name": "Alice", "age": 30},
{"name": "Bob", "age": 25}
],
"count": 2,
"stats": ["took 1.5 ms"]
},
"graph": "default"
}
Get node information from a graph with optional label filtering.
Parameters:
graph (string, required): Graph name to querylabel (string, optional): Node label to filter by (e.g., "Person", "Company")limit (integer, 1-1000): Max nodes to return (default: 10)response_format (string): "json" or "markdown" (default: "json")Examples:
{
"graph": "default",
"label": "Person",
"limit": 5,
"response_format": "markdown"
}
Output (Markdown):
## Nodes in Graph 'default'
🏷️ Label Filter: `Person`
📊 Limit: 5
✓ Found 5 node(s):
### Node 1
- **id:** `1`
- **name:** `Alice`
- **email:** `[email protected]`
Output (JSON):
{
"success": true,
"data": {
"columns": ["n"],
"rows": [
{"n": {"id": 1, "name": "Alice", "email": "[email protected]"}},
{"n": {"id": 2, "name": "Bob", "email": "[email protected]"}}
],
"count": 2,
"stats": []
},
"graph": "default"
}
List all available graphs in FalkorDB instance.
Parameters:
response_format (string): "json" or "markdown" (default: "json")Example:
{
"response_format": "json"
}
Output (JSON):
{
"url": "redis://localhost:6379",
"status": "connected",
"graphs": [
{"name": "default", "status": "accessible"},
{"name": "myapp", "status": "accessible"}
],
"total_count": 2
}
Output (Markdown):
## FalkorDB Graphs
🔗 Server: `redis://localhost:6379`
✓ Status: Connected
📊 Total Graphs: 2
### Available Graphs
1. **default** - ✓ accessible
2. **myapp** - ✓ accessible
Specifies the connection URL for your FalkorDB server (supports http://, https://, and redis:// schemes).
Default: redis://localhost:6379
Set via:
Environment variable:
export FALKORDB_URL=redis://localhost:6379
uv run python server.py
.env file:
FALKORDB_URL=redis://localhost:6379
In claude_config.json:
"env": {
"FALKORDB_URL": "redis://localhost:6379"
}
Optional authentication password for FalkorDB.
Default: Empty (no authentication)
w3-mcp-server-falkordb/
├── server.py # MCP server entry point
├── pyproject.toml # Project config
├── .env.example # Environment variables template
├── README.md # This file
├── docker-compose.yml # Docker setup (optional)
└── tests/
└── test_mcp_server.py # Integration tests (optional)
MCP Client (Claude, IDE, etc.)
↓
MCP Server (server.py)
↓
FalkorDB: graph queries
# Via Claude/MCP interface
falkordb_query(
query="MATCH (n:Person) WHERE n.age > 25 RETURN n.name, n.age",
graph="default",
response_format="markdown"
)
# Via Claude/MCP interface
falkordb_get_nodes(
graph="default",
label="Person",
limit=20,
response_format="json"
)
# Via Claude/MCP interface
falkordb_query(
query="MATCH (n:Person {email: $email}) RETURN n",
graph="default",
params={"email": "[email protected]"},
response_format="json"
)
pytest tests/
black server.py
ruff check server.py
For development and debugging, use MCP dev inspector:
uv run mcp dev server.py
Web UI at http://localhost:5173 provides:
limit to control result size and response timeparams for dynamic values to avoid injection# Check if FalkorDB is running
redis-cli ping
# Or test with curl (if HTTP endpoint available)
curl http://localhost:6379/
# Start FalkorDB with Docker
docker run -p 6379:6379 falkordb/falkordb:latest
graph parameter in your query# Clean reinstall
rm -rf .venv uv.lock
uv sync
# Verify installation
uv run python -c "from mcp.server.fastmcp import FastMCP; print('✓ MCP installed')"
redis-cli pingredis-cli -p 6379 pingCREATE (p:Person {name: 'Alice', age: 30})
CREATE (c:Company {name: 'Tech Corp'})
MATCH (p:Person {name: 'Alice'})
MATCH (c:Company {name: 'Tech Corp'})
CREATE (p)-[:WORKS_AT]->(c)
MATCH (p:Person)
WHERE p.age > 25 AND p.age < 35
RETURN p.name, p.age
ORDER BY p.age DESC
LIMIT 10
MATCH (p:Person)-[:WORKS_AT]->(c:Company)
RETURN p.name, c.name, count(*) as employee_count
GROUP BY p.name, c.name
MIT
Contributions are welcome! Please feel free to submit a Pull Request.
For issues and questions, please visit:
Run in your terminal:
claude mcp add w3-mcp-falkordb-server -- npx Security
Low riskAutomated heuristic from public metadata — not a security guarantee.