Logo: FalkorDB MCP Server

FalkorDB MCP Server

Organisatioun
FalkorDB

FalkorDB-MCPServer is an MCP (Model Context Protocol) server that connects LLMs to FalkorDB

EditeurFalkorDB
RepositoryFalkorDB-MCPServer
SproochTypeScript
Forks
19
Stären
41
Disponibel Tools
0
Transporttypstdio, streamable-http
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    FalkorDB MCP Server bitt MCP-Funktiounen un, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • Disponibel Tools: 0

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an deem MCP-Client ze konfiguréieren, deen Dir am léifste benotzt.

  • Interessi vun der Communautéit um Open-Source-Projet

    Zuele vum verlinkte Repository – Stären: 41, Forks: 19.

MCP Toplist

Tests codecov License Discord X (formerly Twitter) MCP Compatible

FalkorDB MCP Server

Try Free

A Model Context Protocol (MCP) server for FalkorDB, allowing AI models to query and interact with graph databases. FalkorDB MCP Server enables AI assistants like Claude to interact with FalkorDB graph databases using natural language. Query your graph data, create relationships, and manage your knowledge graph - all through conversational AI.

🎯 What is this?

This server implements the Model Context Protocol (MCP), allowing AI models to:

  • Query graph databases using OpenCypher (with read-only mode support)
  • Create and manage nodes and relationships
  • List and explore multiple graphs
  • Delete graphs when needed
  • Read-only queries for replica instances or to prevent accidental writes

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • FalkorDB instance (running locally or remotely)
  • Claude Desktop app (for AI integration)

Running from npm

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

json
{
  "mcpServers": {
    "falkordb": {
      "command": "npx",
      "args": [
        "-y",
        "@falkordb/mcpserver@latest"
      ],
      "env": {
        "FALKORDB_HOST": "localhost",
        "FALKORDB_PORT": "6379",
        "FALKORDB_USERNAME": "",
        "FALKORDB_PASSWORD": ""
      }
    }
  }
}

Running with npx

You can run the server directly from the command line using npx:

Using inline environment variables:

bash
# Run with stdio transport (default)
FALKORDB_HOST=localhost FALKORDB_PORT=6379 npx -y @falkordb/mcpserver

# Run with HTTP transport
MCP_TRANSPORT=http MCP_PORT=3005 FALKORDB_HOST=localhost FALKORDB_PORT=6379 npx -y @falkordb/mcpserver

Using a .env file:

bash
# Using dotenv-cli to load environment variables from .env
npx dotenv-cli -e .env -- npx @falkordb/mcpserver

This is useful for:

  • Quick testing and development
  • Running the server standalone without Claude Desktop
  • Custom integrations and scripting

Docker Compose

Run FalkorDB and the MCP server together:

bash
cp .env.example .env   # create env file; edit to set MCP_API_KEY, FALKORDB_PASSWORD, etc.
docker compose up -d

Note: Skipping the .env file leaves variables like MCP_API_KEY and FALKORDB_PASSWORD empty, which disables API key authentication and uses no database password.

This starts FalkorDB with health checks and persistent volumes, plus the MCP server pre-configured to connect to it.

The MCP server runs in HTTP transport mode and is exposed on localhost:8080 by default. To connect a client, configure it to use:

  • Transport: http
  • URL: http://localhost:8080
  • API Key: Set via the MCP_API_KEY environment variable (optional)

See docker-compose.yml for the exact port and configuration values.

Installation

  1. Clone and install:

    bash
    git clone https://github.com/FalkorDB/FalkorDB-MCPServer.git
    cd FalkorDB-MCPServer
    npm install
  2. Configure environment:

    bash
    cp .env.example .env

    Edit .env:

    env
    # Environment Configuration
    NODE_ENV=development
    
    # FalkorDB Configuration
    FALKORDB_HOST=localhost
    FALKORDB_PORT=6379
    FALKORDB_USERNAME=    # Optional
    FALKORDB_PASSWORD=    # Optional
    FALKORDB_DEFAULT_READONLY=false  # Set to 'true' for read-only mode (useful for replicas)
    
    # Logging Configuration (optional)
    ENABLE_FILE_LOGGING=false
  3. Build the project:

    bash
    npm run build

🤖 Claude Desktop Integration

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

json
{
  "mcpServers": {
    "falkordb": {
      "command": "node",
      "args": [
        "/absolute/path/to/falkordb-mcpserver/dist/index.js"
      ]
    }
  }
}

Restart Claude Desktop and you'll see the FalkorDB tools available!

📚 Available MCP Tools

Once connected, you can ask Claude to:

🔍 Query Graphs

text
"Show me all people who know each other"
"Find the shortest path between two nodes"
"What relationships does John have?"
"Run a read-only query on the replica instance"

Note: The query_graph tool now supports a readOnly parameter to execute queries in read-only mode using GRAPH.RO_QUERY. This is ideal for:

  • Running queries on replica instances
  • Preventing accidental write operations
  • Ensuring data integrity in production environments

There's also a dedicated query_graph_readonly tool that always executes queries in read-only mode.

Parameterized queries: The query_graph and query_graph_readonly tools accept an optional params object so values can be passed separately from the query text (referenced as $name), instead of string-concatenating them into Cypher. This avoids query-injection risks and malformed queries. For example, a query of MATCH (p:Person {name: $name}) RETURN p with params: { "name": "Alice" }. Parameter names (including nested map keys) must be valid identifiers. Note: FalkorDB does not allow parameters in LIMIT/SKIP clauses.

📝 Manage Data

text
"Create a new person named Alice who knows Bob"
"Add a 'WORKS_AT' relationship between Alice and TechCorp"

📊 Explore Structure

text
"List all available graphs"
"Show me the schema of the movies graph"
"What properties do Person nodes usually have in the movies graph?"
"What properties are on ACTED_IN relationships in the movies graph?"
"Delete the old_test graph"

Schema discovery: FalkorDB is schemaless, so three tools help an agent orient itself before querying:

  • get_graph_schema — returns node labels, relationship types, and (optionally) the connection topology. Each connection is { source, relationship, target } where source and target are arrays of node labels (a node may have multiple labels) and relationship is the relationship type. Topology is derived from a bounded sample of relationships (connectionSampleSize, default 10000) and can be turned off with includeConnections: false on very large graphs.
  • get_node_schema / get_relationship_schema — sample up to sampleSize (default 100) nodes/relationships of a given label/type and rank their property keys by frequency, returning the actual sampledCount alongside requestedSampleSize. Useful for spotting property naming drift.

All three schema tools always execute read-only (GRAPH.RO_QUERY), so they are safe to run against replica/read-only deployments.

A typical orientation workflow is: list_graphs → get_graph_schema → get_node_schema / get_relationship_schema → query_graph.

🛠️ Development

Commands

bash
# Development with hot-reload
npm run dev

# Development with TypeScript execution (faster startup)
npm run dev:ts

# Run tests
npm test

# Run tests in watch mode
npm run test:watch

# Run tests with coverage report
npm run test:coverage

# Lint code
npm run lint

# Lint and auto-fix issues
npm run lint:fix

# Build for production
npm run build

# Start production server
npm start

# Inspect MCP server with debugging tools
npm run inspect

# Clean build artifacts
npm run clean

# Full CI pipeline (test, lint, build)
npm run prepublish

Project Structure

text
src/
├── index.ts                   # MCP server entry point
├── services/                  # Core business logic
│   ├── falkordb.service.ts   # FalkorDB operations
│   └── logger.service.ts     # Logging and MCP notifications
├── mcp/                      # MCP protocol implementations
│   ├── tools.ts             # MCP tool definitions
│   ├── resources.ts         # MCP resource definitions
│   └── prompts.ts           # MCP prompt definitions
├── errors/                   # Error handling framework
│   ├── AppError.ts          # Custom error classes
│   └── ErrorHandler.ts      # Global error handling
├── config/                   # Configuration management
│   └── index.ts             # Environment configuration
├── models/                   # TypeScript type definitions
│   ├── mcp.types.ts         # MCP protocol types
│   └── mcp-client-config.ts # Configuration models
└── utils/                    # Utility functions
    └── connection-parser.ts  # Connection string parsing

🔧 Advanced Configuration

Transport Modes

The server supports two transport modes:

stdio (default)

Used for direct integration with AI clients like Claude Desktop. Communication happens via standard input/output.

env
MCP_TRANSPORT=stdio

Streamable HTTP

Exposes the MCP server over HTTP for remote or networked access. Supports multiple concurrent sessions via the MCP Streamable HTTP protocol.

env
MCP_TRANSPORT=http
MCP_PORT=8080
MCP_API_KEY=your-secret-api-key  # Optional but recommended

When using HTTP transport, clients connect by sending a POST request with an initialize message. The server returns an Mcp-Session-Id header that must be included in subsequent requests. API key authentication is enforced via the Authorization: Bearer <key> header when MCP_API_KEY is set.

Testing HTTP transport:

  1. Start the server:

    bash
    MCP_TRANSPORT=http MCP_PORT=8080 npm start
  2. Use the MCP Inspector to connect:

    bash
    npx @modelcontextprotocol/inspector --transport streamable-http --url http://localhost:8080

Note: npm run inspect uses stdio transport. For HTTP, start the server and inspector separately as shown above.

API Key Authentication:

When MCP_API_KEY is set, all HTTP requests must include an Authorization header:

bash
MCP_TRANSPORT=http MCP_API_KEY=my-secret-key npm start

Clients must then send:

text
Authorization: Bearer my-secret-key

Requests without a valid key receive a 401 Unauthorized response. Auth is only enforced in HTTP mode — stdio mode ignores MCP_API_KEY since only the parent process can communicate.

Using with Docker

Using pre-built images from Docker Hub:

bash
# Use the latest stable release
docker pull falkordb/mcpserver:latest
docker run -p 8080:8080 \
  -e FALKORDB_HOST=host.docker.internal \
  -e FALKORDB_PORT=6379 \
  -e MCP_API_KEY=your-secret-key \
  falkordb/mcpserver:latest

# Or use the edge version (latest main branch)
docker pull falkordb/mcpserver:edge

# Or pin to a specific version
docker pull falkordb/mcpserver:1.0.0

Building locally:

bash
docker build -t falkordb-mcpserver .
docker run -p 8080:8080 \
  -e FALKORDB_HOST=host.docker.internal \
  -e FALKORDB_PORT=6379 \
  -e MCP_API_KEY=your-secret-key \
  falkordb-mcpserver

Or use with docker-compose alongside FalkorDB:

yaml
services:
  falkordb:
    image: falkordb/falkordb:latest
    ports:
      - "6379:6379"

  mcp-server:
    image: falkordb/mcpserver:latest  # or use 'build: .' to build locally
    ports:
      - "8080:8080"
    environment:
      - FALKORDB_HOST=falkordb
      - FALKORDB_PORT=6379
      - MCP_TRANSPORT=http
      - MCP_PORT=8080
      - MCP_API_KEY=your-secret-key
    depends_on:
      - falkordb

Using with Remote FalkorDB

For cloud-hosted FalkorDB instances:

env
FALKORDB_HOST=your-instance.falkordb.com
FALKORDB_PORT=6379
FALKORDB_USERNAME=your-username
FALKORDB_PASSWORD=your-secure-password

Read-Only Mode for Replica Instances

If you're connecting to a FalkorDB replica instance or want to ensure no write operations are performed, you can enable read-only mode by default:

env
FALKORDB_DEFAULT_READONLY=true

This will make all queries execute using GRAPH.RO_QUERY by default. You can still override this per-query by setting the readOnly parameter in the query_graph tool.

Use cases:

  • Replica instances: Prevent writes to read replicas in replication setups
  • Production safety: Ensure critical data isn't accidentally modified
  • Reporting/analytics: Run queries for dashboards without risk of data changes
  • Multi-tenant environments: Provide read-only access to certain users

Running Multiple Instances

You can run multiple MCP servers for different FalkorDB instances:

json
{
  "mcpServers": {
    "falkordb-dev": {
      "command": "node",
      "args": ["path/to/server/dist/index.js"],
      "env": {
        "FALKORDB_HOST": "dev.falkordb.local",
        "FALKORDB_DEFAULT_READONLY": "false"
      }
    },
    "falkordb-prod-replica": {
      "command": "node", 
      "args": ["path/to/server/dist/index.js"],
      "env": {
        "FALKORDB_HOST": "replica.falkordb.com",
        "FALKORDB_DEFAULT_READONLY": "true"
      }
    }
  }
}

📖 Example Usage

Here's what you can do once connected:

cypher
// Claude can help you write queries like:
MATCH (p:Person)-[:KNOWS]->(friend:Person)
WHERE p.name = 'Alice'
RETURN friend.name, friend.age

// Or create complex data structures:
CREATE (alice:Person {name: 'Alice', age: 30})
CREATE (bob:Person {name: 'Bob', age: 25})
CREATE (alice)-[:KNOWS {since: 2020}]->(bob)

// And even analyze your graph:
MATCH path = shortestPath((start:Person)-[*]-(end:Person))
WHERE start.name = 'Alice' AND end.name = 'Charlie'
RETURN path

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

🔗 Resources


Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "falkordb-falkordb-mcpserver": {
      "command": "",
      "args": []
    }
  }
}

FalkorDB MCP Server MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal FalkorDB MCP Server verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dir kënnt MCP lokal op Ärem Apparat ausféieren oder Iech iwwer d'URL mat engem externen MCP-Server verbannen.

Optioun 1: De lokale Connector benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector: D'Optioun „Dësen Apparat“ ass ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Setzt de kopéierte Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

FalkorDB MCP Server als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a setzt d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Setzt d'MCP-Serverkonfiguratioun fir FalkorDB MCP Server an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert d'Säit, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "falkordb-falkordb-mcpserver": {
      "command": "npx",
      "args": [
        "-y",
        "FalkorDB-MCPServer"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vun der Integratioun FalkorDB MCP Server. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vun der Integratioun FalkorDB MCP Server.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierten MCP-Tools an engem ausgewielte KI-Modell
Kënnt Dir mir mat FalkorDB MCP Server bei dëser Aufgab hëllefen?
FalkorDB MCP Server
Jo. Ech hunn et gelies.
Dat hunn ech mat FalkorDB MCP Server fonnt.

Optioun 2: Eng MCP-Server-URL derbäisetzen

Benotzt dës Optioun, wann FalkorDB MCP Server schonn op engem externe Server gehost gëtt oder Är Ekipp ee gemeinsame Connector wëllt, op dee méi Benotzer kënne zougräifen.

1

MCP-Connectoren opmaachen

Gitt an TypingMind op „Plugins“, maacht „MCP-Connectoren“ op a wielt dann „URL derbäisetzen“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Gitt op „Plugins“.
  3. Maacht „MCP-Connectoren“ op.
  4. Klickt op „URL derbäisetzen“.
TypingMind-Formulaire, fir eng benotzerdefinéiert MCP-Server-URL derbäizesetzen
2

Déi kopéiert Server-URL asetzen

Gitt Är Server-URL am Feld „Server-URL“ an. Setzt e Verbindungsnumm, eng Beschreiwung, e Symbol, benotzerdefinéiert HTTP-Headeren oder OAuth-Clientastellungen derbäi, wann de Server se erfuerdert.

  1. Setzt Är Server-URL an d'Feld „Server-URL“ an.
  2. Gitt en Numm fir d'Verbindung mat FalkorDB MCP Server an.
  3. Wann Dir d'Verbindung méi einfach erëmerkenne wëllt, setzt eng Beschreiwung an e Symbol derbäi.
  4. Setzt benotzerdefinéiert HTTP-Headeren oder OAuth-Clientdetailer derbäi, wann de Server eng Authentifizéierung erfuerdert.
3

D'Verbindung erstellen

Klickt op „Verbindung erstellen“, gitt dann zeréck op d'Plugin-Lëscht a kontrolléiert, ob déi nei MCP-Verbindung aktiv ass.

  1. Klickt op „Verbindung erstellen“.
  2. Gitt zeréck op d'Lëscht vun de MCP-Connectoren.
  3. Kontrolléiert, ob d'Verbindung mat FalkorDB MCP Server als aktiv ugewise gëtt.
  4. Aktualiséiert d'Plugin-Lëscht, wann d'Verbindung net direkt ugewise gëtt.
4

Modeller wiesselen, ouni MCP nei ze verbannen

Start e Chat mat Ärem bevorzugte Modell, aktivéiert d'Tools vun der Integratioun FalkorDB MCP Server ënner „Plugins“ a wiesselt bei Bedarf op en anere Modell. D'MCP-Verbindung bleift am TypingMind-Aarbechtsberäich disponibel.

  1. Start en neie Chat an TypingMind.
  2. Wielt de KI-Modell, deen Dir benotze wëllt.
  3. Aktivéiert d'Tools vun der Integratioun FalkorDB MCP Server ënner „Plugins“.
  4. Biet de Modell, d'Tool ze benotzen, wann néideg.
  5. Wiesselt op en anere KI-Modell a benotzt déiselwecht MCP-Verbindung weider.
TypingMind-Chat mat aktivéierten MCP-Tools an engem ausgewielte KI-Modell
Kënnt Dir mir mat FalkorDB MCP Server bei dëser Aufgab hëllefen?
FalkorDB MCP Server
Jo. Ech hunn et gelies.
Dat hunn ech mat FalkorDB MCP Server fonnt.

Heefeg gestallte Froen

Fir wat gëtt den MCP-Server FalkorDB MCP Server benotzt?

FalkorDB MCP Server ass en MCP-Server, deen et kompatibele KI-Clienten erlaabt, op extern Tools a Kontextinformatioune zouzegräifen. An TypingMind kënnt Dir dësen MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech FalkorDB MCP Server MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir FalkorDB MCP Server mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni den MCP-Server fir all Modell separat anzeriichten.

Firwat FalkorDB MCP Server MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann FalkorDB MCP Server verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Ären Aarbechtsoflaf beim Chatten an TypingMind organiséieren.

Wéi verbannen ech FalkorDB MCP Server MCP mat TypingMind?

Dir kënnt FalkorDB MCP Server iwwer de lokale MCP-Connector oder iwwer d'URL vun engem Remote-MCP-Server mat TypingMind verbannen. Benotzt de lokale Connector, wann de Server Zougrëff op Fichieren, Apps oder privat Ressourcen op Ärem Apparat brauch, an eng Server-URL, wann den MCP-Server op Distanz gehost gëtt.

Wéi eng Tools stellt FalkorDB MCP Server MCP an TypingMind zur Verfügung?

FalkorDB MCP Server stellt MCP-Funktioune zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agente zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir FalkorDB MCP Server MCP ze benotzen?

Nee. TypingMind ass nom Local-first-Prinzip opgebaut a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann FalkorDB MCP Server eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir deen MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇