跳到正文
Skillpedia
连接器(MCP)31k · #9308

remote-mcp

它能做什么

这项技能让你电脑上的知识库可以通过 MCP 访问,使你的其他设备和 AI 应用能够连接它。默认使用 Tailscale 作为私有连接,只有在你选择时才会开放公共链接。

适用场景

  • ✓当你想在另一台设备、桌面应用或云端智能体上使用你的知识库时。
  • ✓当云端 AI 工具需要访问你的知识库,并且你接受公共端点时。
  • ✓当你想给某个应用有限的知识库访问权限时。

技能链接

https://github.com/garrytan/gbrain/blob/master/plugin/skills/remote-mcp/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/garrytan/gbrain/blob/master/plugin/skills/remote-mcp/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请让我的笔记本电脑和手机能够通过私有网络访问我的知识库,并给我连接地址。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会安装并登录 Tailscale,把本地服务器发布到你的私有网络上,并将其保持为后台服务运行。之后你需要分别为每个客户端授予访问权限。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Remote MCP — use your brain from anywhere

The brain already runs on the user's computer. This skill makes it reachable over MCP from their other devices and from the agents they use elsewhere, without moving the data and without putting a database on the public internet. Tailscale is the default transport; publishing is one command, access is one scoped grant per client.

Contract

This skill guarantees:

  • Tailscale by default. gbrain mcp expose publishes the local server with tailscale serve (HTTPS on the tailnet, nothing public). ngrok and cloud hosts stay documented alternatives, never the first suggestion.
  • Funnel is explicit. Cloud agents whose runtime is not on the tailnet (Grok Bot, Muse, ChatGPT, Claude.ai / Cowork, Perplexity) need --funnel, which makes the same *.ts.net name publicly reachable. Say so before running it; the endpoint is then protected by gbrain's OAuth / bearer auth and scoped grants, not by the network.
  • Consent before system changes. Installing Tailscale, running tailscale up, writing a serve/funnel config and creating a user service are host-state changes. Show the operator the printed plan and get a yes before passing --yes.
  • Engine-free. gbrain mcp expose never opens the database. On a PGLite brain the running server owns the single-writer lock, so every later provisioning step goes through the server's authenticated admin API (--admin-token-file), never a second process on the database.
  • No secrets in chat. The admin token lives in the receipt's admin_token_file (normally ~/.gbrain/serve/admin-token); machine and confidential OAuth credentials land in a private --credentials-out file. Public PKCE has no secret. Quote redacted receipts; deliver a requested owner login link privately and unopened.
  • Owner authority is separate. The expose-managed wrapper loads its token file as GBRAIN_ADMIN_BOOTSTRAP_TOKEN; that file authorizes gbrain mcp admin and mcp grant against that server. An ordinary MCP token, client secret, or OAuth admin scope does not. With --no-service, use the independently running server's actual configured owner credential; creating an expose token file does not configure that process.
  • Least privilege. One client per consumer, memory-writer for ordinary memory use or memory-reader for read-only access. Broader access requires the user's request. Never operator / full / admin to make a convenience check pass.
  • Server checks are not native activation. gbrain mcp verify accepts a private machine handoff and checks the access that grant permits. Native OAuth is verified through the native client's authenticated connection. A generated file or server probe does not prove that client loaded its tools.

Decision table — who is connecting?

Client Shape Command
Your own devices: Claude Desktop, Claude Code / Codex / opencode on another laptop, phone apps joined to the tailnet tailnet-only HTTPS (default) gbrain mcp expose --dry-run (preview; the run itself is Phase 2, after consent)
Cloud agents running in a vendor's cloud: Grok Bot, Muse, ChatGPT connector, Claude.ai / Cowork, Perplexity Computer public HTTPS on the same *.ts.net name gbrain mcp expose --funnel --dry-run (preview; Phase 2 after consent)
Cloud agent whose runtime you can join to your tailnet (userspace tailscaled, ephemeral auth key) tailnet-only Advanced, unverified, not automated — see the remote MCP guide
Local agents on the same machine (Claude Code, Codex, opencode) loopback — no Tailscale needed Postgres: gbrain bootstrap harness --yes --port 3131. PGLite: mint the token BEFORE the service runs (gbrain auth create local-agents --scopes read,write — before gbrain mcp expose, or while the service is briefly stopped) and pass gbrain bootstrap harness --yes --port 3131 --token <value>; OR use the scoped path gbrain mcp grant <name> --harness <id> --profile memory-writer --source default --url http://127.0.0.1:3131/mcp --admin-token-file ~/.gbrain/serve/admin-token --credentials-out /private/<name>.json then gbrain connect http://127.0.0.1:3131/mcp --harness <id> --credentials-file /private/<name>.json --install (MCP wiring only, no per-turn hooks)
Thin client only (this machine has no brain) — Stop:
常见问题

这样设置之后,我的知识库会公开吗?

不会。默认情况下它只在你的私有网络中可用。公共访问需要单独的、明确的选择。

它会把我的数据移到云端吗?

不会。你的数据留在你的电脑上,只有连接被共享。

它会不经询问就改动我的系统吗?

不会。安装软件和更改网络设置都需要你事先明确批准。

详情

作者的原始描述

Publish the user's own gbrain over MCP so other devices, desktop apps and cloud agents can reach it. `gbrain mcp expose` installs and signs in Tailscale, publishes the running `gbrain serve --http` on the tailnet (HTTPS, tailnet-only by default; Funnel only when a client lives in a vendor cloud), keeps the server alive as a user service, and hands back the MCP URL. Then register one least-privilege client per consumer, choose native OAuth/PKCE or a private machine handoff for that client, and verify the connection inside the intended harness.

repo: garrytan/gbrain

热度

GitHub 星标
31k
排名
#9308
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能