Skip to main content
Glama
MCP Knowledge Bridge

MCP Knowledge Bridge

MCP Knowledge Bridge

手写、可教学的 MCP 子集实现。v0.3.0 在 stdio 上支持 2025-11-25 协议协商,以及 tools / resources / prompts / ping 与初始化生命周期。体积刻意保持小,不是完整 MCP SDK,也不是生产网关。

Python License: MIT

安装与运行

python -m pip install -e ".[dev]"
python -m examples.demo_protocol
python -m mcp_bridge.server

stdio 传输:每行一条 UTF-8 JSON-RPC(非 Content-Length 分帧)。

mcp-knowledge-bridge

Cursor 配置示例

{
  "mcpServers": {
    "knowledge-bridge": {
      "command": "python",
      "args": ["-m", "mcp_bridge.server"],
      "cwd": "/absolute/path/to/mcp-knowledge-bridge"
    }
  }
}

Related MCP server: Hoard

自研 REST companion

mcp_bridge.http_server 是带鉴权的 自定义 REST 伴生服务。
它不是 MCP Streamable HTTP,也不实现 MCP-over-HTTP / OAuth。

export MCP_BRIDGE_TOKEN="replace-with-a-secret"
mcp-knowledge-bridge-rest
curl -H "Authorization: Bearer replace-with-a-secret" http://127.0.0.1:8765/tools

PowerShell:

$env:MCP_BRIDGE_TOKEN = "replace-with-a-secret"

范围

已实现:initialize、notifications/initialized、ping、tools/list、tools/call、resources/list、resources/read、prompts/list、prompts/get。

未声称:sampling、roots、elicitation、subscriptions、Streamable HTTP 等。

开发

python -m ruff check .
python -m pytest --cov=mcp_bridge --cov-report=term-missing

MIT © Brian20040323

Available Tools

4 tools
echo_debugB

Echo payload for wiring tests.

Inputs: message (required).

kb_compareC

Compare two knowledge topics and return a structured diff summary.

Inputs: left_id (required), right_id (required).

kb_getB

Fetch one knowledge entry by id.

Inputs: id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: search, fetch by ID, compare two topics, and a debug echo. No overlap in functionality.

    Naming Consistency3/5

    Three tools follow the 'kb_' prefix with verbs, but 'echo_debug' breaks the pattern by omitting the prefix. Mixed conventions reduce consistency.

    Tool Count5/5

    Four tools is well within the typical 3-15 range and feels appropriate for a focused knowledge bridge server.

    Completeness2/5

    Only read and compare operations are present. Missing create, update, and delete for knowledge entries, which are essential for managing a knowledge base.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      A
      maintenance
      Cross-agent memory bridge for AI coding assistants. Persistent knowledge graph shared across 10 IDEs (Cursor, Windsurf, Claude Code, Codex, Copilot, Kiro, Antigravity, OpenCode, Trae, Gemini CLI) via MCP. 22 tools including team collaboration, auto-cleanup, mini-skills, session management, and workspace sync. 100% local, zero API keys required.
      9
      1,321 npm
      921
      Apache 2.0
    • F
      license
      Not graded
      quality
      A
      maintenance
      Exposes a local hybrid (vector + BM25) index of scattered notes, docs, PDFs, and chat logs to AI hosts like Claude Desktop, Cursor, and Cline, letting agents search and get cited answers. It publishes a set of tools, resources, and prompts so any MCP-compatible client can query that knowledge base with section-level citations.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents and MCP hosts to query a locally built hybrid (vector + BM25) index of scattered notes, docs, and chat logs, retrieving answers with section-level citations. It exposes 8 tools plus resources and prompts so hosts like Claude Desktop, Cursor, and Cline can search, ask, and browse the user's personal knowledge base directly.
      -