Context Bridge

io.github.prateekg7由 GitHub 账号 prateekg7 发布v0.1.3更新于 Nov 3, 2026

Context portability MCP server for compressing, formatting, and resuming AI conversation handoffs.

已验证STDIO仅桌面知识与记忆AI 与机器学习

概览

AI 生成的概览

本地 MCP 服务器,把进行中的 AI 对话压缩成结构化上下文块,并重新排版,让另一个助手接着做下去。

可以做什么
  • 把原始对话记录压缩成结构化上下文块,保留目标、已确认决定、当前状态、未结事项与下一步
  • 把压缩后的上下文块按目标平台(Claude、ChatGPT、Gemini)排版
  • 基于上下文块生成可直接投放到目标平台的落地包,便于另一个助手继续
  • 按调用选择推理通道:OpenAI、OpenAI chat、Google、Groq、自定义或托管
适用场景
适合在不同 AI 助手之间切换,或开新会话时希望把目标、决定和未结事项带过去,而不必重新复述。也适合在交接前把冗长对话压缩整理。
运行要求
以 stdio 方式在本机运行,通常通过 npx 启动 npm 包,需要 Node.js。压缩需要模型提供方:OpenAI、Google 或 Groq 的 API 密钥、自定义端点,或托管端点地址。密钥通过 OPENAI_API_KEY、CONTEXTBRIDGE_HOSTED_API_KEY 等环境变量或单次调用参数提供。需要能访问所选提供方的网络。
安装前请注意
完整对话记录会发送到你配置的模型提供方,请勿粘贴密钥或敏感数据。API 密钥可通过环境变量或单次调用的 apiKey 参数传入,避免写入共享配置。使用付费提供方通道会在你自己的账户上产生费用。README 的安装示例提到 GROQ_API_KEY,但清单中并未声明该变量。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Context Bridge,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

ContextBridge

[npm version] [MCP Registry]

ContextBridge is a context portability tool for AI conversations. This package publishes the MCP server surface: it compresses an in-progress conversation into a structured context block that preserves the user's goal, confirmed decisions, current state, open threads, artifacts, constraints, recent pivots, and suggested next step, then formats that handoff so another AI can continue without forcing the user to restate everything.

The published npm artifact is the stdio MCP server for Claude Desktop, agent runtimes, and other MCP-compatible hosts. The browser extension runtime is developed in the same repository, but it is not part of this MCP Registry publishing flow.

Published Links

Install In Claude Desktop

Add this to your Claude Desktop MCP config (~/Library/Application Support/Claude/claude_desktop_config.json):

json
{  "mcpServers": {    "contextbridge": {      "command": "npx",      "args": ["-y", "@contextbridge_ai/mcp"],      "env": {        "GROQ_API_KEY": "your_groq_api_key_here"      }    }  }}

Or with OpenAI:

json
{  "mcpServers": {    "contextbridge": {      "command": "npx",      "args": ["-y", "@contextbridge_ai/mcp"],      "env": {        "OPENAI_API_KEY": "your_openai_api_key_here",        "OPENAI_MODEL": "gpt-4.1-mini"      }    }  }}

For a hosted no-key lane instead of BYOK:

json
{  "mcpServers": {    "contextbridge": {      "command": "npx",      "args": ["-y", "@contextbridge_ai/mcp"],      "env": {        "CONTEXTBRIDGE_HOSTED_URL": "https://your-hosted-endpoint.example/v1",        "CONTEXTBRIDGE_HOSTED_MODEL": "mistralai/Mistral-7B-Instruct-v0.2"      }    }  }}

Available MCP Tools

compress_context

Compresses a raw transcript into a structured context block.

Parameters:

  • transcript (string, required): the raw conversation transcript to compress.
  • provider ("openai" | "openai-chat" | "google" | "groq" | "custom" | "hosted", optional): provider override.
  • model (string, optional): model override for the selected lane.
  • apiKey (string, optional): BYOK API key override.
  • baseUrl (string, optional): API base URL override.
  • hostedApiKey (string, optional): optional auth key for the hosted lane.

format_for_target

Formats a compressed context block for a destination platform.

Parameters:

  • context_block (object, required): a validated ContextBridge compressed context block.
  • target ("claude" | "chatgpt" | "gemini", required): destination AI platform.

resume_context

Builds a destination-ready landing package from a compressed context block.

Parameters:

  • context_block (object, required): a validated ContextBridge compressed context block.
  • target ("claude" | "chatgpt" | "gemini", required): destination AI platform.

BYOK Setup

ContextBridge auto-selects the OpenAI Responses lane when a BYOK key is present.

Environment variables:

bash
OPENAI_API_KEY=your_openai_api_key_hereOPENAI_MODEL=gpt-4.1-miniOPENAI_BASE_URL=https://api.openai.com/v1

Additional supported provider overrides:

bash
GOOGLE_API_KEY=your_google_api_key_hereGOOGLE_MODEL=gemini-2.5-proGOOGLE_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai
GROQ_API_KEY=your_groq_api_key_hereGROQ_MODEL=llama-3.3-70b-versatileGROQ_BASE_URL=https://api.groq.com/openai/v1
CONTEXTBRIDGE_API_KEY=your_custom_api_key_hereCONTEXTBRIDGE_MODEL=your_custom_model_hereCONTEXTBRIDGE_BASE_URL=https://your-endpoint.example/v1CONTEXTBRIDGE_PROVIDER=custom

Hosted Lane Setup

The hosted lane is the no-key path for end users who do not bring their own provider credentials.

Environment variables:

bash
CONTEXTBRIDGE_HOSTED_URL=https://your-hosted-endpoint.example/v1CONTEXTBRIDGE_HOSTED_MODEL=mistralai/Mistral-7B-Instruct-v0.2CONTEXTBRIDGE_HOSTED_API_KEY=

Selection priority:

  1. Explicit apiKey option passed into compression uses the OpenAI Responses BYOK lane.
  2. OPENAI_API_KEY uses the OpenAI Responses BYOK lane.
  3. CONTEXTBRIDGE_HOSTED_URL uses the hosted lane.

Contributing

Contributions are welcome. The highest-leverage areas are extraction quality evaluation, browser collector resilience, destination formatting quality, hosted-lane infrastructure, and real-world handoff testing across platforms.

License

MIT. See LICENSE.

来源:README.md,提交 3303d21

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.3最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分