GG

gifflet/graphiti-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

141 stars 18 forks 质量 69 趋势 0MIT

gifflet/graphiti-mcp-server 是从 https://github.com/gifflet/graphiti-mcp-server. 导入的 MCP 服务器候选

概览

gifflet/graphiti-mcp-server 是从 https://github.com/gifflet/graphiti-mcp-server. 导入的 MCP 服务器候选

概述(AI 翻译)

🌟 一个强大的AI智能体知识图谱服务器,采用Neo4j构建,并集成了模型上下文协议(MCP)。

🚀 特色

  • 🔄 Neo4j 的动态知识图谱管理
  • 🤖 与OpenAI模型无缝集成
  • 🔌 MCP(模型上下文协议)支持
  • 🐳 Docker 就绪部署
  • 🎯 自定义实体提取能力
  • 🔍 高级语义搜索功能

🛠️ 安装

先决条件

  • Docker 和 Docker 组合
  • Python 3.10 或更高版本
  • OpenAI API 密钥
  • 最低4GB内存(推荐8GB)
  • 2GB 可用磁盘空间

快速开始 🚀

  1. 克隆仓库:

  2. 设置环境变量:

  3. 编辑你的配置 .env

  4. 启动服务:

  5. 验证安装:

替代方案:环境变量

你可以直接使用环境变量:

🔧 配置

服务港口 🌐

服务 港口 目的
Neo4j 浏览器 7474 图形可视化网页界面
Neo4j 螺栓 7687 数据库连接
Graphiti MCP 8000 MCP 服务器端点

环境变量 🔧

OpenAI 配置

|变量 |必需 |默认 |描述 |

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Graphiti MCP Server 🧠

🌟 A powerful knowledge graph server for AI agents, built with Neo4j and integrated with Model Context Protocol (MCP).

🚀 Features

  • 🔄 Dynamic knowledge graph management with Neo4j
  • 🤖 Seamless integration with OpenAI models
  • 🔌 MCP (Model Context Protocol) support
  • 🐳 Docker-ready deployment
  • 🎯 Custom entity extraction capabilities
  • 🔍 Advanced semantic search functionality

🛠️ Installation

Prerequisites

  • Docker and Docker Compose
  • Python 3.10 or higher
  • OpenAI API key
  • Minimum 4GB RAM (recommended 8GB)
  • 2GB free disk space

Quick Start 🚀

  1. Clone the repository:
git clone https://github.com/gifflet/graphiti-mcp-server.git
cd graphiti-mcp-server
  1. Set up environment variables:
cp .env.sample .env
  1. Edit .env with your configuration:
# Required for LLM operations
OPENAI_API_KEY=your_openai_api_key_here
MODEL_NAME=gpt-4.1-mini

# Optional: Custom OpenAI endpoint (e.g., for proxies)
# OPENAI_BASE_URL=https://api.openai.com/v1

# Neo4j Configuration (defaults work with Docker)
NEO4J_URI=bolt://neo4j:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=demodemo
  1. Start the services:
docker compose up -d
  1. Verify installation:
# Check if services are running
docker compose ps

# Check logs
docker compose logs graphiti-mcp

Alternative: Environment Variables

You can run with environment variables directly:

OPENAI_API_KEY=your_key MODEL_NAME=gpt-4.1-mini docker compose up

🔧 Configuration

Service Ports 🌐

Service Port Purpose
Neo4j Browser 7474 Web interface for graph visualization
Neo4j Bolt 7687 Database connection
Graphiti MCP 8000 MCP server endpoint

Environment Variables 🔧

OpenAI Configuration

Variable Required Default Description
OPENAI_API_KEY ✅ - Your OpenAI API key
OPENAI_BASE_URL ❌ - Custom OpenAI API endpoint (consumed by OpenAI SDK)
MODEL_NAME ❌ gpt-4.1-mini Main LLM model to use
SMALL_MODEL_NAME ❌ gpt-4.1-nano Small LLM model for lighter tasks
LLM_TEMPERATURE ❌ 0.0 LLM temperature (0.0-2.0)
EMBEDDER_MODEL_NAME ❌ text-embedding-3-small Embedding model

Neo4j Configuration

Variable Required Default Description
NEO4J_URI ❌ bolt://neo4j:7687 Neo4j connection URI
NEO4J_USER ❌ neo4j Neo4j username
NEO4J_PASSWORD ❌ demodemo Neo4j password

Server Configuration

在 GitHub 查看完整 README

安装

docker run -d \
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "Graphiti": { "command": "uv", "args": ["run", "graphiti_mcp_server.py"], "env": { "OPENAI_API_KEY": "your_key_here" } } } }