TI

TigerGraph Community MCP Server for Graph Database

Join the community MCP server to interact with TigerGraph graph database, share insights, run queries, and collaborate on graph analytics and development.

Quick Install
npx -y @custom-discoveries/TigerGraph_MCP

Overview

This community Model Context Protocol (MCP) server connects developers and data scientists to TigerGraph graph databases. It provides a lightweight API and collaborative workspace for running queries, sharing query snippets and schemas, and integrating graph analytics into LLM-driven workflows or automation systems.

The server acts as a shared gateway that manages TigerGraph connections, proxies queries to the database, and stores community-contributed examples and utilities. It is useful when you want a reproducible, shareable interface for TigerGraph queries—especially in teams that combine graph analytics with LLMs, data apps, or research projects.

Features

  • Centralized connection management for one or more TigerGraph instances
  • REST endpoints to execute queries and fetch graph results
  • Persistent storage for shared query snippets, example schemas, and notebooks
  • Role-based or community sharing model for collaborative development (configurable)
  • Docker-friendly deployment with environment-based configuration
  • Example clients for curl and Python to accelerate integration
  • Lightweight logging and basic metrics for query activity

Installation / Configuration

Minimum requirements: Docker (recommended) or Python 3.9+ and pip. The project repository contains Docker and plain-Python setup options.

Clone the repository:

git clone https://github.com/custom-discoveries/TigerGraph_MCP.git
cd TigerGraph_MCP

Using Docker Compose (recommended):

  1. Create a .env file with your TigerGraph credentials and MCP config:
TIGERGRAPH_HOST=https://my-tigergraph.example.com
TIGERGRAPH_USERNAME=admin
TIGERGRAPH_PASSWORD=secret
TIGERGRAPH_GRAPHNAME=MyGraph
MCP_HOST=0.0.0.0
MCP_PORT=5005
DATA_DIR=./data
  1. Start the services:
docker-compose up -d --build

Plain Python install:

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export TIGERGRAPH_HOST=https://my-tigergraph.example.com
export TIGERGRAPH_USERNAME=admin
export TIGERGRAPH_PASSWORD=secret
export TIGERGRAPH_GRAPHNAME=MyGraph
python app.py

Configuration options are primarily provided through environment variables. Key variables:

VariablePurposeDefault
TIGERGRAPH_HOSTBase URL for TigerGraph REST endpoints(required)
TIGERGRAPH_USERNAMETigerGraph user for REST or token exchange(required)
TIGERGRAPH_PASSWORDPassword or token(required)
TIGERGRAPH_GRAPHNAMEDefault graph name to target(optional)
MCP_HOSTHost address the MCP server binds to0.0.0.0
MCP_PORTPort the MCP server listens on5005
DATA_DIRLocal path to persist shared resources./data

If TigerGraph uses token-based authentication, you can exchange creds in the MCP or provide the token in TIGERGRAPH_PASSWORD (depending on your security practices).

Available Tools / Resources

The repository includes several resources to get started:

  • Example query snippets and shared queries (JSON/YAML under data/examples)
  • Python client example for calling MCP endpoints
  • Dockerfile and docker-compose.yml for containerized runs
  • Basic web UI for browsing shared queries (if enabled)
  • README with quick-start samples and troubleshooting tips

Common endpoints (examples — confirm actual paths in your deployed server):

  • POST /connections — add or update a TigerGraph connection
  • POST /run-query — execute a query against a configured connection
  • GET /queries — list shared community queries/snippets
  • POST /share — share a query or result in the community store
  • GET /status — server health and basic metrics

Use Cases

  1. Interactive query testing and sharing

    • Developer A writes a GSQL or REST query to compute shortest paths and shares it via the MCP UI. Developer B retrieves the snippet, adjusts parameters, and re-runs it without reconfiguring a TigerGraph client.
  2. LLM-driven graph exploration

    • An LLM agent can be configured to call the MCP server to execute ad-hoc graph queries, obtain results, and compose summaries. The MCP server keeps community-approved query snippets and safe execution policies.
  3. Data science pipelines with reproducible steps

    • Data scientists store parameterized queries (e.g., for centrality measures or subgraph extraction) in the MCP repository. Pipelines fetch and run these queries consistently across environments.
  4. Rapid prototyping and demos

    • Use the Docker deployment to stand up a sandbox MCP server for demos, workshops, or tutorials. Share example datasets and scripts through the server’s resources directory.

Concrete examples

  • Run a shared query via curl:
curl -X POST "http://localhost:5005/run-query" \
  -H "Content-Type: application/json" \
  -d '{
    "connection": "default",
    "query": "get_top_customers",
    "params": {"limit": 10}
  }'
  • Python example to call MCP server:
import requests

url = "http://localhost:5005/run-query"
payload = {"connection": "default", "query": "get_top_customers", "params": {"limit": 5}}
resp = requests.post(url, json=payload)
resp.raise_for_status()
print(resp.json())

Tips and Next Steps

  • Secure your MCP endpoint (TLS, firewall, and authentication) before exposing it publicly.
  • Start by adding a single TigerGraph connection and a few verified queries; build the community store gradually.
  • Combine MCP with CI/CD: store query tests in source control and validate them against a test TigerGraph instance.

This MCP server provides a practical bridge between TigerGraph and collaborative developer workflows, enabling reproducible queries, shared knowledge, and easier integration with applications and LLM-based tooling.