Skip to main content
Glama
prompts-mcp-server

prompts-mcp-server

by thana0623

prompts-mcp-server

A universal MCP (Model Context Protocol) Server that automatically generates and manages a prompts system for any software project, enabling AI coding assistants to maintain persistent context across development sessions.

Features

  • Intelligent Project Scanning — Automatically identifies the target project's tech stack, frameworks, databases, and build tools

  • Context Persistence — Maintains a complete chain of project context, conversation logs, and module change history

  • Requirement Clarification Check — A 5-point standard requirement confirmation mechanism to prevent blind development

  • Plan Generation — Generates an executable plan after requirement confirmation, awaiting user approval before implementation

  • Rolling Window System — Maintains the last 5 conversation records and 10 status summaries, with automatic rotation

  • Module-level Tracking — Records change history by functional module for easy traceability

  • Dual Interface Mode — Supports both MCP Server (stdio protocol) and CLI usage

  • Non-destructive Initialization — Does not overwrite existing files when generating prompt files

Related MCP server: MCP Prompt Enhancer

MCP Tools

Tool

Description

init_prompts

Scans the target project and automatically generates the prompts file system

bootstrap

Loads all context files at once; called as the first step when an AI agent starts

check_requirements

5-point standard requirement clarification check (Goal, Input/Output, Constraints, Acceptance Criteria, Impact Scope)

make_plan

Generates an executable plan after requirements are clarified

log_dialog

Logs conversation entries to the transmission chain (rolling window + status summary)

log_module

Records module-level changes (directory-based management)

read_module

Reads module change history

update_todos

Updates the TODO list (add/complete/remove)

Installation

npm install
npm run build

Usage

Integration as an MCP Server

Add the following to your AI assistant's configuration (e.g., Cline, Claude Desktop, etc.):

{
  "mcpServers": {
    "prompts-mcp": {
      "command": "node",
      "args": ["/path/to/prompts-mcp-server/build/index.js"],
      "env": {
        "PROJECT_ROOT": "/path/to/your/project"
      }
    }
  }
}

Usage as CLI

# 初始化 prompts 系统
npm run cli init [--project-root /path]

# 加载所有上下文
npm run cli bootstrap

# 需求检查
npm run cli check "任务描述"

# 生成计划
npm run cli plan "任务描述"

# 记录对话
npm run cli log --title "xxx" --request "xxx" [--changes ...]

# 模块日志
npm run cli module-log <module> --change "xxx"
npm run cli module-read <module>
npm run cli module-list

# TODO 管理
npm run cli todos add|complete|remove "todo text"

Development Mode

npm run dev        # 运行 MCP Server
npm run dev:cli    # 运行 CLI

Environment Variables

Variable

Description

Default Value

PROJECT_ROOT

Target project root directory

process.cwd()

Generated File Structure

After initialization, the following will be generated in the .github/prompts/ directory of the target project:

.github/prompts/
├── context.md           # 项目上下文:技术栈、规则、TODO、日志索引
├── workflow-log.md      # 工作流规则和 AI 对话规范
├── recent-5.md          # 最近 5 条对话记录(滚动窗口)
├── summary-10.md        # 每 10 条的状态摘要
├── log-state.json       # JSON 状态追踪
├── todos.md             # TODO 列表
├── dev-rules.md         # 自动生成的开发规则
├── daily/               # 每日完整日志
│   └── YYYY-MM-DD.md
└── modules/             # 各模块变更历史
    └── <module-name>.md

Tech Stack

  • TypeScript (ES2022, ESM)

  • @modelcontextprotocol/sdk — Official MCP SDK

  • Node.js Runtime

License

MIT

Available Tools

8 tools
bootstrapA

【一键启动】自动读取传递链(context.md + daily + recent-5 + summary-10 + todos + 模块记录)。智能体启动时第一步调用。

Inputs: no named parameters.

check_requirementsA

【需求澄清】执行 5 项需求明确标准检查。不明确时生成追问问题,禁止猜测执行。

Inputs: taskDescription (required).

init_promptsA

【初始化】扫描目标项目,自动生成原始 prompts 体系(context.md / workflow-log.md / recent-5.md / summary-10.md / todos.md / dev-rules.md / modules/)。已有文件不会覆盖。

Inputs: projectRoot.

log_dialogB

【记录日志】记录一次对话到传递链(daily + recent-5 + summary-10 + log-state.json)。

Inputs: title (required), request (required), changes, decisions, +1 more.

log_moduleA

【模块记录】按模块记录一次修改(目录式)。修改功能前先 read_module,修改后调用此工具。

Inputs: moduleName (required), change (required), files, decisions.

make_planA

【生成计划】在需求已澄清(check_requirements 全部 ✅)后,生成可行执行计划,等待用户确认。

Inputs: taskDescription (required).

read_moduleB

【读取模块记录】修改功能前调用,读取对应模块的历史修改记录。

Inputs: moduleName (required).

update_todosB

【更新待办】更新 todos.md 中的待办事项。

Inputs: action (required), todo (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: bootstrap for startup, check_requirements for requirement clarity, init_prompts for initializing prompt files, log_dialog and log_module for different logging scopes, make_plan for planning after requirements, read_module for reading module history, and update_todos for todo updates. No overlap.

    Naming Consistency5/5

    All tool names follow a consistent snake_case pattern with imperative verbs (bootstrap, check, init, log, make, read, update). No mixing of styles or ambiguous terms.

    Tool Count5/5

    With 8 tools, the set is well-scoped for a development workflow assistant. Each tool addresses a specific step in the workflow without being too few or too many.

    Completeness4/5

    The tools cover the core workflow: initialization, requirement clarification, logging (dialog and module), planning, and todo management. Missing explicit tools for viewing summaries or resetting, but the existing tools update these automatically, so gaps are minor.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Intelligently analyzes codebases to enhance LLM prompts with relevant context, featuring adaptive context management and task detection to produce higher quality AI responses.
      2
      MIT
    • F
      license
      A
      quality
      C
      maintenance
      Refines and improves AI prompts using workspace-aware context from your project's tech stack, structure, and dependencies. Includes tools to analyze prompt quality and generate well-structured prompts from raw ideas.
      4
      209 npm
      5
      -