Skip to main content
Glama
jianghua-developer

bridge-mcp-server

bridge-mcp-server · AI Foundation 生成能力(MCP 生成面)

把系列「AI 生成完整业务系统」的确定性生成能力按 MCP 规范暴露给任意符合 MCP 的壳(Claude Code / Hermes / 自研 app…)消费。目标是需求 → 生成项目目录的统一流程。

只做生成面:菜单 / 参数内省 / 确定性生成 / 结构化返回;治理链(桥 check 漂移、AI 维护契约)不在此暴露(一面一 server,见 DESIGN §3.1/§10)。

能力(六生成工具 + 两资源 + 玩法)

链

工具

说明

单端(②-⑥ 直生成,零注册)

list_templates

单端候选菜单(离线注册表过滤)

get_template_params

clone 底座 → 读 params.json 两区(native/derived/selection)

generate_single

git 地址 + 参数 + target_dir → copier 生成(无协议地址回退 copier.yml 内省)

多端(① 纯 cli 消费桥)

list_combos

组合菜单(units/edges + 合并 selection,经桥 --json)

get_combo_params

参数基线(params 可问 / internal 勿传 / derived 只读 / 共享参数标 shared: true)

generate_multi

combo + 参数 + target_dir → shell-out 桥 generate

  • Resources:templates://catalog(单端注册表)、combos://catalog(桥内省视图)

  • Prompt / Skill:generate_project_guide(MCP 玩法)+ 壳侧 generate-project(canonical,玩法只引用工具不抄知识)

Related MCP server: Minecraft Dev MCP

架构(双路径 × 双链)

单端:git 地址 → clone → 读协议(params.json 两区/回退 copier.yml) → spec 校验 → copier
多端:纯 cli shell-out 桥(generate + 内省 list-combos/show-combo),server 不直读 combos.yaml

设计定稿见 docs/DESIGN.md;阶段落地已随各仓提交完成(P0-P4 收口,跨仓清单见 DESIGN §13)。

目录结构

bridge_mcp/              共享胶水(无 MCP 面):config / git / protocol / bridge_cli / selection
servers/generation/      生成面 MCP server(六工具 + resources + guide + templates.yaml)
servers/governance/      治理面占位(README,未实现)
skills/generate-project/ 壳侧玩法 skill(canonical)
tests/{unit,e2e}         单测 + MCP stdio / 生成 e2e

快速开始

uv sync                                        # 安装依赖(fastmcp / copier 9.17.1)
# 多端工具需要打包好的桥可执行(见 CLAUDE.md 开发前置):
#   cd ~/project/fullstack-bridge && uv sync --dev && uv run pyinstaller bridge.spec --noconfirm
#   mkdir -p ~/.local/bin && cp dist/bridge ~/.local/bin/bridge
BRIDGE_EXE=/home/jeff/.local/bin/bridge uv run python -m servers.generation.server   # stdio 起 server

挂到 Claude Code

claude mcp add bridge-gen --transport stdio \
  -- uv run --directory /home/jeff/project/bridge-mcp-server python -m servers.generation.server
claude mcp list

为什么不够:MCP generate_project_guide 只是「一段内容」,不会自动让模型调工具。要自然语言直接触发工具,靠两层信号——server instructions(已内置:收到生成需求必须调六工具、禁止编造)+ 壳侧 skill(命中即按流程走并调工具)。skill 是 Claude Code 里最可靠的「玩法」载体。

挂载玩法 skill(强化工具触发)

canonical 在仓库 skills/generate-project/SKILL.md。Claude Code 只在本项目目录内自动发现项目级 skill;要在任意目录都能触发,请装到全局:

mkdir -p ~/.claude/skills/generate-project
cp skills/generate-project/SKILL.md ~/.claude/skills/generate-project/
  • 之后说「帮我生成一个 X 项目/系统」即命中 generate-project → 模型会调用 bridge-gen 六工具(菜单/参数/selection 一律以工具返回为准,不脑补)。

  • 仍未触发,先查连接与点名:

    claude mcp list   # bridge-gen 应为 connected;工具形如 mcp__bridge-gen__list_combos
    # 或点名触发:『用 bridge-gen 的工具』 / 『用 generate-project 走一遍』
  • 改玩法只改仓库 canonical(skills/generate-project/),需要时重新同步全局一份即可(内容与 ~/.claude 允许有版本差,canonical 以仓库为准)。

环境变量

变量

用途

默认

BRIDGE_EXE

桥可执行(dist/bridge,多端链)

无(必配,否则多端工具报错)

BRIDGE

PATH 上的 bridge 命令(备选)

—

BRIDGE_MCP_CACHE

单端克隆缓存根

~/.cache/bridge-mcp-server

只认可执行入口,不暴露源码 cli.py(BRIDGE_CLI 已移除)。

测试

uv run pytest tests/unit -q                 # 离线单测(mock 桥/copier)
BRIDGE_EXE=/home/jeff/.local/bin/bridge uv run pytest -q   # 全量(含 MCP stdio + 生成 e2e)

相关仓库

协议(params.json 两区 + gen-params)见 fullstack-param-protocol;桥(组合治理/内省/生成执行)见 fullstack-bridge;底座:react / vue / python-fastapi 模板。

Available Tools

6 tools
generate_multiGenerate MultiC

多端组合生成(shell-out 桥 generate):combo 须在注册表内,params ⊆ 原生参数集。

ParametersJSON Schema
NameRequiredDescriptionDefault
comboYes
paramsYes
skip_tasksNo
target_dirYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description bears the full burden. It usefully discloses that the call shells out to a 'generate' bridge, but says nothing about side effects on target_dir, whether existing output is overwritten, what happens on partial failure, or how errors from the registry check surface.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One front-loaded sentence with a parenthetical aside; nothing is wasted. It is arguably too terse for a tool with 0% schema coverage, but as a matter of structure it is clean.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a shell-out tool that writes into target_dir with an open-ended nested params object, the description is missing critical context: generation output, file/overwrite behavior and failure modes. No output schema exists to offload that information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% with 4 params, so the description must compensate. It does clarify that 'combo' must exist in a registry and that 'params' keys must be a subset of the native parameter set, but 'skip_tasks' is unexplained and 'target_dir' is only implied by the shell-out framing.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific action and resource: combination generation across multiple endpoints ('多端组合生成'), which is clearly distinct from the sibling generate_single. The parenthetical '(shell-out 桥 generate)' hints at the implementation path but does not fully clarify what the output actually is.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives preconditions ('combo 须在注册表内', 'params ⊆ 原生参数集') but never says when to choose this tool over generate_single or how to discover a valid combo (e.g. via list_combos/get_combo_params). Constraints are stated, usage routing is not.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_singleGenerate SingleB

单端直生成:clone → 读协议 → spec 校验 → copier copy(零注册,target_dir 须为空/不存在)。

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes
git_urlYes
versionNo
skip_tasksNo
target_dirYes

TDQS

B3.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does disclose meaningful traits: this is a multi-step pipeline, it performs 'zero registration' (side-effect scope), and target_dir has a hard emptiness precondition. It omits permissions/auth, failure modes, and whether the clone is cached or temporary, so it is partial but not empty.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense line with the pipeline front-loaded via arrows and the critical constraint parenthesized at the end. Nothing is wasted, though the extreme terseness borders on under-specification for a 5-parameter tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations, no output schema, a nested params object, and 5 parameters at 0% schema coverage, the description is too thin. An agent cannot tell what params should contain, what version does, or what skip_tasks skips.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% across 5 parameters, so the description must compensate and largely does not. It adds real meaning only for target_dir (must be empty/nonexistent); git_url, params, version, and skip_tasks are entirely undocumented in both schema and description, including the nested params object.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific operation ('单端直生成' = single-target direct generation) and enumerates the pipeline it performs (clone → read protocol → spec validation → copier copy). This contrasts implicitly with the sibling generate_multi, though the distinction 'single vs multi' is conveyed by the name rather than stated explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives one usage precondition — target_dir must be empty or nonexistent — which tells the agent when the call will succeed. However, it never states when to choose this over generate_multi, nor any prerequisites about the git_url or protocol source, so routing guidance is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_combo_paramsGet Combo ParamsC

多端参数基线(经桥 show-combo):params(可问)/ internal(勿传)/ derived(只读)/ selection。

ParametersJSON Schema
NameRequiredDescriptionDefault
comboYes

TDQS

C2.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden, and it discloses almost nothing about the operation itself. The notes that internal params are 勿传 (do not pass) and derived are 只读 (read-only) are useful field-level hints, but there is no statement about permissions, side effects, or return shape.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is very short and front-loaded, but the telegraphic style with slashes and parentheticals makes it cryptic rather than efficient. Brevity here comes at the cost of clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema, no annotations, and an undocumented input parameter. For a getter whose entire value is interpreting combo parameter groupings, the description leaves the input semantics and the practical result unexplained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 1 required parameter at 0% schema description coverage, the description should explain what "combo" is, and it does not. It does partially compensate by classifying the returned parameter groups (params/internal/derived/selection), which adds meaning beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description is a noun phrase ("多端参数基线" – multi-client parameter baseline) rather than a stated verb+resource, so it never explicitly says it retrieves combo parameter definitions. It hints at the resource but does not distinguish itself from the sibling get_template_params.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No indication of when to use this tool versus get_template_params, list_combos, or generate_*. The only guidance (勿传 for internal) concerns the returned field categories, not when to invoke the tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_template_paramsGet Template ParamsD

单端参数内省 = 落参与选择地基:clone 底座读 params.json 两区(native/derived/selection)。

ParametersJSON Schema
NameRequiredDescriptionDefault
git_urlYes
versionNo

TDQS

D1.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full behavioral burden. It does disclose that the tool clones the template base and reads params.json partitioned into two/three regions, which is some real context, but it says nothing about authentication needs, cloning cost/latency, caching, or error behavior for an invalid git_url.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is short, but the brevity comes from compression into dense jargon rather than from front-loaded clarity. The single cryptic clause mixes purpose, mechanism, and output structure without a readable lead statement.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema and no annotations, so the description must explain the return shape and the workflow position itself. For a 2-parameter introspection tool sitting beside get_combo_params and the generate_* tools, the definition leaves the agent without enough to invoke it confidently or know what it will get back.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the description adds nothing about the two parameters. It never explains that git_url identifies the template repository to clone or that version optionally pins a revision, so the agent gets no semantic grounding for either input.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gestures at parameter introspection ('参数内省') and mentions reading params.json sections (native/derived/selection), but the phrasing is opaque jargon rather than a plain statement of what the tool returns. It never says it fetches the parameter set for a given template repository, and it does not distinguish itself from the sibling get_combo_params.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or when-not-to-use guidance is given. The fragment '落参与选择地基' hints that this is a prerequisite step before parameter selection/generation (generate_single/generate_multi), but the agent must infer this and is given no rule for choosing this over get_combo_params.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_combosList CombosD

多端菜单(L1/L2 地基):units/edges + 合并 selection(经桥 list-combos)。

ParametersJSON Schema
NameRequiredDescriptionDefault
stackNo

TDQS

D1.3/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full behavioral burden, yet it reveals almost nothing: no read-only indication, no mention of side effects, pagination, or return shape. The phrase '合并 selection' hints at merging but never states what is merged or what the result contains.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is brief, but brevity here reflects under-specification rather than conciseness. The single cryptic line is not front-loaded around a clear action and reads as an internal note rather than agent-facing documentation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations, no output schema, and an undocumented parameter, the description should explain purpose, usage, and behavior. It omits all of these, leaving an agent without enough information to invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for the single 'stack' parameter, which carries a null default and no documented meaning. The description never mentions 'stack' or any parameter, so it does nothing to compensate for the schema gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description ('多端菜单(L1/L2 地基):units/edges + 合并 selection(经桥 list-combos)') restates the tool name in dense jargon rather than stating a clear verb+resource. An agent cannot tell what a 'combo' is or what is actually returned, and there is no differentiation from sibling tools like list_templates or get_combo_params.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no indication of when to use this tool versus the five sibling tools (list_templates, generate_single, get_combo_params, generate_multi, get_template_params). The only reference, '经桥 list-combos', is self-referential and provides no selection guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_templatesList TemplatesB

单端候选菜单(L1):离线读注册表过滤,kind/stack/form 可选(子串匹配; 受控值/同义词见 templates://catalog 词表提示)。

ParametersJSON Schema
NameRequiredDescriptionDefault
formNo
kindNo
stackNo

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden and does disclose two useful behavioral traits: the read is offline (no network/registry mutation) and filters use substring matching. It omits what is returned when no filters are supplied, whether multiple filters combine as AND, and output/pagination behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense sentence front-loads the core action and filter list with little waste. It is slightly undermined by unexplained domain jargon (L1, 单端).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-optional-filter list tool with no annotations and no output schema, the description covers offline behavior, matching semantics, and a value reference, but leaves the return shape and default (unfiltered) behavior unspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate; it names all three parameters (kind/stack/form), marks them optional, and states they are substring matches with controlled values referenced in templates://catalog. That is meaningful, but it still omits example values and how the filters interact.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action (offline read of a registry with filtering) and returns a candidate template list, matching the list_templates name. However, the jargon '单端候选菜单(L1)' is opaque and it never explicitly distinguishes itself from sibling listers like list_combos or get_template_params.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It implies usage context by noting the read is offline and the filters are optional, and it points to templates://catalog for controlled values. But it gives no explicit when-to-use guidance or contrast with the sibling listing tools (list_combos, get_template_params).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 6 tool updatesv0.1.0
    • First observedgenerate_multi
    • First observedgenerate_single
    • First observedget_combo_params
    • First observedget_template_params
    • First observedlist_combos
    • First observedlist_templates

TDQS

C2.8/5.0

Scored across 6 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: list_templates and list_combos separately list single-end and multi-end options; get_template_params and get_combo_params separately introspect parameters; generate_single and generate_multi separately perform generation. The descriptions reinforce the single vs multi distinction, leaving no ambiguity about which tool to call for a given task.

Naming Consistency4/5

All names use snake_case with a consistent verb-first pattern (list_, get_, generate_) and parallel structure for single vs multi (templates/combos, template_params/combo_params). The only minor deviation is that generate_single and generate_multi use mode adjectives rather than nouns, but the set remains highly predictable.

Tool Count5/5

Six tools cleanly cover the two modalities (single-end and multi-end) with three operations each (list, get params, generate). This is well-scoped and every tool earns its place without redundancy.

Completeness4/5

The surface covers discovery, parameter introspection, and generation for both single and multi templates, forming a complete lifecycle for the bridge's purpose. Minor gaps exist: no standalone validation or preview tool, and list_combos lacks the filtering options that list_templates provides.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    MCP server that exposes RESTForge capabilities to AI agents, enabling them to set up, configure, generate code, and manage RESTForge projects through natural language.
    29
    44 npm
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    A Model Context Protocol server that gives AI assistants native access to Minecraft mod development tools — decompile, remap, search, and analyze Minecraft source code directly from your AI workflow.
    92 npm
    41
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    An MCP server that empowers AI coding agents to work effectively with Minecraft mod development, providing static analysis of decompiled source code and runtime interaction with a running Minecraft instance.
    31
    55 npm
    14
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables MCP clients to inspect and operate MCreator workspaces through MCreator's Java APIs, supporting elements, generators, resources, and builds.
    -