Mercury Spec Ops

io.github.n0zer0d4y由 GitHub 账号 n0zer0d4y 发布v0.1.2更新于 Oct 25, 2026

Modular MCP server for dynamic prompt generation and software development analysis tools

已验证STDIO仅桌面开发者工具AI 与机器学习

概览

AI 生成的概览

一个本地 MCP 服务器,为助手提供工具,按技术栈组装 PRD、代码库分析和缺陷分析的提示词与模板。

可以做什么
根据项目名称、描述、目标受众、功能和技术栈生成 PRD 提示词,并配套可读取的 PRD 模板资源。根据仓库路径、技术栈和分析重点生成代码库分析提示词,并配套动态组装的模板。根据仓库路径、缺陷描述、受影响组件、严重程度和技术栈生成缺陷分析提示词,并配套缺陷分析模板。通过枚举参数从模块化组件中组装提示词和模板,技术栈与分析重点支持逗号分隔的多值输入。
适用场景
适合需要助手产出结构化、贴合具体技术的文档时使用,例如产品需求文档、代码库评审或缺陷报告。也适合跨多个已支持技术栈和分析重点、希望统一模板而非临时编写提示词的团队。
运行要求
以本地 stdio 进程运行,可从 npm 安装 @n0zer0d4y/mercury-spec-ops 或通过 npx 直接运行,因此需要 Node.js。需在 Claude Desktop、Cursor 等 MCP 客户端中配置,修改后重启客户端。未声明任何账号、API 密钥或环境变量。
安装前请注意
该服务器只负责组装提示词和模板文本,实际分析由助手完成,结果取决于模型及其读取的内容。仓库路径作为参数传入,请仅指向你愿意让助手查看的代码。使用 npx 时每次启动都会从 npm 获取最新版本。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Mercury Spec Ops MCP Server: Prompts and Resources as Tools

[TypeScript] [MCP Registry] [MCP Dev] [MCP Server] [MCP Server with Tools] [standard-readme compliant] [License: MIT] [MseeP.ai Security Assessment Badge]

The first MCP server to expose dynamic, AI-invocable tools for prompt generation and template assembly.

Transform how AI assistants interact with specialized content. Instead of static prompts and resources, Mercury Spec Ops provides 6 programmable tools that enable AI to dynamically generate technology-specific prompts and comprehensive templates on-demand. Built on a sophisticated modular architecture with 31 technology stacks, 10 analysis dimensions, and 34 template sections—all accessible through simple tool calls.

Features

This MCP server provides a modular, extensible architecture with:

Prompts (Enhanced with Enum Support)

  1. PRD Prompt - Generate Product Requirements Document with modular technology-specific analysis
  2. Codebase Analysis Prompt - Analyze codebases with modular technology/focus-specific analysis
  3. Bug Analysis Prompt - Analyze bugs with modular severity/technology-specific analysis

Resources (Modular Templates)

  1. PRD Template - Modular PRD template with technology-specific sections
  2. Codebase Analysis Template - Modular codebase analysis template with technology/focus-specific sections
  3. Bug Analysis Template - Modular bug analysis template with severity/technology-specific sections

Key Capabilities

Enum-Based Input Validation

  • Technology Stack (31 total):
    • Languages (11): JavaScript, TypeScript, Python, Java, Go, Rust, C#, PHP, Ruby, Swift, Kotlin
    • Runtimes (1): Node.js
    • Frontend (3): React, Angular, Vue
    • Backend (7): Express, NestJS, Django, Flask, Spring, Laravel, Rails
    • Databases (4): MongoDB, PostgreSQL, MySQL, Redis
    • Cloud (3): AWS, Azure, GCP
    • DevOps (2): Docker, Kubernetes
  • Analysis Focus (10 total): architecture, security, performance, testing, documentation, maintainability, scalability, reliability, code-quality, dependencies
  • Bug Severity (4 total): low, medium, high, critical
  • Target Audience: developers, business-users, enterprise, startup, healthcare, finance, and more

Programmatic Prompt Assembly

  • Base prompts + 31 technology modules + 10 focus modules + 4 severity modules
  • Automatic module selection based on input parameters
  • Priority-based module ordering
  • Multi-value support: Analyze multiple technologies and focus areas simultaneously
  • Comma-separated input: "node.js,react,postgresql" or "security,performance,code-quality"
  • Custom instruction integration
  • Intelligent fallback to base prompts

Modular Template System

  • Template sections with dependency resolution
  • Technology-specific template sections
  • Focus-specific template sections
  • Custom section support

Installation

Option 1: Local Development

  1. Clone and install dependencies:
bash
git clone https://github.com/n0zer0d4y/mercury-spec-ops.gitcd mercury-spec-opsnpm installnpm run build
  1. Run the server locally:
bash
npm run mcp

Option 2: Install from npm

bash
npm install -g @n0zer0d4y/mercury-spec-ops

Or use directly with npx (no installation required):

bash
npx @n0zer0d4y/mercury-spec-ops

Usage

Integration with MCP Clients

Configure the server in your MCP client (Claude Desktop, Cursor, etc.):

Using npx (Recommended - No Installation)

For Claude Desktop (claude_desktop_config.json):

json
{  "mcpServers": {    "mercury-spec-ops": {      "command": "npx",      "args": ["-y", "@n0zer0d4y/mercury-spec-ops"]    }  }}

For Cursor (~/.cursor/mcp.json):

json
{  "mcpServers": {    "mercury-spec-ops": {      "timeout": 60,      "type": "stdio",      "command": "npx",      "args": ["-y", "@n0zer0d4y/mercury-spec-ops"]    }  }}
Using Local Installation

For Claude Desktop (claude_desktop_config.json):

json
{  "mcpServers": {    "mercury-spec-ops": {      "command": "node",      "args": ["/path/to/mercury-spec-ops/dist/src/server.js"]    }  }}

For Cursor (~/.cursor/mcp.json):

json
{  "mcpServers": {    "mercury-spec-ops": {      "timeout": 60,      "type": "stdio",      "command": "node",      "args": ["/path/to/mercury-spec-ops/dist/src/server.js"]    }  }}

Windows Local Path Example (Cursor):

json
{  "mcpServers": {    "mercury-spec-ops": {      "timeout": 60,      "type": "stdio",      "command": "node",      "args": [        "C:\\Development\\Projects\\MCP-Servers\\mercury-spec-ops\\dist\\src\\server.js"      ]    }  }}

Important Notes:

  • npx: Automatically fetches the latest version from npm (recommended for most users)
  • Local: Replace the path with your actual project location and run npm run build first
  • Restart: Restart your MCP client after configuration changes

Workflow Examples

Example 1: Enhanced Codebase Analysis

  1. User Prompt: "Analyze this Node.js/TypeScript codebase focusing on security and performance"
  2. Claude Desktop Action:
    • Calls the codebase-analysis-prompt with technology_stack: "node.js,typescript" and analysis_focus: "security,performance"
    • System programmatically assembles: base prompt + Node.js module + TypeScript module + security module + performance module
    • The prompt instructs Claude to first read the resource://codebase-analysis-template
    • Template builder assembles: base template + Node.js sections + TypeScript sections + security sections + performance sections
    • Claude reads the dynamically assembled template
    • Claude analyzes the codebase and generates a comprehensive technology-specific report

Example 2: Enhanced Bug Analysis

  1. User Prompt: "Analyze this critical security bug in React application"
  2. Claude Desktop Action:
    • Calls the bug-analysis-prompt with technology_stack: "react", severity_level: "critical", and bug_type: "security"
    • System assembles: base prompt + React module + security module + critical severity module
    • Template includes: general sections + React-specific + security-specific + critical-severity sections
    • Claude reads the bug analysis template
    • Claude analyzes the bug and generates a comprehensive technology and severity-specific report

Example 3: PRD Generation with Technology Support

  1. User Prompt: "Help me create a PRD for a React-based task management application"
  2. Claude Desktop Action:
    • Calls the prd-prompt with project details and technology_stack: "react"
    • System assembles: base prompt + React module
    • Template builder includes: base PRD template + React-specific considerations
    • Claude reads the technology-enhanced PRD template
    • Claude generates a comprehensive PRD with React-specific sections

Prompt Details

PRD Prompt

  • Name: prd-prompt
  • Arguments:
    • project_name (required): Name of the software project
    • project_description (required): Brief description of the project
    • target_audience (optional): Target audience for the product (enum values)
    • project_type (optional): Type of project (enum values)
    • key_features (optional): Key features to include in the PRD
    • technology_stack (optional): Technology stack to be used (enum values)
    • custom_instructions (optional): Custom instructions for PRD generation

Codebase Analysis Prompt

  • Name: codebase-analysis-prompt
  • Arguments:
    • repository_path (required): Path to the repository to analyze
    • technology_stack (required): Technology stack used in the codebase (enum values)
    • analysis_focus (optional): Focus areas for analysis (enum values)
    • custom_instructions (optional): Custom instructions for codebase analysis

Bug Analysis Prompt

  • Name: bug-analysis-prompt
  • Arguments:
    • repository_path (required): Path to the repository with bugs to analyze
    • bug_description (required): Description of the bug or issue to analyze
    • affected_components (optional): Components affected by the bug
    • severity_level (optional): Severity level of the bug (enum values)
    • bug_type (optional): Type of bug (enum values)
    • technology_stack (optional): Technology stack used in the affected components (enum values)
    • custom_instructions (optional): Custom instructions for bug analysis

Resource Details

PRD Template

  • URI: resource://prd-template
  • Format: Markdown
  • Content: Modular PRD template with technology-specific sections that dynamically assemble based on input parameters

Codebase Analysis Template

  • URI: resource://codebase-analysis-template
  • Format: Markdown
  • Content: Modular codebase analysis template with technology and focus-specific sections that assemble based on analysis parameters

Bug Analysis Template

  • URI: resource://bug-analysis-template
  • Format: Markdown
  • Content: Modular bug analysis template with severity and technology-specific sections that assemble based on bug parameters

Development

Project Structure

src/├── server.ts                    # Main MCP server implementation├── types/│   ├── enums.ts                 # All enum definitions (31 tech + 10 focus)│   └── index.ts                 # Type definitions and exports├── prompts/│   ├── modules/                 # 45 modular prompt components│   │   ├── technology/          # 31 technology-specific modules│   │   │   ├── languages/       # 11 language modules│   │   │   ├── runtimes/        # 1 runtime module│   │   │   ├── frameworks/      # 10 framework modules (3 frontend, 7 backend)│   │   │   ├── databases/       # 4 database modules│   │   │   ├── cloud/           # 3 cloud platform modules│   │   │   └── tools/           # 2 DevOps tool modules│   │   ├── analysis-focus/      # 10 focus-area modules│   │   └── bug-severity/        # 4 severity-specific modules│   ├── base-prompts/            # Base prompt templates│   └── prompt-builder.ts        # Programmatic prompt assembly├── resources/│   ├── templates/               # Modular template components│   │   ├── prd/                 # 10 PRD template modules│   │   ├── codebase-analysis/   # 8 codebase analysis modules│   │   └── bug-analysis/        # 4 bug analysis modules│   └── template-builder.ts      # Programmatic template assembly└── __tests__/                   # Comprehensive test suite (66 tests)    ├── utils/                   # Utility function tests (enum parser)    ├── prompts/                 # Prompt builder tests    ├── resources/               # Template builder tests    └── types/                   # Enum and type tests

Testing

The project includes a comprehensive test suite with 88% coverage:

bash
# Run all testsnpm test
# Run tests in watch modenpm run test:watch
# Run tests with coverage reportnpm run test:coverage
# Run tests with interactive UInpm run test:ui
# Test MCP integrationnpm run test:mcp

Test Statistics:

  • 66 tests (100% passing)
  • 88.48% overall coverage
  • Statement coverage: 88.48%
  • Line coverage: 88.70%

Building for Production

bash
npm run build

Linting

bash
npm run lint

Extending the System

Adding New Technology Modules

  1. Add the technology to the TechnologyStack enum in src/types/enums.ts
  2. Create a new module file in the appropriate category:
    • Languages: src/prompts/modules/technology/languages/
    • Frameworks: src/prompts/modules/technology/frameworks/frontend/ or backend/
    • Databases: src/prompts/modules/technology/databases/
    • Cloud: src/prompts/modules/technology/cloud/
    • Tools: src/prompts/modules/technology/tools/
  3. Implement the TechnologyPromptModule interface
  4. Export from the category's index.ts
  5. Register it in prompt-builder.ts
  6. Add corresponding template sections in src/resources/templates/
  7. Write tests in src/__tests__/

Adding New Focus Areas

  1. Add the focus area to the AnalysisFocus enum in src/types/enums.ts
  2. Create a new module file in src/prompts/modules/analysis-focus/
  3. Implement the AnalysisFocusPromptModule interface
  4. Export from analysis-focus/index.ts
  5. Register it in prompt-builder.ts
  6. Add corresponding template sections
  7. Write tests

Adding New Severity Levels

  1. Add the severity to the BugSeverity enum in src/types/enums.ts
  2. Create a new module file in src/prompts/modules/bug-severity/
  3. Implement the BugSeverityPromptModule interface
  4. Register it in the prompt builder
  5. Add corresponding template sections
  6. Write tests

Contributing

Contributions are welcome! Please follow these guidelines:

  • Fork the repository and create a feature branch
  • Follow existing code patterns and maintain test coverage above 85%
  • Use Conventional Commits format (feat, fix, docs, test, chore)
  • Ensure all tests pass before submitting a pull request
  • See Extending the System for adding new modules

Report issues on GitHub Issues with clear reproduction steps.

License

This project is licensed under the MIT License - see LICENSE file for details.

来源:README.md,提交 73aa180

工具

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

版本历史

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

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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