Skip to main content
Glama

mcp-forge

An MCP stdio server that serves the mcp-forge prompt library — a deterministic, enterprise-grade system for creating new, or rewriting existing, Node.js projects (including MCP servers) to production-quality TypeScript.

Connect this server to any MCP client and call its tools to retrieve the exact prompts needed to rewrite a project step by step. The same source code always produces the same output — deterministic by design. Rewrite an existing project step by step, or generate a brand-new MCP server from an API spec with Create mode.

Supported project types: http-api · library · cli · worker · mcp-server

Tools

Tool

Description

list_steps

List all 15 rewrite steps. Pass projectType to see which steps apply or are skipped.

get_step

Get the full prompt for a specific step (0–14). Step 8 requires projectType.

get_entrypoint

Get the Step 8 entrypoint prompt for a given project type.

get_master_prompt

Get the single-pass master prompt for small projects (< 2 000 lines).

get_create_prompt

Generate a new MCP server from an OpenAPI doc or BUILD_SPEC.

validate_manifest

Validate an AUDIT_MANIFEST JSON string produced by Step 0.

Related MCP server: PromptArchitect MCP

Setup

git clone <repo-url>
cd mcp-forge
npm install
npm run setup

npm run setup builds the project and automatically:

  1. Registers the MCP server in Claude Desktop

  2. Registers the MCP server in Claude Code (~/.claude.json)

  3. Installs /forge-* slash commands globally to ~/.claude/commands/

Restart Claude Desktop after running setup. Claude Code picks up changes automatically.

Manual setup (Cursor or other MCP clients)

Add this to your client's MCP config:

{
  "mcpServers": {
    "mcp-forge": {
      "command": "node",
      "args": ["/absolute/path/to/repo/dist/stdio.js"]
    }
  }
}

Build first if you haven't already: npm run build

PROMPTS_DIR defaults to .claude/commands inside the repo — no environment variable needed.

Slash commands in Claude Code

After npm run setup, the following commands are available globally in any project — no per-project setup required:

Command

Description

/forge-audit

Audit the codebase and emit an AUDIT_MANIFEST. Always start here.

/forge-create

Create a brand-new MCP server from an OpenAPI doc or BUILD_SPEC (no existing project needed).

/forge-plan [projectType]

List which steps apply to this project type. Run after audit.

/forge-step <n> [projectType]

Apply a specific step. Example: /forge-step 3 or /forge-step 8 mcp-server

/forge-rewrite

Single-pass full rewrite for small projects (< 2 000 lines).

Typical workflow:

/forge-audit
/forge-plan
/forge-step 1
/forge-step 2
... (continue through the steps)
/forge-step 8 mcp-server
/forge-step 9
... through /forge-step 14

Or — create a new MCP server from scratch:

/forge-create

Supply an OpenAPI document or fill in the BUILD_SPEC when prompted; mcp-forge generates the whole server (steps 1–14 + the mcp-server entrypoint).

Using the MCP tools directly

Incremental rewrite (large projects, recommended):

  1. get_step({ step: 0 }) → run the audit prompt, receive an AUDIT_MANIFEST JSON

  2. validate_manifest({ manifestJson: "..." }) → confirm it's valid

  3. list_steps({ projectType: "mcp-server" }) → see which steps apply

  4. get_step({ step: 1 })get_step({ step: 7 }) → scaffold in order

  5. get_entrypoint({ projectType: "mcp-server" }) → entrypoint layer (Step 8)

  6. get_step({ step: 9 })get_step({ step: 14 }) → testing, security, CI, docs

Single-pass rewrite (small projects, < 2 000 lines):

  1. get_master_prompt() → paste your entire project source into context with the returned prompt

Creating a new MCP server from an API spec:

  1. get_create_prompt() → returns the Create-mode prompt

  2. Supply an OpenAPI document (openapi.json / openapi.yaml) or fill in the BUILD_SPEC template from the prompt

  3. The prompt emits an AUDIT_MANIFEST with projectType: "mcp-server" and a populated mcpTools array

  4. validate_manifest({ manifestJson: "..." }) → confirm it is valid

  5. Continue with steps 1–14 and get_entrypoint({ projectType: "mcp-server" }) exactly as for a rewrite — all downstream steps are unchanged

Environment variables

Variable

Default

Description

PROMPTS_DIR

.claude/commands (relative to the binary)

Override the prompts directory location

NODE_ENV

development

Environment

LOG_LEVEL

info

pino log level

Development

npm run dev          # tsx watch mode
npm test             # run all tests (25 unit + integration)
npm run typecheck    # TypeScript check
npm run lint         # ESLint
npm run build        # compile to dist/

Prompt library layout

.claude/commands/
  shared/          Steps 00–07, 09–14 (all project types, conditional sections)
  entrypoints/     Step 08 — one file per project type
  masters/         MASTER.md — universal single-pass prompt

License

MIT

Available Tools

5 tools
get_entrypointB

Get the entrypoint-specific instructions (Step 8) for a given project type (http-api, library, cli, worker, mcp-server).

ParametersJSON Schema
NameRequiredDescriptionDefault
projectTypeYesThe project type to get entrypoint instructions for.

TDQS

B3.1/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 full burden. It indicates a read operation ('Get') but does not disclose potential side effects, permissions needed, error handling for invalid project types (though schema enforces enum), or return format. The description is minimally transparent.

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

Conciseness5/5

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

The description is a single, clear sentence that immediately conveys the tool's purpose. No unnecessary words or repetition. It is front-loaded with the verb and resource.

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?

Given the tool's simplicity (1 parameter, no output schema, no annotations), the description is adequate but lacks details about the return type or format of the instructions. Mentioning that it returns a string or steps would improve completeness. The mention of 'Step 8' provides some context but could be expanded.

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?

The input schema has 100% coverage with a description for the single parameter. The description adds listing the enum values again, but does not provide deeper meaning about the parameter (e.g., format, expected use). Baseline of 3 is appropriate since schema already documents the parameter adequately.

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 clearly states the verb 'Get' and the resource 'entrypoint-specific instructions (Step 8)', and specifies the scope 'for a given project type'. It distinguishes the tool from siblings like get_step by naming the specific step, but could be more explicit about how it differs from get_step or get_master_prompt.

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 implies when to use (need step 8 instructions for a project type) but provides no guidance on when not to use it or which alternatives (e.g., get_step, list_steps) might be more appropriate. No explicit when-to-use or when-to-avoid context.

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

get_master_promptA

Get the complete master prompt for single-pass rewrites of small projects (< 2000 lines). Handles all project types automatically.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description bears full burden. It discloses the input constraint (project size <2000 lines) and automatic handling, but does not detail side effects (though 'get' implies read-only), return format, or edge cases. Additional context like no parameters required is left to schema.

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

Conciseness5/5

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

Two sentences, front-loaded with verb and resource. No unnecessary words. Efficient and to the point.

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

Completeness4/5

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

For a zero-parameter tool with no output schema, the description covers the core functionality and a key constraint. It does not specify return type or behavior if project exceeds limit, but is reasonably complete for its simplicity.

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

Parameters4/5

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

Tool has 0 parameters, so baseline is 4. Description does not need to add parameter meaning since there are none. Schema coverage is 100% trivially, but description adds no parameter info—which is fine.

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

Purpose5/5

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

The description clearly states the verb 'Get', the resource 'master prompt', and specifies the context 'single-pass rewrites of small projects (<2000 lines)'. It distinguishes from sibling tools by focusing on a different resource (master prompt vs entrypoint/step/list/validate).

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?

The description implies when to use (when needing master prompt for small project rewrites) but does not explicitly state when not to use or mention alternatives among sibling tools. No exclusion criteria or usage guidance beyond the purpose.

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

get_stepA

Get the full prompt content for a specific step (0–14). For step 8 (Entrypoint Layer), you must provide projectType.

ParametersJSON Schema
NameRequiredDescriptionDefault
stepYesStep number (0–14). Step 8 requires projectType.
projectTypeNoRequired for step 8 to select the correct entrypoint file.

TDQS

A3.9/5.0
Behavior3/5

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

Annotations are absent, so description must carry burden. It discloses the constraint that step 8 requires projectType, which is behavioral. However, it does not mention side effects, permissions, rate limits, or what happens on invalid step numbers (schema handles validation). Lacks detail beyond the basic action.

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

Conciseness5/5

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

Two sentences, no redundancy, front-loaded with action and scope. Every word contributes to understanding.

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 simple 2-param tool with no output schema, the description covers the core purpose and a critical edge case. But it does not describe the return format (e.g., string, object), nor does it provide guidance on when to use this vs sibling tools like get_entrypoint or list_steps. Completeness is adequate but not excellent.

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 100%, so baseline is 3. Description adds context that projectType is needed for step 8's entrypoint layer, which explains the purpose beyond schema's description. However, it does not explain the meaning of the step parameter beyond its range, which is already in schema.

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

Purpose5/5

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

Description clearly states 'Get the full prompt content for a specific step' with verb 'get' and resource 'full prompt content'. It distinguishes from siblings like get_entrypoint and get_master_prompt by targeting a single step's content. The mention of step range 0–14 and special case for step 8 adds specificity.

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

Usage Guidelines4/5

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

Provides clear context for when to provide projectType (step 8 required). However, it does not explicitly contrast with sibling tools like get_entrypoint or list_steps, nor does it state when not to use this tool. The guidance for step 8 is helpful but incomplete for full context.

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

list_stepsA

List all rewrite steps (0–14) in order. Optionally filter by projectType to see which steps apply or are skipped.

ParametersJSON Schema
NameRequiredDescriptionDefault
projectTypeNoWhen provided, marks each step as applicable or skipped for that project type.

TDQS

A3.6/5.0
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits such as read-only nature, pagination, or what happens when there are no steps. Although it's a listing tool, the lack of explicit behavioral context reduces transparency.

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

Conciseness5/5

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

The description is a single, front-loaded sentence with no wasted words. It efficiently conveys the action, resource, and optional filtering capability.

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

Completeness4/5

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

For a simple listing tool with one optional parameter and no output schema, the description is mostly complete. It specifies the range of steps and the filtering effect. However, it could mention the return format (e.g., list of step names with status) for full clarity.

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 100% with a clear enum and description for 'projectType'. The function description adds 'optionally filter' and 'see which steps apply or are skipped', which mirrors the schema description, so it adds minimal new meaning. Baseline score of 3 is appropriate.

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

Purpose5/5

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

The description clearly states it lists all rewrite steps (0–14) in order, specifying the verb 'list' and resource 'steps'. It distinguishes itself from siblings like 'get_step' (single step) and 'get_master_prompt' (different resource) by its scope.

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?

The description implies usage for an overview of steps or filtered by project type, but does not explicitly state when to use this tool versus alternatives like 'get_step' or 'get_master_prompt'. No exclusions or when-not-to-use guidance is provided.

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

validate_manifestA

Validate an AUDIT_MANIFEST JSON string against the expected schema (produced by Step 0). Returns a list of validation errors, or confirms the manifest is valid.

ParametersJSON Schema
NameRequiredDescriptionDefault
manifestJsonYesThe AUDIT_MANIFEST as a JSON string produced by Step 0.

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description fully carries the transparency burden. It explains the tool validates against a schema and returns a list of errors or confirmation. However, it does not disclose details about the expected schema, potential side effects, or authorization needs. The behavioral traits are adequately communicated for a simple read-only validation.

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

Conciseness5/5

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

The description is a single, well-structured sentence. It front-loads the primary action ('Validate an AUDIT_MANIFEST JSON string against the expected schema') and concisely states the return value. No unnecessary words.

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

Completeness4/5

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

For a simple validation tool with one parameter and no output schema, the description is sufficiently complete. It specifies the input, the validation action, and the return type (list of errors or valid confirmation). Could mention error details, but not essential.

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

Parameters4/5

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

Schema coverage is 100%, and the schema description for 'manifestJson' already explains the input. The tool description adds workflow context ('produced by Step 0') and clarifies the validation purpose, going beyond the raw schema.

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

Purpose5/5

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

The description clearly states the verb 'Validate' and the resource 'AUDIT_MANIFEST JSON string against the expected schema (produced by Step 0)'. It distinguishes itself from sibling tools (get_*, list_steps) by focusing on validation rather than retrieval.

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?

The description implies usage after 'Step 0' by noting the manifest is produced there, but does not explicitly state when to use or not use alternatives. No exclusions or when-not-to-use guidance is provided.

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

TDQS

A4/5.0
Disambiguation5/5

Each tool serves a distinct purpose: retrieving specific prompts (entrypoint, master, or step), listing steps, or validating manifests. No ambiguity in their roles.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (e.g., get_entrypoint, list_steps, validate_manifest), ensuring predictability.

Tool Count5/5

With 5 tools, the server is well-scoped for its domain of prompt management and validation, neither too sparse nor too heavy.

Completeness5/5

The tool set covers retrieval of all prompt variations, step listing, and manifest validation, leaving no obvious gaps for the intended use case.

Maintenance

ActivityStale
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Flagler-County-BoCC/mcp-forge'

If you have feedback or need assistance with the MCP directory API, please join our Discord server