PolarHub
  • Agents
  • MCP Servers
  • Skills
  • PolarBear
PolarHub © 2026
MCP ServersdatabasesGraphQL模型上下文协议服务器
返回「databases」

GraphQL模型上下文协议服务器

modelscope·@launchthatbrand/mcp-graphql

databases0下载HostedModelScope

简介

一种模型上下文协议服务器,通过提供模式内省和查询执行功能,使大型语言模型能够与GraphQL API进行交互。

MCP Server 详情

来自 ModelScope 索引

mcp-graphql

smithery badge

一个 Model Context Protocol 服务器,使 LLM 能够与 GraphQL API 进行交互。该实现提供了模式内省和查询执行功能,允许模型动态地发现和使用 GraphQL API。

<a href="https://glama.ai/mcp/servers/4zwa4l8utf"><img width="380" height="200" src="https://glama.ai/mcp/servers/4zwa4l8utf/badge" alt="mcp-graphql MCP server" /></a>

使用方法

使用正确的端点运行 mcp-graphql,它将自动尝试内省您的查询。

命令行参数

参数描述默认值
--endpointGraphQL 端点 URLhttp://localhost:4000/graphql
--headers包含请求头的 JSON 字符串{}
--enable-mutations启用变更操作(默认禁用)false
--nameMCP 服务器名称mcp-graphql
--schema本地 GraphQL 模式文件路径(可选)-

示例

# Basic usage with a local GraphQL server
npx mcp-graphql --endpoint http://localhost:3000/graphql

# Using with custom headers
npx mcp-graphql --endpoint https://api.example.com/graphql --headers '{"Authorization":"Bearer token123"}'

# Enable mutation operations
npx mcp-graphql --endpoint http://localhost:3000/graphql --enable-mutations

# Using a local schema file instead of introspection
npx mcp-graphql --endpoint http://localhost:3000/graphql --schema ./schema.graphql

可用工具

服务器提供两个主要工具:

  1. introspect-schema: 此工具检索 GraphQL 模式。如果您没有模式资源,请首先使用此工具。 它会使用本地模式文件或内省查询。

  2. query-graphql: 对端点执行 GraphQL 查询。默认情况下,除非指定了 --enable-mutations,否则禁用变更操作。

资源

  • graphql-schema: 服务器将 GraphQL 模式作为客户端可以访问的资源公开。这可以是本地模式文件,也可以基于内省查询。

安装

通过 Smithery 安装

要通过 Smithery 自动为 Claude Desktop 安装 GraphQL MCP 服务器:

npx -y @smithery/cli install mcp-graphql --client claude

手动安装

可以手动安装到 Claude:

{
    "mcpServers": {
        "mcp-graphql": {
            "command": "npx",
            "args": ["mcp-graphql", "--endpoint", "http://localhost:3000/graphql"]
        }
    }
}

安全注意事项

默认情况下禁用变更操作,作为一种安全措施,以防止 LLM 修改您的数据库或服务数据。在生产环境中启用变更操作之前请仔细考虑。

自定义您的服务器

这是一个非常通用的实现,它允许进行完整的内省,并让您的用户执行任何操作(包括变更)。如果您需要更具体的实现,建议创建自己的 MCP 并限制客户端只能输入特定的查询字段和/或变量。您可以将此作为参考。

相关 MCP Servers(来自「databases」)

千牛安全审计

审计 npm 包依赖项以查找安全漏洞,提供详细的报告和修复建议,并集成 MCP。

@qianniuspace/mcp-security-audit

Claude 数据库连接器

通过API层将克劳德桌面版直接连接到数据库,使其能够探索数据库结构、编写SQL查询、分析数据集和创建报告。该API层还包含用于表探索和查询执行的工具。

@runekaagaard/mcp-alchemy

DBCode数据库管理工具

DBCode 是一个 Visual Studio Code 扩展,允许你管理许多数据库,包括 PostgreSQL、MySQL、SQL Server、DuckDB、Redis、MongoDB 等更多数据库。 DBCode 提供了运行 MCP 服务器的选项,可以访问这些数据库、它们的模式以及执行查询的能力。

@dbcodeio/public

DMS-数据库安全访问

AI 首选的统一数据访问通道,支持30多种数据源(阿里云全系/主流数据库/数仓)的安全访问。

@aliyun/alibabacloud-dms-mcp-server

Doris模型控制面板服务

后端服务,实现了模型控制面板协议,可连接到 Apache Doris 数据库,允许用户执行 SQL 查询、管理元数据,并且有可能利用大语言模型(LLMs)完成自然语言到 SQL 的转换等任务。

@apache/doris-mcp-server

Excel服务器

提供对Excel文件的操纵功能。此服务器启用工作簿创建、数据操纵、格式设置和高级Excel功能。

@haris-musa/excel-mcp-server

自动安装

点击按钮会唤起 PolarBear 客户端,并把当前 MCP Server 的 Markdown 详情文档地址传给客户端。

/api/mcps/launchthatbrand-mcp-graphql/markdown
打开 PolarBear 安装查看 Markdown 文档

手动安装

在 PolarBear 或其他支持 MCP 的客户端中,新建 MCP Server,并参考下方来源或安装提示配置。

# Basic usage with a local GraphQL server npx mcp-graphql --endpoint http://localhost:3000/graphql # Using with custom headers npx mcp-graphql --endpoint https://api.example.com/graphql --headers '{"Authorization":"Bearer token123"}' # Enable mutation operations npx mcp-graphql --endpoint http://localhost:3000/graphql --enable-mutations # Using a local schema file instead of introspection npx mcp-graphql --endpoint http://localhost:3000/graphql --schema ./schema.graphql

基本信息

分类
databases / developer-tools
运行方式
Yes
许可证
MIT License
详情文件
launchthatbrand-mcp-graphql.md