Skip to main content
Glama
egitiaec

MCP Spec Generator

by egitiaec

MCP Spec Generator

Servidor MCP que convierte documentos de Historias de Usuario a archivos .md con el formato SPEC_KIT_TEMPLATE del workspace de alfred-egit.

¿Para qué sirve?

Automatiza el proceso de documentación técnica: tomas cualquier texto con Historias de Usuario (HUs) — ya sea copiado de Notion, un Google Doc, un correo, un PDF o escrito a mano — y el servidor lo transforma en un archivo spec.md estructurado y listo para el equipo de desarrollo.

El archivo generado sigue el formato estándar del proyecto:

workspace/specs/007-nombre-feature/
├── HU-023-nombre-feature-SPEC.md   ← documento generado
└── tasks/
    └── tasks.md                    ← placeholder de tareas

El nombre del archivo toma el identificador de la HU directamente del documento cargado y le agrega el sufijo -SPEC.md. Por ejemplo:

HU cargada

Archivo generado

HU-016 Conexión WhatsApp

HU-016-conexion-whatsapp-SPEC.md

HU-023 Gestión de Pedidos

HU-023-gestion-de-pedidos-SPEC.md

US-005 Login con Google

US-005-login-con-google-SPEC.md

Related MCP server: wassden

Requisitos

  • Node.js 22+

  • Claude Code CLI

  • ANTHROPIC_API_KEY en tu entorno

Instalación

cd ~/mcp-spec-generator
npm install

El servidor ya está registrado en ~/.claude/settings.json. Se activa automáticamente al iniciar Claude Code.

Inputs soportados

El MCP acepta documentos de HU en cualquiera de estas formas:

Archivos

Formato

Extensión

Cómo entregarlo

Word

.docx

Ruta absoluta al archivo

PDF

.pdf

Ruta absoluta al archivo

Markdown

.md

Ruta absoluta al archivo

Texto plano

.txt

Ruta absoluta al archivo

Ejemplo en Claude Code:

"Genera la spec desde este archivo: /Users/openclaw/Desktop/HU-023-pedidos.docx"

Texto directo

Pega el contenido del documento directamente en el chat. Funciona con texto copiado desde:

  • Notion

  • Google Docs

  • Confluence

  • Correo electrónico

  • Cualquier fuente de texto

Ejemplo en Claude Code:

"Convierte esta HU en spec: [pegar texto aquí]"


Herramientas disponibles

generate_spec

Convierte un documento de Historia de Usuario en un {HU-name}-SPEC.md y lo guarda en workspace/specs/.

Parámetro

Requerido

Descripción

file_path

Uno de los dos

Ruta absoluta a un archivo .docx, .pdf, .md o .txt

user_story_text

Uno de los dos

Texto plano del documento de HU

hu_name

No

Nombre de la HU para el archivo (ej. HU-016-whatsapp). Si se omite, se extrae automáticamente

feature_slug

No

Slug del nombre de la carpeta (ej. pagos-online). Si se omite, se usa el mismo que hu_name

spec_number

No

Número de 3 dígitos (ej. 007). Si se omite, usa el siguiente disponible

Usa file_path o user_story_text, no ambos.

Formatos de archivo soportados:

Formato

Extensión

Word

.docx

PDF

.pdf

Markdown

.md

Texto plano

.txt

Prioridad para el nombre del archivo de salida:

  1. Valor explícito de hu_name

  2. Identificador extraído del texto (HU-XXX, US-XXX)

  3. Título del documento generado por Claude como fallback

Ejemplos de uso en Claude Code:

"Genera la spec desde este archivo: /Desktop/HU-023-pedidos.docx"

"Convierte esta Historia de Usuario en una spec: [pegar texto]"

Claude llamará generate_spec automáticamente y guardará el archivo.


list_specs

Lista todas las specs existentes en workspace/specs/ con su estado.

Ejemplo:

- 001-api-gateway (spec.md: ✅)
- 004-whatsapp (spec.md: ✅)
- 007-pagos-online (spec.md: ✅)

get_spec_template

Devuelve el contenido del SPEC_KIT_TEMPLATE vigente. Útil para consultar la estructura sin abrir archivos.


read_spec

Lee el contenido de una spec existente.

Parámetro

Requerido

Descripción

folder

Nombre de la carpeta (ej. 004-whatsapp)

Formato de salida (SPEC_KIT_TEMPLATE)

Cada spec generada incluye estas secciones:

  1. Contexto de Negocio — problema u oportunidad que motiva el requerimiento

  2. Actores del Sistema — usuarios, sistemas y servicios involucrados

  3. Flujos Principales — pasos del proceso con diagramas cuando aplica

  4. Integraciones — APIs y sistemas externos

  5. Criterios de Aceptación — checklist con - [ ] para cada condición

  6. Estimación de Complejidad — Baja / Media / Alta con justificación

  7. Observaciones Adicionales — notas, restricciones y aclaraciones

Configuración

El servidor lee la variable de entorno SPECS_DIR para saber dónde guardar las specs:

// ~/.claude/settings.json
{
  "mcpServers": {
    "spec-generator": {
      "command": "node",
      "args": ["/Users/openclaw/mcp-spec-generator/index.js"],
      "env": {
        "SPECS_DIR": "/Users/openclaw/alfred-egit/workspace/specs"
      }
    }
  }
}

Para apuntar a otro workspace, cambia SPECS_DIR en ese archivo.

Flujo típico de trabajo

1. Product Owner entrega documento de HUs
   (.docx / .pdf / texto en Notion / correo / etc.)
         ↓
2. En Claude Code, según el formato:

   Archivo:      "Genera la spec desde: /Desktop/HU-023.docx"
   Texto directo: "Convierte esta HU en spec: [pegar texto]"
         ↓
3. El MCP extrae el texto del documento (si es archivo)
   y llama a Claude API para estructurar el contenido
         ↓
4. Se crea: workspace/specs/NNN-feature/HU-023-SPEC.md
           workspace/specs/NNN-feature/tasks/tasks.md
         ↓
5. Revisar, ajustar y aprobar en equipo
         ↓
6. Completar tasks/tasks.md con tareas de implementación

Available Tools

4 tools
generate_specA

Converts a User Story document into a SPEC_KIT formatted .md file named {hu-name}-SPEC.md and saves it to workspace/specs/. Returns the file path.

ParametersJSON Schema
NameRequiredDescriptionDefault
hu_nameNoName of the HU/US used for the file name (e.g. 'HU-016-whatsapp'). If omitted, it is extracted from the document content.
file_pathNoAbsolute path to a .docx, .pdf, .md or .txt file containing the User Story. Use this OR user_story_text, not both.
spec_numberNo3-digit spec number (e.g. '007'). If omitted, the next available number is used.
feature_slugNoShort slug for the feature folder name (e.g. 'pagos-online'). If omitted, it is inferred from the content.
user_story_textYesPlain text content of the User Story document. Use this OR file_path.

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does disclose key traits: it writes a file to workspace/specs/, follows a naming convention, and returns the path. It does not mention authentication needs, rate limits, or overwrite behavior (what happens if a file with the same name exists), leaving a residual gap.

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 the core conversion behavior and then the side effect/return. Every clause earns its place with no repetition of the schema's field descriptions.

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 5-parameter file-generating tool with no output schema, the description covers purpose, destination, naming, and return value. It stops short of explaining overwrite behavior and permission requirements, but the core contract an agent needs is present.

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 100%, so the schema already explains all five parameters, including that file_path and user_story_text are alternatives. The description adds the {hu-name}-SPEC.md naming convention, which reinforces the hu_name semantics, but otherwise does not extend parameter meaning beyond the schema. Baseline 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 specifies a concrete verb (converts), a source artifact (User Story document), a target format (SPEC_KIT formatted .md file), a naming convention ({hu-name}-SPEC.md), a destination (workspace/specs/), and a return value. This clearly distinguishes it from read_spec, list_specs, and get_spec_template, which read or list rather than generate.

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 it (when you have a User Story document to convert into a spec), but it never states when not to use it or how it differs from siblings such as get_spec_template. An agent could reasonably infer the context, but routing among get_spec_template, list_specs, and read_spec remains undocumented.

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

get_spec_templateB

Returns the SPEC_KIT_TEMPLATE used in the alfred-egit workspace

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3/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 burden of behavioral disclosure. It implies a read-only fetch of a fixed constant but never states that it is read-only, non-destructive, or whether the template is static or workspace-dependent; nothing about the return shape is given.

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 compact sentence with no filler, front-loading the verb and the returned artifact. It is efficiently stated, though arguably too terse to be fully self-sufficient.

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?

With no output schema covering the return value, the description should describe what the returned template looks like or how it is consumed, and it does not. For a zero-param, zero-annotation tool on a shared template concept, an agent is left guessing at format and purpose.

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?

The tool takes zero parameters, so the baseline is 4 and there is nothing for the description to clarify. No parameter meaning is missing.

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 verb ("Returns") and a clearly named resource (the SPEC_KIT_TEMPLATE), so an agent can tell this apart from list_specs/read_spec at a glance. It adds the workspace scope (alfred-egit), but does not explicitly contrast itself against the sibling tools.

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?

There is no statement of when to use this tool versus read_spec or generate_spec, and no prerequisites or exclusions. The agent must infer that this fetches a static template rather than a user spec.

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

list_specsB

Lists existing spec folders in the alfred-egit workspace/specs directory

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It implies a read-only directory listing, but says nothing about permissions, whether the listing recurses, ordering, or what happens when the directory is empty or missing.

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?

A single front-loaded sentence with the verb first and the scope appended; every word earns its place with no padding.

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 zero-parameter, no-annotation, no-output-schema tool the description is minimally viable, but it leaves the return content (folder names? paths? spec files inside?) unstated, which is the main thing an agent needs to chain into read_spec.

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?

The tool takes zero parameters, so per the rubric the baseline is 4. The description correctly adds no parameter noise, though it also gives no clue about the output shape an agent might filter on client-side.

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 gives a specific verb (Lists) and resource (spec folders) and scopes it to the workspace/specs directory, which is enough to distinguish it from read_spec and generate_spec. It stops short of explicitly contrasting itself with those siblings, which would be needed for a 5.

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?

There is no statement of when to call this versus the siblings — e.g. 'call this first to discover available specs before read_spec'. Usage is only loosely inferable, and no exclusions or prerequisites are given.

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

read_specB

Reads the content of an existing spec file (*-SPEC.md) inside a spec folder

ParametersJSON Schema
NameRequiredDescriptionDefault
folderYesSpec folder name (e.g. '004-whatsapp')

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 full burden, and 'Reads' only implicitly conveys a non-destructive operation. It discloses nothing about error behavior for a missing folder, nor about pagination or return shape, which leaves real gaps for a tool with zero annotation coverage.

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?

A single front-loaded sentence with zero filler that puts the verb and resource first and the file constraint second. Nothing is wasted.

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 one-parameter read tool with no output schema and no annotations, the definition is adequate but thin: it does not state what the read returns, how a missing spec is signaled, or which sibling to prefer. An agent can call it, but not confidently.

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 single 'folder' parameter is already documented with an example, so the baseline is 4. The description reinforces that the folder argument scopes to a spec folder, adding marginal meaning over the schema.

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 verb ('Reads') plus the resource ('content of an existing spec file') and constrains it with the file pattern (*-SPEC.md) and location (spec folder). It is distinct from sibling list_specs and generate_spec, though it never names them explicitly.

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?

There is no guidance on when to use this versus the siblings (list_specs, get_spec_template, generate_spec) or on what happens if the spec does not exist. The word 'existing' faintly implies a prerequisite, but nothing is spelled out.

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. 4 tool updatesv1.0.0
    • First observedgenerate_spec
    • First observedget_spec_template
    • First observedlist_specs
    • First observedread_spec

TDQS

A3.5/5.0

Scored across 4 tools

Disambiguation5/5

Each tool performs a distinct operation: retrieval of template, listing specs, reading a spec, and generating a spec. Their purposes are clear and non-overlapping, making selection straightforward.

Naming Consistency5/5

All tools follow a consistent snake_case naming pattern with verb_noun structure (get_spec_template, list_specs, read_spec, generate_spec). This predictability aids tool selection.

Tool Count4/5

Four tools are appropriate for the narrow scope of spec template management and generation. It is slightly thin but covers essential operations without redundancy.

Completeness3/5

The surface covers listing, reading, getting a template, and generating specs, but lacks update or delete operations for specs. Users cannot manage spec lifecycle completely, which may cause workarounds.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    B
    quality
    C
    maintenance
    Reads README files from the file system and automatically generates structured Product Requirements Documents (PRDs), saving users time on documentation tasks.
    1
    9
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Spec-Driven Development toolkit that transforms LLMs into development agents by providing expert-crafted prompts for generating structured specifications and validating documents across the Requirements → Design → Tasks → Code workflow.
    1
    MIT
  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables automated project analysis and structured development specification generation. Supports multiple export formats and integrates with AI models for comprehensive project documentation and validation.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Implements GitHub's Spec-Driven Development methodology, transforming natural language requirements into executable specifications, technical plans, and ordered task lists with contract-based validation and progress tracking.
    8 npm
    2
    MIT