You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Model Context Protocol (MCP) server for FalkorDB, allowing AI models to query and interact with graph databases.
Overview
This project implements a server that follows the Model Context Protocol (MCP) specification to connect AI models with FalkorDB graph databases. The server translates and routes MCP requests to FalkorDB and formats the responses according to the MCP standard.
Prerequisites
Node.js (v16 or later)
npm or yarn
FalkorDB instance (can be run locally or remotely)
Installation
Clone this repository:
git clone https://github.com/falkordb/falkordb-mcpserver.git
cd falkordb-mcpserver
Install dependencies:
npm install
Copy the example environment file and configure it:
cp .env.example .env
Edit .env with your configuration details.
Configuration
Configuration is managed through environment variables in the .env file:
PORT: Server port (default: 3000)
NODE_ENV: Environment (development, production)
FALKORDB_HOST: FalkorDB host (default: localhost)
FALKORDB_PORT: FalkorDB port (default: 6379)
FALKORDB_USERNAME: Username for FalkorDB authentication (if required)
FALKORDB_PASSWORD: Password for FalkorDB authentication (if required)
MCP_API_KEY: API key for authenticating MCP requests
Usage
Development
Start the development server with hot-reloading:
npm run dev
Production
Build and start the server:
npm run build
npm start
API Endpoints
GET /api/mcp/metadata: Get metadata about the FalkorDB instance and available capabilities
POST /api/mcp/context: Execute queries against FalkorDB
GET /api/mcp/health: Check server health
GET /api/mcp/graphs: Returns the list of Graphs
MCP Configuration
To use this server with MCP clients, you can add it to your MCP configuration: