此仓库包含一个用于访问策略的 GraphQL API 的 Model Context Protocol (MCP) 服务器实现。
该服务器使用 MCP 的 Python SDK 构建,并使用 GQL 库与 GraphQL API 进行交互。
git clone https://github.com/Ad-Veritas/mcp-server-trueRAG.git
cd mcp-server-trueRAG
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}"
将以下内容添加到 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"
]
}