gridctl 标志

gridctl

组织
gridctl

🔒 MCP gateway with a built-in skill library.

发布者gridctl
代码仓库gridctl
语言Go
复刻数
9
星标数
44
可用工具
0
传输类型stdio, streamable-http
分类
许可协议Apache-2.0
链接
  • 将工具接入 AI 工作流

    gridctl 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 44 个 Star 和 9 个 Fork。


Gridctl

Gridctl aggregates tools from MCP servers into a single gateway and serves Agent Skills as MCP prompts to upstream clients. Define your stack in YAML, apply with one command, and connect Claude Desktop (or any MCP client) through one endpoint.

bash
gridctl apply stack.yaml

Designed for fast, ephemeral, stateless environments, inspired by Containerlab.

⚡️ Why gridctl

MCP servers are everywhere: different transports, different hosting models, different .json files accumulating like dust. Skills are a separate sprawl on top. Switching projects shouldn't mean rewriting every client config.

Gridctl gives you one declarative file for everything you want connected, one local endpoint your client talks to, and a UI that shows you what's actually running. Build fast, throw it away, rebuild it tomorrow.

yaml
version: "1"
name: daily

#  Secret set passed in at runtime
secrets:
  sets:
    - dev

network:
  name: daily-net
  driver: bridge

# Global gateway configuration
gateway:
  name: dev
  code_mode: on

# LLM clients auto-linked to this gateway on apply
link:
  - claude
  - claude-code
  - cursor
  - antigravity
  - grok

# Downstream MCP servers behind the gateway
mcp-servers:

  # Jira and Confluence via Atlassian's hosted remote MCP.
  # Authorize once with `gridctl auth login atlassian`; tokens are stored
  # encrypted and refreshed automatically.
  - name: atlassian
    url: https://mcp.atlassian.com/v1/mcp/authv2
    auth:
      type: oauth

  # GitHub repos, issues, and PRs (containerized stdio server)
  - name: github
    image: ghcr.io/github/github-mcp-server:v1.12.1@sha256:0ba840c46a237879c8300e7fddb0b6347f20e029ccb9cbe2ce4a943daa1ff560
    transport: stdio
    env:
      GITHUB_PERSONAL_ACCESS_TOKEN: ${var:GITHUB_PERSONAL_ACCESS_TOKEN}

  # Browser automation and page inspection
  - name: playwright
    command:
      - npx
      - '@playwright/mcp@0.0.80'

  # SaaS app actions through Zapier's hosted MCP endpoint.
  # Same flow: `gridctl auth login zapier` after apply.
  - name: zapier
    url: https://mcp.zapier.com/api/v1/connect
    auth:
      type: oauth

🪛 Install

bash
curl -fsSL https://raw.githubusercontent.com/gridctl/gridctl/main/install.sh | sh

Installs the latest release to ~/.local/bin/gridctl. Full instructions for Homebrew, pre-built binaries, building from source, container runtime setup, and updating/uninstalling are in the Installation guide.

The installer checks SHA256, not release origin. For covered releases, follow Release Verification before extraction or installation, then install the same verified local archive. The guide explains coverage, expected signer and source identity, and the published inventories.

🚦 Quick Start

bash
# Or scaffold your own starter stack.yaml
gridctl init

# Apply the example stack
gridctl apply examples/getting-started/mcp-basic.yaml

# Check what's running
gridctl status

# Open the web UI
open http://localhost:8180

# Clean up
gridctl destroy examples/getting-started/mcp-basic.yaml

🖥️ Connect LLM Application

The easiest way to connect is with gridctl link, which auto-detects installed LLM clients and injects the gateway configuration:

bash
gridctl link              # Interactive: detect and select clients
gridctl link claude       # Link a specific client
gridctl link --all        # Link all detected clients at once

# Local-model clients bog down on large tool lists; link a smaller
# surface via a tool group (or enable gateway code_mode)
gridctl link lmstudio --group <name>

Declaring a link: block in stack.yaml (as above) does the same thing on every gridctl apply: each listed client is linked idempotently once the gateway is healthy, and clients that aren't installed warn and skip. gridctl destroy --unlink removes those entries again.

Already have MCP servers configured in your clients? gridctl import runs the same detection in reverse: it scans those configs (read-only), dedupes the servers it finds, and appends your selection to stack.yaml, offering plaintext secrets into the encrypted variable store on the way.

Supported clients: Claude Desktop, Claude Code, Cursor, Windsurf, VS Code, Gemini, Antigravity, OpenCode, Grok Build, Continue, Cline, AnythingLLM, LM Studio, Roo, Zed, Goose

Most Applications

json
{
  "mcpServers": {
    "gridctl": {
      "url": "http://localhost:8180/mcp"
    }
  }
}

Claude Desktop

json
{
  "mcpServers": {
    "gridctl": {
      "command": "npx",
      "args": ["-y", "mcp-remote@0.14.2", "http://localhost:8180/mcp", "--allow-http"]
    }
  }
}

Restart Claude Desktop after editing. All tools from your stack are now available.

Antigravity

json
{
  "mcpServers": {
    "gridctl": {
      "serverUrl": "http://localhost:8180/mcp"
    }
  }
}

Antigravity borrows Windsurf's serverUrl field but speaks streamable HTTP, so point it at the /mcp endpoint (not /sse). The IDE and CLI share ~/.gemini/config/mcp_config.json on Antigravity 2.0. Since Antigravity caps each MCP server at 100 tools, pair a large stack with gateway.code_mode: on.

🎬 Features

Stack as Code

Declarative, version-controlled MCP environments. Validate before you commit, plan before you apply, and detect the moment your environment drifts from what's in version control. Drift detection runs in the background: the canvas flags servers running but absent from your spec, and declarations in your spec that haven't been deployed.

bash
gridctl search postgres        # Find servers in the catalog and the MCP Registry
gridctl add github             # Append a catalog server to stack.yaml by name
gridctl validate stack.yaml    # Lint and schema-check the spec (exit 0/1/2)
gridctl validate stack.yaml --policy policy.yaml  # Offline declaration-policy check
gridctl plan stack.yaml        # Diff against running state
gridctl apply stack.yaml       # Apply the spec
gridctl export                 # Export authored config with references preserved

Export rereads the running deployment's stack file without resolving variables. Recognized inline credentials block export; replace them with authored references and supply values separately on the recipient's host. Review other authored literals before sharing. The Stack spec view's Export YAML action applies the same policy; raw spec content may still contain credentials. See export semantics and migration guidance.

Learn more → Configuration Reference

Generated Python Containers

Build an exact public PyPI release, or a packaged Python project from git or a local directory, without maintaining a Dockerfile. Generated images use pinned Python and uv bases, run as a non-root user, and keep existing host uvx workflows unchanged. In the web UI, choose the Python Package template or the Generated Python source strategy; eligible catalog packages also offer a Run in a container toggle that is off by default.

yaml
mcp-servers:
  - name: fetch
    source:
      type: pypi
      package: mcp-server-fetch
      ref: 2026.8.18

  - name: time
    source:
      type: git
      url: https://github.com/modelcontextprotocol/servers.git
      ref: d73f99efbfd40c3aa1b61e88728b3d49fb52608f
      path: src/time
      runtime: python

Learn more → Source configuration · Runnable example · Python runtime base

MCP Execution Controls

Opt into execution.mode: hardened for managed MCP containers, with explicit numeric UID/GID, finite per-replica limits, read-only root, bounded scratch, and no network by default. Required engine and kernel evidence gates routing. Existing server details show execution evidence separately from MCP health.

Local processes can select execution.mode: local for explicit environment inheritance and executable lookup; they remain unsandboxed. Omission retains compatibility behavior. Container observation requires a supported Linux daemon environment; see the guide for runtime limits and acceptance status.

Learn more → Execution controls · Runnable example

gridctl optimize & Usage Observability

Ordinary successful tool dispatches count arguments and results per server, replica, client, and tool. The Metrics workspace charts throughput, call counts, and the savings from output format conversion (measured from the gateway's own before/after counts). Internal sensitive-call handling uses local estimates without payload-bearing observers or client attribution; see counting boundaries. gridctl optimize scans the running gateway and surfaces actionable findings with projected weekly token impact (unused servers, unused tools, schema overhead, and format-conversion shortfalls), plus a paste-ready YAML remediation for each.

bash
gridctl optimize                          # styled findings table
gridctl optimize --format json            # machine-readable OptimizeReport
gridctl optimize --severity warn,critical # narrow to actionable findings

Learn more → Usage Observability

Output Format Conversion

Tool call results default to JSON. Set output_format at the gateway or per-server level to convert structured responses into TOON or CSV before they reach the client, reducing token consumption by 25–61% for tabular and key-value data. Non-JSON responses and payloads over 1 MB are passed through unchanged. A2A envelopes retain atomic JSON and bypass format conversion.

yaml
gateway:
  output_format: toon      # Default for all servers: json, toon, csv, text

mcp-servers:
  - name: analytics
    output_format: csv     # Override per server

Learn more → Configuration Reference

Tool Surface Control

A large stack floods the client's context with tools it will never call. Three axes compose: the per-server tools: whitelist narrows what exists, groups: bundle tools across servers behind their own endpoint at /groups/{name}/mcp, and clients: restricts what each linked client may touch.

yaml
groups:
  release:
    servers: [github]                      # every tool of these servers
    tools: [gitlab__create_merge_request]  # plus specific prefixed tools
    exclude: [github__delete_repo]         # subtract, applied last
bash
gridctl groups                     # Groups, member counts, and endpoints
gridctl link cursor --group release

With gateway.auth configured, grouped endpoints require the same bearer token or API-key header as /mcp on every request. Linking selects an endpoint but does not provision credentials; supply them through your client's authentication settings. Groups and self-declared client selectors are not authenticated identities. See gateway authentication, including HTTPS or encrypted-tunnel requirements for remote access.

For deployment and review steps, read the Practical Security Guide, which distinguishes current defaults, opt-in controls, and release availability.

Gateway authentication and listener security settings are restart-only: reload rejects security changes, including mixed edits, while preserving the saved file and active settings. Follow restart recovery. The web prompt supports Bearer and API-key modes and verifies credentials before saving; browser credential guidance covers custom headers and storage limits.

Learn more → Tools Workspace

Live Tool Invocation

Search and invoke tools on a selected running gateway without starting a daemon:

bash
gridctl tools search "message"
gridctl call echo__echo '{"message":"hello"}' --format json

gridctl search remains the install catalog. --as selects a caller-declared scope label and does not authenticate as that client. See Live tools.

Outbound A2A (Experimental)

Declare a remote Agent Card under a2a: and enable experimental.a2a to expose A2A 1.0/0.3 JSON-RPC send, task-get, task-cancel, and advisory skill tools to MCP clients. The adapter requires card-byte trust and needs no container runtime. It is off by default and Unreleased.

Task and context handles are bearer secrets, expire after 24 hours, and become invalid on adapter replacement or restart. Use private argument files and protect call output. Handles authorize gateway routing within current policy; they do not isolate a remote agent's shared memory.

Learn more → A2A configuration · Example setup

Rate Limits

Cap call rates per client, server, or tool, enforced at tool-call dispatch, so a runaway agent stops at the limit instead of hammering a server. Omitting the block limits nothing.

yaml
limits:
  rate_limits:
    - server: github
      calls_per_minute: 30
      burst: 10
bash
gridctl limits                     # Every rate limit and its state

Learn more → Configuration Reference

Schema Pinning

Gridctl pins every tool definition the first time it sees it and flags drift on later applies, so a server that quietly rewrites a tool's description or schema surfaces as a reviewable diff instead of reaching your agent unnoticed. Pinned definitions are also scanned for injection signals: hidden instructions, sensitive-file references, hidden Unicode, and cross-server tool shadowing. Skill documents get the same trust-on-first-use treatment (gridctl skill pins): per-file digests over the whole document set, drift held for human approval, and the same injection heuristics as advisory findings.

bash
gridctl pins verify                # Exit 1 on drift
gridctl pins diff github           # Per-tool before/after plus scan findings
gridctl pins approve github        # Re-pin after review

Learn more → Configuration Reference

Downstream Authorization

For OAuth-protected remote servers, gridctl is the OAuth client: one browser login serves every connected LLM client, with tokens encrypted on disk and refreshed automatically. An unauthorized server deploys in a needs auth state rather than failing the stack.

yaml
mcp-servers:
  - name: notion
    url: https://mcp.notion.com/mcp
    auth:
      type: oauth
bash
gridctl auth login notion
gridctl auth status

Learn more → Configuration Reference

Scoped Variable Delivery

Keep secrets and environment-specific configuration in the variable store (encrypted at rest when locked), declare value-free prerequisites in stack.yaml, and inspect where each key is consumed without exposing its value. Delivery stays explicit: stack references and scoped sets feed workloads, while var run selects the keys made available to a child process.

yaml
variables:
  GITHUB_TOKEN:
    required: true
    description: Token used by the GitHub server

mcp-servers:
  - name: github
    env:
      GITHUB_PERSONAL_ACCESS_TOKEN: ${var:GITHUB_TOKEN}
bash
gridctl var explain GITHUB_TOKEN     # Resolution, declaration, and consumers
gridctl var run --only GITHUB_TOKEN -- gh auth status
gridctl var scan --staged            # Exact-value check before commit

Names beginning with GRIDCTL_, plus OP_CONNECT_TOKEN and OP_SERVICE_ACCOUNT_TOKEN, are reserved for gridctl control-plane credentials and cannot be delivered to workloads.

Learn more → CLI Reference · Variable declarations

Skill Library

Every SKILL.md in your registry surfaces to upstream MCP clients as a prompt. Author in the Library workspace in the web UI (or via gridctl skill * on the CLI), activate, and the prompt becomes available to Claude Desktop, Claude Code, Cursor, Codex, or anything that speaks MCP.

bash
gridctl skill list                        # Show what's in the registry
gridctl skill add <git-repo>              # Import skills (and agents) from a remote repo
gridctl activate my-skill                 # Promote a draft → active

Skills follow the agentskills.io specification: author them as plain markdown with frontmatter and they work with every skill-aware client, not just gridctl.

The registry holds more than skills. The same import pipeline discovers Claude Code subagent definitions (agents/*.md), and gridctl skill project sync places both onto disk for clients that read files instead of MCP: identity copies for Claude Code, rendered dialects for OpenCode, Copilot, and Gemini CLI. A shared lockfile tracks every projected file, so drift is detected, hand edits are adoptable, and unsync removes exactly what gridctl wrote. The global context can likewise become a library of rule fragments with per-client assembly; see Global Context Sync.

Learn more → Skills guide

Packs

A pack is a git repo with a gridctl-pack.yaml manifest: a versioned selection of skills, agents, rule fragments, and gateway wiring that imports and applies as one unit, so a team setup is one command instead of a checklist.

bash
gridctl pack add <git-repo>               # Clone, scan, and import the manifest's selection
gridctl pack apply team-pack              # Project everything to detected clients
gridctl pack remove team-pack             # Cascade removal by pack tag, never by name match

Every projection a pack applies is tagged with the pack name in the lockfile, which is what makes pack status and removal exact: resources you created yourself are never claimed or deleted.

Learn more → Packs guide

📙 Examples

ExampleWhat It Shows
mcp-basic.yamlStack with multiple MCP servers and tool filtering
local-mcp.yamlRun MCP servers as local host processes over stdio
ssh-mcp.yamlConnect to MCP servers on remote machines via SSH
openapi-basic.yamlTurn a REST API into MCP tools via OpenAPI spec
a2a/Experimental outbound A2A tools with card trust and secret task/context handles
code-mode-basic.yamlGateway code mode with search + execute meta-tools
github-mcp.yamlGitHub MCP server integration
registry-basic.yamlSkills registry with a single server
var-basic.yamlReference variable-store secrets with ${var:KEY} syntax
per-client-scoping.yamlRestrict which servers and tools each linked client may touch
declarative-link/stack.yamlAuto-link LLM clients on apply with a link: block
autoscale-basic.yamlReactive replica autoscaling for a stdio server
python-sources/Generate non-root Python containers from exact PyPI and Git sources
execution/Opt-in container restrictions and instance-bound execution evidence
security-evidence/Partial, unknown, and N/A states for gridctl doctor --security
otlp-jaeger.yamlExport traces to Jaeger via OTLP
runs/stack.yamlOpt-in metadata-only persisted dispatch records
portable-pack/Team pack: skills, agents, and wiring from one manifest

📖 Documentation

Full index at docs/.

🤝 Contributing

See CONTRIBUTING.md. PRs welcome for new transport types, example stacks, and documentation improvements.

🪪 License

Apache 2.0


安装

TypingMind
{
  "mcpServers": {
    "gridctl": {
      "command": "gridctl",
      "args": [
        "apply",
        "{{config.STACK_YAML_PATH}}"
      ],
      "env": {
        "STACK_YAML_PATH": "<STACK_YAML_PATH>"
      }
    }
  }
}

将 gridctl MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 gridctl 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 您可以在自己的设备上本地运行 MCP,也可以通过 URL 连接远程 MCP 服务器。

方式 1:使用本地连接器

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 gridctl 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 gridctl MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "gridctl": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 gridctl MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 gridctl MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 gridctl 帮我完成这项任务吗?
gridctl
当然。我已阅读。
以下是我使用 gridctl 得到的结果。

方式 2:添加 MCP 服务器 URL

如果 gridctl 已托管在远程服务器上,或您的团队希望让多个用户共用一个连接器,请选择此方式。

1

打开 MCP 连接器

在 TypingMind 中,前往“插件”,打开“MCP 连接器”,然后选择“添加 URL”。

  1. 在您的浏览器中打开 TypingMind。
  2. 进入“插件”。
  3. 打开“MCP 连接器”。
  4. 点击“添加 URL”。
TypingMind 的“添加自定义 MCP 服务器 URL”表单
2

粘贴服务器 URL

在“服务器 URL”字段中输入 提供商提供的 MCP 服务器 URL。根据服务器要求,添加连接名称、描述、图标、自定义 HTTP 请求头或 OAuth 客户端设置。

  1. 将 提供商提供的 MCP 服务器 URL 粘贴到“服务器 URL”字段中。
  2. 为 gridctl 输入连接名称。
  3. 您可以添加描述和图标,以便更容易识别此连接。
  4. 如果服务器需要身份验证,请添加自定义 HTTP 请求头或 OAuth 客户端信息。
3

创建连接

点击“创建连接”,然后返回插件列表,确认新的 MCP 连接显示为“有效”。

  1. 点击“创建连接”。
  2. 返回 MCP 连接器列表。
  3. 确认 gridctl 连接显示为“有效”。
  4. 如果连接未立即出现,请刷新插件列表。
4

切换模型,无需重新连接

使用您偏好的模型开始聊天,在“插件”中启用 gridctl 工具,并根据需要随时切换到其他模型。该 MCP 连接在 TypingMind 工作区中仍然可用。

  1. 在 TypingMind 中开始新聊天。
  2. 选择您想使用的 AI 模型。
  3. 在“插件”中启用 gridctl 工具。
  4. 需要时,请让模型使用该工具。
  5. 切换到其他 AI 模型,继续使用同一个 MCP 连接。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 gridctl 帮我完成这项任务吗?
gridctl
当然。我已阅读。
以下是我使用 gridctl 得到的结果。

常见问题

gridctl MCP 服务器有什么用途?

gridctl 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 gridctl MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 gridctl,而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 gridctl MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 gridctl 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 gridctl MCP 连接到 TypingMind?

您可以通过本地 MCP 连接器,或添加远程 MCP 服务器 URL,在 TypingMind 中连接 gridctl。当服务器需要访问您设备上的文件、应用或私有资源时,请使用本地连接器;当 MCP 服务器托管在远程时,请使用服务器 URL。

gridctl MCP 在 TypingMind 中提供哪些工具?

gridctl 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 gridctl MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 gridctl 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇