artur-nohup/neo4j-fastmcp-server
If you are the rightful owner of neo4j-fastmcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Neo4j FastMCP Server with Descope Authentication is a production-ready remote Model Context Protocol (MCP) server designed for enterprise-grade authentication and seamless integration with Claude.ai and other MCP clients.
Neo4j FastMCP Server with Descope Authentication
A production-ready remote Model Context Protocol (MCP) server with enterprise-grade authentication powered by Descope. Fully compatible with Claude.ai and other MCP clients.
π Features
- π Enterprise Authentication: OAuth 2.1 with PKCE + API key authentication via Descope
- π― Claude.ai Ready: Full OAuth flow integration for Claude's custom integrations
- π§ Neo4j Knowledge Graph: Persistent memory storage with full-text search
- π‘οΈ Fine-grained Permissions: MCP-specific scopes and role-based access control
- π Session Management: Automatic token refresh and session validation
- π³ Production Ready: Docker support with health checks and monitoring
- β‘ FastMCP Framework: Built on the latest FastMCP TypeScript framework
π― Perfect for Claude.ai Integration
This server is specifically designed to work with Claude.ai's custom integrations feature:
- OAuth 2.1 Compliance: Full PKCE support for secure authentication
- Remote MCP Protocol: HTTP streaming transport for cloud deployment
- Scope-based Permissions: Fine-grained access control
- Session Management: Automatic token handling and refresh
- Production Security: Enterprise-grade authentication via Descope
π Quick Start
1. Clone and Setup
git clone https://github.com/artur-nohup/neo4j-fastmcp-server.git
cd neo4j-fastmcp-server
npm install
cp .env.example .env
2. Configure Environment
Edit .env
with your configuration:
# Descope Configuration (REQUIRED)
DESCOPE_PROJECT_ID=your-descope-project-id
DESCOPE_MANAGEMENT_KEY=your-management-key
# Neo4j Configuration (REQUIRED)
NEO4J_URI=bolt://localhost:7687
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=your-password
# OAuth Configuration (REQUIRED for Claude.ai)
OAUTH_CLIENT_ID=your-oauth-client-id
OAUTH_CLIENT_SECRET=your-oauth-client-secret
OAUTH_REDIRECT_URI=http://localhost:8081/oauth/callback
# Session Security
SESSION_SECRET=your-secure-session-secret
3. Start Development Server
# Start development server
npm run dev
# Or run tests
npm run test
# The server starts on:
# - MCP Server: http://localhost:8081/stream
# - OAuth Server: http://localhost:8082
4. Claude.ai Integration
- In Claude.ai, go to Settings > Integrations
- Click Add Integration
- Enter MCP Server URL:
http://localhost:8081/stream
- Complete the OAuth flow when prompted
- Start using your Neo4j knowledge graph in Claude!
π Authentication Methods
OAuth 2.1 Flow (for Claude.ai)
Perfect for interactive clients like Claude.ai with full PKCE support.
API Key Authentication
Ideal for programmatic access and automation:
# Create API key (admin access required)
curl -X POST http://localhost:8082/admin/api-keys \
-H "Authorization: Bearer <oauth-token>" \
-d '{"name":"my-app","permissions":["mcp:read","mcp:write"]}'
# Use API key
curl -X POST http://localhost:8081/stream \
-H "X-API-Key: <your-api-key>" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
ποΈ Available Tools
10 MCP Tools with Permission-based Access
- create_entities - Create knowledge graph entities
- create_relations - Create relationships between entities
- add_observations - Add observations to entities
- delete_entities - Remove entities and relations
- delete_observations - Remove specific observations
- delete_relations - Remove relationships
- read_graph - Read entire knowledge graph
- search_nodes - Full-text search across the graph
- find_nodes - Find specific entities by name
- health_check - Server and Neo4j health status
Permission Scopes
mcp:read
- Read operations and graph queriesmcp:write
- Create, update, and delete operationsmcp:admin
- Administrative operations and health checks
π§ͺ Testing & Development
MCP Inspector Testing
# Start test server
npm run test
# In another terminal, start MCP Inspector
npx @modelcontextprotocol/inspector
# Configure connection:
# URL: http://localhost:8081/stream
# Auth: Use OAuth flow or API key
cURL Testing
# Test with OAuth token
curl -X POST http://localhost:8081/stream \
-H "Authorization: Bearer <oauth-token>" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
# Test with API key
curl -X POST http://localhost:8081/stream \
-H "X-API-Key: <api-key>" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
π³ Docker Deployment
Using Pre-built Image
docker pull arturrenzenbrink/neo4j-fastmcp-server:latest
docker run -d \
--name neo4j-mcp-server \
-p 8081:8081 \
-p 8082:8082 \
-e DESCOPE_PROJECT_ID="your-project-id" \
-e DESCOPE_MANAGEMENT_KEY="your-management-key" \
-e NEO4J_URI="bolt://your-neo4j:7687" \
-e NEO4J_USERNAME="neo4j" \
-e NEO4J_PASSWORD="your-password" \
-e SESSION_SECRET="your-session-secret" \
arturrenzenbrink/neo4j-fastmcp-server:latest
Docker Compose
# Use the included docker-compose.yml
docker compose up -d
π Documentation
- - Complete Descope setup and configuration
- - Full API documentation with examples
- - Comprehensive testing instructions
ποΈ Architecture
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Claude.ai βββββΆβ OAuth Server βββββΆβ Descope β
β β β (Port 8082) β β Platform β
β - Custom MCP β β β β β
β - OAuth Client β β - Authorization β β - User Identity β
β - Token Mgmt β β - Token Exchangeβ β - OAuth Providersβ
βββββββββββββββββββ β - PKCE Support β β - Session Mgmt β
β βββββββββββββββββββ βββββββββββββββββββ
βΌ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β MCP Server βββββΆβ FastMCP Auth βββββΆβ Neo4j DB β
β (Port 8081) β β β β β
β β β - Session Val β β - Knowledge β
β - Stream API β β - Scope Check β β Graph β
β - Tool Executionβ β - Permissions β β - Full-text β
β - Health Checks β β - Audit Logs β β Search β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
π― Use Cases
Claude.ai Knowledge Graph
Add custom MCP integration β Complete OAuth flow β Claude gains persistent memory
Enterprise Knowledge Management
Deploy with company OAuth β Teams authenticate with existing credentials β Build shared knowledge graphs
AI Agent Memory
Agents authenticate via API keys β Store learned information β Search and retrieve context across interactions
π€ Contributing
- Fork the repository
- Create a feature branch
- Implement your changes
- Add tests and documentation
- Submit a pull request
π License
MIT License - see LICENSE file for details.
π Support
- Documentation: Comprehensive guides in the folder
- Issues: Report bugs via GitHub Issues
- Descope Support: Descope Documentation
- MCP Specification: Model Context Protocol
Ready to enhance Claude.ai with your own knowledge graph? π
The Neo4j FastMCP Server with Descope provides enterprise-grade authentication that works seamlessly with Claude.ai while maintaining the flexibility to support any MCP client. Perfect for building persistent AI memory, knowledge management systems, and contextual AI applications.