MT

muzain187/tg_mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

5 stars 3 forks 质量 54 趋势 6MIT

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代理.

□ 目录

  1. 特征
  2. 项目结构
  3. 安装
  4. 配置
  5. 连接克洛德
  6. 实例
  7. 捐款
  8. 许可证

□ 特性

  • ** 计划回顾** 获取完整的图解( 顶点和边缘类型) 。

  • 处决** 以参数运行已安装的 GSQL 查询或原始 GSQL 字符串 。

  • ** Vertex & Edge Upsert** 在程序上创建或更新顶点和边缘。

  • ** 资源参考书** 通过[[T0]和tgraph://query/... URI访问图对象。

  • UDF和算法列表 获取已安装的用户定义函数和 GDS 算法目录 。

□ 项目结构

□ 安装

  1. ** 收回额**

  2. 创建和激活虚拟环境

  3. ** 建立附属关系**

要求[[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

  1. Features
  2. Project Structure
  3. Installation
  4. Configuration
  5. Connecting to Claude
  6. Examples
  7. Contributing
  8. 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 through tgraph://vertex/... and tgraph://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

  1. Clone the repo

    git clone https://github.com/Muzain187/TG_MCP.git
    cd TG_MCP
    
  2. Create & activate a virtual environment

    python3 -m venv venv
    source venv/bin/activate
    
  3. Install dependencies

    pip install .
    

    Requires mcp[cli]>=1.6.0 and pyTigerGraph>=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

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/YourFeature
    
  3. Commit your changes
    git commit -m "Add YourFeature"
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →