GraphRAG KYC Agent

v1.0.0Coding Agentsstable

An agent built with OpenAI Agent SDK, Neo4j and Neo4j MCP server

graphrag-kyc-agentmcpai-integration
Share:
25
Stars
0
Downloads
0
Weekly
0/5

What is GraphRAG KYC Agent?

GraphRAG KYC Agent is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to agent built with openai agent sdk, neo4j and neo4j mcp server

An agent built with OpenAI Agent SDK, Neo4j and Neo4j MCP server

This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • An agent built with OpenAI Agent SDK, Neo4j and Neo4j MCP se

Use Cases

Build knowledge graph-powered agents with Neo4j and OpenAI SDK.
LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 19, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx graphrag-kyc-agent

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use GraphRAG KYC Agent

GraphRAG KYC Agent is a know-your-customer investigation agent built with the OpenAI Agent SDK, Neo4j, and the Neo4j MCP server. It uses a graph database to model customer relationships, shared addresses, and transaction networks, then exposes tools for detecting suspicious customer rings, translating natural language to Cypher queries, and retrieving account and transaction histories. Compliance analysts and fraud investigators use it to run graph-powered KYC investigations through conversational queries without writing Cypher by hand.

Prerequisites

  • Python 3.13 or higher
  • uv package manager (pip install uv or from astral.sh/uv)
  • OpenAI API key with access to a supported model
  • Neo4j database instance (Docker locally or Neo4j AuraDB Free tier)
  • Ollama installed with at least 6 GB GPU memory (for the text-to-Cypher model)
1

Clone the repository

Clone the graphrag-kyc-agent repository and navigate into it.

git clone https://github.com/neo4j-product-examples/graphrag-kyc-agent.git
cd graphrag-kyc-agent
2

Set up the Python environment

Create a virtual environment with uv and install all dependencies from the lock file.

uv venv
source .venv/bin/activate
uv sync
3

Configure environment variables

Create a .env file in the project root with your OpenAI API key and Neo4j connection details. For Neo4j AuraDB, all values come from your instance connection details page.

OPENAI_API_KEY=sk-your-openai-key
NEO4J_URI=neo4j+s://your-instance-id.databases.neo4j.io
NEO4J_USERNAME=your-username
NEO4J_PASSWORD=your-password
NEO4J_DATABASE=your-database-name
4

Set up Ollama and pull the text-to-Cypher model

Start the Ollama service and download the specialized text-to-Cypher model used for translating natural language queries to Neo4j Cypher. This model requires approximately 6 GB of GPU memory.

ollama serve
ollama pull ed-neo4j/t2c-gemma3-4b-it-q8_0-35k
5

Load the KYC dataset and start the agent

Run the data generation script to populate your Neo4j database with synthetic KYC data, then start the agent.

python generate_kyc_dataset.py
python kyc_agent.py

GraphRAG KYC Agent Examples

Client configuration

Environment file configuration for the GraphRAG KYC Agent. The agent runs as a standalone Python script connected to Neo4j, not as a traditional stdio MCP server.

# .env file
OPENAI_API_KEY=sk-your-openai-api-key
NEO4J_URI=neo4j+s://abc123.databases.neo4j.io
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=your-auradb-password
NEO4J_DATABASE=neo4j

Prompts to try

Sample investigation queries that exercise the KYC agent's graph analysis, customer ring detection, and transaction tools.

- "Find all customer rings involving more than 3 customers who share the same address"
- "Get the account details and transaction history for customer ID C-1042"
- "Are there any customers who share addresses with known high-risk entities?"
- "Show me all customers connected to this address: 123 Main St, Springfield"
- "Identify suspicious transaction patterns for accounts with more than 10 transfers in the last 7 days"

Troubleshooting GraphRAG KYC Agent

Neo4j connection refused or authentication failed

Verify all four NEO4J_* variables are set correctly in your .env file. For AuraDB, the URI uses the neo4j+s:// scheme (not bolt://). For local Docker Neo4j, use neo4j://localhost:7687. Confirm the database is running with docker ps or the AuraDB console.

Ollama model download fails or text-to-Cypher queries return errors

The ed-neo4j/t2c-gemma3-4b-it-q8_0-35k model requires about 6 GB of GPU memory. Run ollama list to confirm the model was pulled successfully. If GPU memory is insufficient, the model may load partially — check ollama logs for out-of-memory errors.

generate_kyc_dataset.py fails or produces no data

Confirm your Neo4j connection details are correct and the database is accessible before running the data generator. The script creates nodes and relationships using your configured credentials. Check that the Python virtual environment is active (source .venv/bin/activate) before running.

Frequently Asked Questions about GraphRAG KYC Agent

What is GraphRAG KYC Agent?

GraphRAG KYC Agent is a Model Context Protocol (MCP) server that agent built with openai agent sdk, neo4j and neo4j mcp server It connects AI assistants to external tools and data sources through a standardized interface.

How do I install GraphRAG KYC Agent?

Follow the installation instructions on the GraphRAG KYC Agent GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with GraphRAG KYC Agent?

GraphRAG KYC Agent works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is GraphRAG KYC Agent free to use?

Yes, GraphRAG KYC Agent is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Coding Agents MCP Servers

Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "graphrag-kyc-agent": { "command": "npx", "args": ["-y", "graphrag-kyc-agent"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use GraphRAG KYC Agent?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides