QQ 轻量级 Python 接口将 TigerGraph 操作(克瑞斯, schema, 顶点, 边缘, UDF) 暴露为 MCP 代理商的结构化工具和基于 URI 的资源.
概览
一个轻量级的Python接口,将TigerGraph操作(queries, schema, vertices, singers, UDF)暴露为结构化的工具和基于URI的资源,用于MCP代理. - 检索完整的图表计划(顶点和边缘类型)。 - 用参数运行已安装的 GSQL 查询或原始 GSQL 字符串。 - 在程序上创建或更新顶点和边缘。 - 通过tgraph://vertex/.和tgraph://query/.URI访问图表对象。 获取已安装的用户定义函数和 GDS 算法目录 。 3. 要求mcp[cli]->=1.6.0和pyTigerGraph->=1.8.6. 运行前设置以下环境变量 :
概述(AI 翻译)
一个轻量级的Python接口,将TigerGraph操作(queries, schema, vertices, singers, UDF)暴露为结构化的工具和基于URI的资源,用于MCP代理.
□ 目录
- 特征
- 项目结构
- 安装
- 配置
- 连接克洛德
- 实例
- 捐款
- 许可证
□ 特性
-
** 计划回顾** 获取完整的图解( 顶点和边缘类型) 。
-
处决** 以参数运行已安装的 GSQL 查询或原始 GSQL 字符串 。
-
** Vertex & Edge Upsert** 在程序上创建或更新顶点和边缘。
-
** 资源参考书** 通过[[T0]和
tgraph://query/...URI访问图对象。 -
UDF和算法列表 获取已安装的用户定义函数和 GDS 算法目录 。
□ 项目结构
□ 安装
-
** 收回额**
-
创建和激活虚拟环境
-
** 建立附属关系**
要求[[T2]和[T3]。
□ 配置
运行前设置以下环境变量 :
这些内容由config.py阅读。
□ 连接到克洛德
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
TG_MCP
A lightweight Python interface that exposes TigerGraph operations (queries, schema, vertices, edges, UDFs) as structured tools and URI-based resources for MCP agents.
Table of Contents
- Features
- Project Structure
- Installation
- Configuration
- Connecting to Claude
- Examples
- Contributing
- License
Features
-
Schema Introspection
Retrieve full graph schema (vertex & edge types). -
Query Execution
Run installed GSQL queries or raw GSQL strings with parameters. -
Vertex & Edge Upsert
Create or update vertices and edges programmatically. -
Resource URIs
Access graph objects throughtgraph://vertex/...andtgraph://query/...URIs. -
UDF & Algorithm Listing
Fetch installed user-defined functions and GDS algorithm catalogs.
Project Structure
TG_MCP/
├── config.py # Environment config (HOST, GRAPH, SECRET)
├── tg_client.py # Encapsulates TigerGraphConnection and core operations
├── tg_tools.py # `@mcp.tool` definitions exposing client methods
├── tg_resources.py # `@mcp.resource` URI handlers
├── main.py # MCP app bootstrap (`mcp.run()`)
├── pyproject.toml # Project metadata & dependencies
├── LICENSE # MIT License
└── .gitignore # OS/Python ignore rules
Installation
-
Clone the repo
git clone https://github.com/Muzain187/TG_MCP.git cd TG_MCP -
Create & activate a virtual environment
python3 -m venv venv source venv/bin/activate -
Install dependencies
pip install .Requires
mcp[cli]>=1.6.0andpyTigerGraph>=1.8.6.
Configuration
Set the following environment variables before running:
export TG_HOST=https://
export TG_GRAPH=
export TG_SECRET=
These are read by config.py.
Connecting to Claude
This MCP server can be installed into the Claude Desktop client so that Claude can invoke your TigerGraph tools directly:
uv run mcp install main.py
After running the above, restart Claude Desktop and you’ll see your MCP tools available via the hammer 🛠 icon.
Examples:
Contributing
- Fork the repository
- Create a feature branch
git checkout -b feature/YourFeature - Commit your changes
git commit -m "Add YourFeature"
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →