graphiti-mcp-azure

justincfw777/graphiti-mcp-azure

3.2

If you are the rightful owner of graphiti-mcp-azure 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.

Graphiti MCP Azure Deployment is a comprehensive system designed to deploy the Graphiti knowledge graph memory system on Azure, facilitating integration with Cursor IDE and AI agents.

Graphiti MCP Azure Deployment

A complete Azure deployment system for Graphiti knowledge graph memory system, designed for integration with Cursor IDE and AI agents.

๐Ÿ—๏ธ Overview

This project provides a streamlined Azure deployment of Graphiti MCP (Model Context Protocol) server using Azure Developer CLI (azd) with Bicep infrastructure as code. The deployment creates a knowledge graph memory system that enables AI agents in Cursor IDE to maintain context and remember information across sessions.

โœจ Features

๐Ÿš€ One-Click Deployment

  • Automated Setup: Complete deployment with a single script execution
  • Azure Developer CLI: Modern deployment tooling with Bicep templates
  • Infrastructure as Code: Reproducible deployments with version control
  • Optimized Architecture: Streamlined services for cost efficiency

๐Ÿง  Knowledge Graph Memory

  • Persistent Memory: AI agents can store and retrieve information across sessions
  • Contextual Understanding: Enhanced AI performance through memory retention
  • Graph Database: Neo4j for efficient relationship storage and querying
  • MCP Protocol: Standard protocol for AI agent memory integration

๐Ÿ”ง Cursor IDE Integration

  • Seamless Integration: Direct MCP server connection to Cursor IDE
  • Enhanced AI Capabilities: AI agents with persistent memory and context
  • Real-time Synchronization: Instant memory updates across sessions
  • Simple Configuration: Easy setup with provided configuration files

โ˜๏ธ Azure Cloud Infrastructure

  • Container Apps: Scalable, serverless container hosting
  • Neo4j Database: Dedicated graph database container instance
  • Azure OpenAI: Integrated AI processing capabilities
  • Security: Azure Key Vault for secure credential management

๐Ÿ› ๏ธ Technology Stack

  • Infrastructure: Azure Developer CLI (azd), Bicep templates
  • Database: Neo4j 5.26.2 (Container Instance)
  • MCP Server: Official Docker image (zepai/knowledge-graph-mcp:latest)
  • AI: Azure OpenAI (GPT-4.1-mini)
  • Hosting: Azure Container Apps, Azure Container Instances
  • Security: Azure Key Vault, managed identities

๐Ÿ“ Project Structure

Graphiti/
โ”œโ”€โ”€ azure.yaml                    # Azure Developer CLI configuration
โ”œโ”€โ”€ setup.sh                      # One-click deployment script
โ”œโ”€โ”€ cursor-mcp-config.json        # Cursor IDE MCP configuration
โ”œโ”€โ”€ infra/
โ”‚   โ”œโ”€โ”€ main.bicep                # Main infrastructure template
โ”‚   โ”œโ”€โ”€ main.parameters.json      # Template parameters
โ”‚   โ””โ”€โ”€ resources.bicep           # Resource definitions
โ”œโ”€โ”€ DEPLOYMENT_INSTRUCTIONS.md    # Detailed deployment guide
โ”œโ”€โ”€ DEPLOYMENT_SUMMARY.md         # Current deployment status
โ””โ”€โ”€ README.md                     # This file

๐Ÿš€ Quick Start

Prerequisites

Ensure you have the required tools installed:

# Check Azure CLI
az --version

# Check Azure Developer CLI
azd version

# Check Docker (optional, for local testing)
docker --version

1. Clone and Setup

git clone https://github.com/justincfw777/graphiti-mcp-azure.git
cd graphiti-mcp-azure

2. Configure OpenAI API Key

Edit setup.sh and replace the placeholder with your actual OpenAI API key:

export OPENAI_API_KEY="your-actual-openai-api-key-here"

3. Deploy to Azure

# Run the automated deployment script
./setup.sh

The script will:

  • Login to Azure and set the subscription
  • Initialize the azd environment
  • Deploy the infrastructure using Bicep templates
  • Build and deploy the container applications
  • Display access URLs and credentials

4. Configure Cursor IDE

After deployment, update cursor-mcp-config.json with your MCP server URL and add it to Cursor settings.

๐Ÿ“Š Deployed Services

After successful deployment, you'll have:

๐Ÿ”— Access URLs

  • MCP Server: https://graphiti-prod-{token}-mcp.westus2.azurecontainerapps.io/sse
  • Neo4j Browser: http://{public-ip}:7474
  • Neo4j Bolt: bolt://{public-ip}:7687

๐Ÿ” Credentials

  • Neo4j Username: neo4j
  • Neo4j Password: Password

๐Ÿ—๏ธ Architecture Components

  • Neo4j Database (Container Instance) - Graph database for knowledge storage
  • MCP Server (Container App) - Cursor IDE integration endpoint
  • Container App Environment - Runtime environment for containerized services
  • Supporting Services - Registry, Key Vault, Storage, Logs

๐ŸŽฏ Cursor Integration

1. MCP Configuration

Use the configuration from cursor-mcp-config.json:

{
  "mcpServers": {
    "graphiti-memory": {
      "url": "https://your-mcp-server-url/sse",
      "description": "Graphiti knowledge graph memory system for AI agents"
    }
  }
}

2. Cursor Setup

  1. Open Cursor IDE
  2. Go to Settings (Cmd/Ctrl + ,)
  3. Search for "MCP"
  4. Add the configuration from step 1
  5. Restart Cursor

3. Usage

Once configured, AI agents in Cursor will automatically:

  • Store important information in the knowledge graph
  • Retrieve relevant context from previous sessions
  • Maintain conversation history and learned preferences
  • Build understanding over time

๐Ÿ”ง Configuration

Environment Variables

The deployment uses these key environment variables:

AZURE_ENV_NAME="graphiti-prod"
AZURE_LOCATION="westus2"
AZURE_SUBSCRIPTION_ID="your-subscription-id"
AZURE_TENANT_ID="your-tenant-id"
OPENAI_API_KEY="your-openai-api-key"
NEO4J_PASSWORD="GRaPh@Cr0wn"
NEO4J_USER="neo4j"
MODEL_NAME="gpt-4.1-mini"

Customization

You can customize the deployment by:

  • Modifying infra/main.bicep for infrastructure changes
  • Updating azure.yaml for service configuration
  • Adjusting environment variables in setup.sh

๐Ÿ” Monitoring and Troubleshooting

Health Checks

# Check Container Apps status
az containerapp list --resource-group graphiti-prod-{token}-rg --output table

# Check Neo4j container
az container list --resource-group graphiti-prod-{token}-rg --output table

# View MCP server logs
az containerapp logs show --name graphiti-prod-{token}-mcp --resource-group graphiti-prod-{token}-rg

Common Issues

  1. OpenAI API Key: Ensure your API key is valid and has sufficient credits
  2. Neo4j Connection: Check container logs if database connection fails
  3. MCP Integration: Verify the MCP server URL is correct in Cursor settings

๐Ÿงน Cleanup

To remove all Azure resources:

azd down

This will delete all resources and stop billing.

๐Ÿ“š Documentation

For detailed information:

  • - Step-by-step deployment guide
  • - Current deployment status
  • Graphiti Documentation - Official Graphiti project

๐Ÿ”’ Security

  • Secrets Management: OpenAI API key and Neo4j password stored in Azure Key Vault
  • Network Security: Container apps with managed ingress and egress
  • Access Control: Azure RBAC for resource management
  • Encryption: Data encrypted at rest and in transit

๐Ÿค Contributing

This project is optimized for the specific Azure deployment scenario. To contribute:

  1. Fork the repository
  2. Create a feature branch
  3. Test your changes with azd provision
  4. Submit a pull request

๐Ÿ“„ License

This project is for CrownBio internal use. The underlying Graphiti project is licensed under the Apache License 2.0.

๐Ÿ“ž Support

For support:

  • Azure Issues: Check Azure documentation or contact Azure support
  • Graphiti Issues: See the Graphiti repository
  • Deployment Issues: Review logs and check the troubleshooting section

Note: This deployment has been optimized to include only essential services for cost efficiency. The API service has been removed as it was not needed for MCP functionality.