YA

yatfa-ai/specguard-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

1 stars 0 forks 质量 71 趋势 14

MCP服务器将SpecGuard的套件智能与AI编码代理连接起来。

概览

MCP与SpecGuard的桥梁——为AI代理提供了庞大测试套件背后的智能工具。 specguard-mcp 是一个模型上下文协议服务器,将支持 MCP 的代理(Claude Code、Claude Desktop 等)连接到 SpecGuard,因此代理可以询问套件覆盖的内容、运行成本以及漏洞所在——而无需在提示符中输入任何 HTTP 或认证代码。 SpecGuard 主要为 AI 编码代理设计;这个桥接是代理能够在不抓取网页界面的情况下访问它的方式。 今天发布了一小套工具,每个都包裹着已有的功能——详见“工具”中的内容。工具集——参见“添加工具”。尚未发布到 npm;从结出时安装。 启动服务器不需要任何东西。每个工具在调用时都会询问它的需求,因此缺失的变量会以工具结果中一个可读的句子返回——而不是服务器拒绝启动,导致不需要配置的工具一起被关闭。

概述(AI 翻译)

MCP与SpecGuard的桥梁——赋予AI代理套房 智能支持一个庞大的测试套件作为工具。

specguard-mcp 是一个模型上下文协议服务器,连接 一个支持MCP的代理(Claude Code、Claude Desktop等)发送给SpecGuard,以便代理可以询问 套件覆盖、运行成本以及漏洞所在——没有任何HTTP或认证代码的话 提示。

SpecGuard 主要为 AI 编码代理构建;这 桥接是代理在不抓取网页界面的情况下访问它的方式。

状态:自举。 今天有一批工具发货,每件都包裹着已经 存在——参见其中的工具。工具集逐渐增长——参见 添加一个工具。它还没有发布到 npm;从结账处安装。

安装

需要Node.js 20年或更高。

配置

启动服务器不需要任何东西。每个工具在调用时都会询问它的需求,所以 缺失变量以工具结果中可读的句子形式返回——从未以服务器形式返回 它拒绝启动,还把不需要配置的工具也一起拉掉了。

变量 需要 默认 它是什么

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

specguard-mcp

The MCP bridge to SpecGuard — gives an AI agent the suite intelligence behind a very large test suite as tools.

specguard-mcp is a Model Context Protocol server that connects an MCP-capable agent (Claude Code, Claude Desktop, …) to SpecGuard, so the agent can ask what a suite covers, what it costs to run and where the gaps are — without a line of HTTP or auth code in its prompt.

SpecGuard is built primarily for AI coding agents; this bridge is how an agent reaches it without scraping a web UI.

Status: bootstrap. A small set of tools ships today, each wrapping a capability that already exists — see The tools for what is in it. The toolset grows gradually — see Adding a tool. It is not published to npm yet; install from a checkout.

Install

git clone https://github.com/yatfa-ai/specguard-mcp.git
cd specguard-mcp && npm install && npm run build

Requires Node.js 20 or newer.

Configure

Nothing is required to start the server. Each tool asks for what it needs when it is called, so a missing variable comes back as one readable sentence in a tool result — never as a server that refuses to boot and takes the tools that needed no configuration down with it.

Variable Needed by Default What it is
SPECGUARD_ENDPOINT get_repository_overview, get_intent_schema, get_server_version, list_repositories, add_repository, registrable_repositories — your SpecGuard instance’s root URL, including the scheme — e.g. https://specguard.example.com, or http://localhost:3000. A value with no scheme is refused by name (SPECGUARD_ENDPOINT is not a usable URL: "sg.example.com") rather than surfacing later as an opaque failure. SPECGUARD_URL is accepted as an alias, and is the name every message uses when it is the one you set. A blank value counts as unset, so leaving SPECGUARD_ENDPOINT empty in a templated config falls through to SPECGUARD_URL instead of suppressing it. get_server_version and get_intent_schema need only this variable — they send no API key, because the routes they read are unauthenticated by design
SPECGUARD_API_KEY get_repository_overview, near_duplicate_clusters, find_tests_near_behavior (default calls) — an agent/CI API key (sgk_…) issued by that deployment — a per-repository key, which is the single repository those tools answer about by default
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "specguard": { "command": "node", "args": ["/path/to/specguard-mcp/dist/bin/specguard-mcp.js"], "env": { "SPECGUARD_ENDPOINT": "https://specguard.example.com", "SPECGUARD_API_KEY": "sgk_…", "SPECGUARD_USER_API_KEY": "sgu_…", "SPECGUARD_AGENT_API_KEY": "sga_…", "SPECGUARD_LINT_COMMAND": "bundle exec specguard-lint" } } } }