Back to MCP directory
publicPublicdnsLocal runtime

TrueRAG Compliance Policies

一个基于MCP协议的GraphQL策略API服务器

article

README

🚀 GraphQL策略API的Model Context Protocol (MCP)服务器

本仓库实现了一个Model Context Protocol (MCP)服务器,其核心价值在于为GraphQL API赋予访问策略功能,有效提升API访问的安全性与可控性。

🚀 快速开始

克隆仓库

将项目仓库克隆到本地,并进入项目目录:

git clone https://github.com/Ad-Veritas/mcp-server-trueRAG.git
cd mcp-server-trueRAG

确保安装了uv

通过以下命令检查uv是否已安装:

uv --version

若未安装,可根据不同操作系统,使用以下命令进行下载:

# 适用于macOS和Linux。
curl -LsSf https://astral.sh/uv/install.sh | sh

# 适用于Windows。
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

定义环境变量

此服务器是为配合TrueRag系统的GraphQL API而配置的。在创建TrueRag环境后,需从环境变量中复制API密钥和端点。 在仓库根目录下创建一个名为.env的文件,并添加如下内容:

GRAPHQL_API_KEY = "{your_api_key}"
GRAPHQL_ENDPOINT = "{your_graphql_endpoint}"

添加到MCP客户端,例如Claude Desktop

将以下内容添加到Claude配置文件(~/Library/Application Support/Claude/claude_desktop_config.json)中:

    "shipping-policies": {
      "command": "uv",
      "args": [
        "--directory",
        "{path_to_mcp_server}/mcp-server-trueRAG",
        "run",
        "fastmcp",
        "run",
        "server.py"
      ]
    }

✨ 主要特性

  • 基于python SDK for MCP构建,具备良好的扩展性和兼容性。
  • 利用GQL库与GraphQL API进行交互,实现高效的数据传输和处理。

📦 安装指南

按照上述“快速开始”部分的步骤,依次完成仓库克隆、uv工具安装、环境变量定义以及添加到MCP客户端的操作,即可完成服务器的安装和配置。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client