Token导航 LogoToken导航TokenDH.com
ghostserver (Adam Scott Thomas) logo
AI代理stdio官方级别未说明来源级核验

ghostserver (Adam Scott Thomas)

MCP Server

GhostServer是一个自托管的MCP服务器,可将任何AI工具连接到您的真实账户,确保令牌不会离开您的机器。

工具数

19

提示词数

0

GitHub Stars

0

资源数

0
自托管PythonClaudeClaudeCursorWindsurfVS Code

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

adam-scott-thomas

提供方

adam-scott-thomas

最后核验

2026/5/17 20:22

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install ghostserver

详细介绍

Ghost服务器

英语 · 中文 · 日本语 · 韩语 · 俄语 · 德语

自托管MCP服务器,将任何AI工具连接到您的真实账户。你的代币永远不会离开你的机器。

适用于Claude Code、Cursor、VS Code Copilot、Windsurf和任何兼容MCP的客户端。

为什么

每个“MCP服务器”都有一个指向其他人云的设置向导,或者锁定到一个AI供应商。GhostServer在本地运行,将凭据存储在您自己的保险库中,并使用标准的MCP协议,因此任何客户端都可以使用它。

21工具,5服务

服务工具
GitHub列出仓库、创建问题、列出/获取PR、搜索代码
Gmail搜索、阅读、发送、列出标签
谷歌日历列出事件、创建事件、忙/闲、获取事件
云耀列出区域、DNS记录、创建DNS、列出Workers
亚马逊云服务S3存储桶/对象、EC2实例、CloudWatch指标

安装

pip install ghostserver

或来源:

git clone https://github.com/adam-scott-thomas/ghostserver.git
cd ghostserver
pip install -e ".[dev]"

快速开始

1.配置

cp ghostserver.toml.example ghostserver.toml

编辑 ghostserver.toml --启用所需的服务并设置凭据引用。

2.存储凭据

GhostServer支持三个凭据后端:

环境变量 (最简单):

[server]
credential_backend = "env"

[github]
enabled = true
token_ref = "GITHUB_TOKEN"
export GITHUB_TOKEN="ghp_your_token_here"

凭据文件 (无环境污染):

[server]
credential_backend = "file"
credential_file = "~/.ghostserver/credentials"

[github]
enabled = true
token_ref = "GITHUB_TOKEN"
# ~/.ghostserver/credentials
GITHUB_TOKEN=ghp_your_token_here
CLOUDFLARE_TOKEN=your_cf_token

1Password命令行界面 (最安全):

[server]
credential_backend = "op"

[github]
enabled = true
token_ref = "op://Development/GitHub PAT/credential"

自动检测 (默认):尝试1Password,然后是凭据文件,然后是env-vars。

3.谷歌服务(一次性设置)

Gmail和谷歌日历需要OAuth。运行安装向导一次:

python -m ghostserver.google_auth

这将打开您的浏览器,获得同意,并将刷新令牌存储在您选择的后端。

4.连接到您的AI工具

克劳德代码:

claude mcp add --transport stdio ghostserver -- python -m ghostserver

光标/VS代码: 添加到MCP设置中:

{
  "ghostserver": {
    "command": "python",
    "args": ["-m", "ghostserver"]
  }
}

任何MCP客户端(stdio):

python -m ghostserver

建筑

Your AI Tool (Claude Code, Cursor, etc.)
  |
  | MCP protocol (stdio)
  |
  v
GhostServer (local process)
  |
  |-- spine (frozen config registry)
  |-- gate (per-service rate limiting + enabled checks)
  |-- token store (pluggable: 1Password / env / file)
  |
  |-- GitHub adapter ──> api.github.com
  |-- Gmail adapter ──> gmail.googleapis.com
  |-- Calendar adapter ──> googleapis.com/calendar
  |-- Cloudflare adapter ──> api.cloudflare.com
  |-- AWS adapter ──> boto3 (local credentials)

每个适配器都是一个文件。登机口强制执行每次服务的费率限制。Spine提供了冻结配置单例,因此适配器不会传递对象。

添加自己的适配器

创建 src/ghostserver/adapters/myservice.py:

from fastmcp import FastMCP
from spine import Core
from ghostserver.gate import check_gate

SERVICE = "myservice"
server = FastMCP("My Service")

@server.tool
async def myservice_do_thing(param: str) -> dict:
    """Description for the AI client."""
    check_gate(SERVICE)
    tokens = Core.instance().get("tokens")
    token = tokens.get(Core.instance().get("config").myservice.token_ref)
    # ... call your API ...
    return {"result": "done"}

将服务配置添加到 config.py,将模块名称添加到 adapters/__init__.py,完成。提交PR。

发展

git clone https://github.com/adam-scott-thomas/ghostserver.git
cd ghostserver
pip install -e ".[dev]"
pytest -v

许可证

Apache 2.0

目录标签

目录标签

自托管PythonClaude本地部署MCP协议AI工具集成本地代理多服务支持

支持客户端

ClaudeCursorWindsurfVS Code

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

oauth

工具数量(toolCount,工具数)

19

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiooauth部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP