Repository navigation
Servidor MCP @fiscalapi/docs-mcp y documentación para el desarrollador cliente #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f02ccc8
Eliminar el tablero de desarrollo de docs/ai-integracion
mendozagit cb1193c
docs-mcp: renombrar el servidor MCP a @fiscalapi/docs-mcp
mendozagit 2ac590e
Skills y comandos dirigidos al desarrollador cliente
mendozagit b5a6ed8
README y CONTRIBUTING para el desarrollador cliente
mendozagit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,14 @@ | ||
| { | ||
| "name": "fiscalapi", | ||
| "description": "Plugins de FiscalAPI para agentes de código.", | ||
| "owner": { "name": "FiscalAPI" }, | ||
| "owner": { | ||
| "name": "FiscalAPI" | ||
| }, | ||
| "plugins": [ | ||
| { | ||
| "name": "fiscalapi", | ||
| "source": "./", | ||
| "description": "Skills en español para integrar FiscalAPI (CFDI 4.0) en tu ERP, POS o SaaS." | ||
| "description": "Skills en español para integrar FiscalAPI (CFDI 4.0) en tu ERP, POS, SaaS o app." | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,20 @@ | ||
| { | ||
| "name": "fiscalapi", | ||
| "version": "0.1.0", | ||
| "description": "Skills en español para integrar FiscalAPI (CFDI 4.0) en tu ERP, POS o SaaS: primer timbre en pruebas, complementos, ciclo de vida de la factura y diagnóstico de errores del SAT.", | ||
| "author": { "name": "FiscalAPI" }, | ||
| "version": "0.2.0", | ||
| "description": "Skills en español para integrar FiscalAPI (CFDI 4.0) en tu ERP, POS, SaaS o app: primer timbre en el ambiente de pruebas, CFDI/Factura con complementos, ciclo de vida del CFDI y diagnóstico de errores de validación, rechazos del PAC y errores del servidor.", | ||
| "author": { | ||
| "name": "FiscalAPI" | ||
| }, | ||
| "homepage": "https://docs.fiscalapi.com", | ||
| "repository": "https://github.com/FiscalAPI/fiscalapi-ai", | ||
| "license": "MPL-2.0", | ||
| "keywords": ["fiscalapi", "cfdi", "sat", "facturacion-electronica", "mexico"] | ||
| "keywords": [ | ||
| "fiscalapi", | ||
| "cfdi", | ||
| "cfdi-4.0", | ||
| "factura", | ||
| "sat", | ||
| "facturacion-electronica", | ||
| "mexico" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,20 @@ | ||
| { | ||
| "name": "fiscalapi", | ||
| "version": "0.1.0", | ||
| "description": "Skills en español para integrar FiscalAPI (CFDI 4.0) en tu ERP, POS o SaaS: primer timbre en pruebas, complementos, ciclo de vida de la factura y diagnóstico de errores del SAT.", | ||
| "author": { "name": "FiscalAPI" }, | ||
| "version": "0.2.0", | ||
| "description": "Skills en español para integrar FiscalAPI (CFDI 4.0) en tu ERP, POS, SaaS o app: primer timbre en el ambiente de pruebas, CFDI/Factura con complementos, ciclo de vida del CFDI y diagnóstico de errores de validación, rechazos del PAC y errores del servidor.", | ||
| "author": { | ||
| "name": "FiscalAPI" | ||
| }, | ||
| "homepage": "https://docs.fiscalapi.com", | ||
| "repository": "https://github.com/FiscalAPI/fiscalapi-ai", | ||
| "license": "MPL-2.0", | ||
| "keywords": ["fiscalapi", "cfdi", "sat", "facturacion-electronica", "mexico"] | ||
| "keywords": [ | ||
| "fiscalapi", | ||
| "cfdi", | ||
| "cfdi-4.0", | ||
| "factura", | ||
| "sat", | ||
| "facturacion-electronica", | ||
| "mexico" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,9 @@ | ||
| name: Check | ||
|
|
||
| # En cada PR y cada lunes: las docs cambian aunque este repo no, y un enlace roto deja a una skill sin su fuente. | ||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
| schedule: | ||
| - cron: '0 14 * * 1' | ||
| workflow_dispatch: | ||
|
|
@@ -11,7 +12,8 @@ permissions: | |
| contents: read | ||
|
|
||
| jobs: | ||
| check: | ||
| plugin: | ||
| name: Plugin (skills, commands and manifests) | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
|
|
@@ -22,12 +24,46 @@ jobs: | |
| with: | ||
| node-version: 24 | ||
|
|
||
| - name: Frontmatter y enlaces de las skills | ||
| run: node scripts/check-skills.mjs | ||
| - name: Skill frontmatter and documentation links | ||
| run: node scripts/check-skills.mts | ||
|
|
||
| - name: Manifiestos de Claude Code, Codex y Copilot | ||
| - name: Claude Code, Codex and Copilot manifests | ||
| run: npx -y @anthropic-ai/[email protected] plugin validate . --strict | ||
|
|
||
| # Cursor no lee .claude-plugin: su manifiesto es una copia exacta del de Claude Code. | ||
| - name: Manifiesto de Cursor | ||
| - name: Cursor manifest matches the Claude Code manifest | ||
| run: cmp .claude-plugin/plugin.json .cursor-plugin/plugin.json | ||
|
|
||
| docs-mcp: | ||
| name: Docs MCP server | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: docs-mcp | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 | ||
|
|
||
| - name: Setup Node | ||
| uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 | ||
| with: | ||
| node-version: 24 | ||
| cache: npm | ||
| cache-dependency-path: docs-mcp/package-lock.json | ||
|
|
||
| - name: Install | ||
| run: npm ci | ||
|
|
||
| - name: Typecheck | ||
| run: npm run typecheck | ||
|
|
||
| - name: Build | ||
| run: npm run build | ||
|
|
||
| - name: Test | ||
| run: npm test | ||
|
|
||
| - name: Generate data from the public sources | ||
| run: npm run build:data | ||
|
|
||
| - name: Package contents | ||
| run: npm pack --dry-run | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # Contribuir | ||
|
|
||
| Gracias por mejorar fiscalapi-ai. Este documento explica cómo está organizado el repositorio y cómo validar un cambio antes de abrir un pull request. | ||
|
|
||
| ## Estructura | ||
|
|
||
| | Ruta | Contenido | | ||
| | --- | --- | | ||
| | `skills/` | Una carpeta por skill, con su `SKILL.md` y, si hace falta, `references/`. | | ||
| | `commands/` | Comandos del plugin, uno por archivo. | | ||
| | `.claude-plugin/`, `.cursor-plugin/` | Manifiestos del plugin y del marketplace. El de Cursor es una copia exacta del de Claude Code. | | ||
| | `docs-mcp/` | Servidor MCP `@fiscalapi/docs-mcp`. | | ||
| | `scripts/check-skills.mts` | Validación del frontmatter de las skills y de los enlaces a docs.fiscalapi.com. | | ||
|
|
||
| ## Requisitos | ||
|
|
||
| Node.js 22.18 o posterior. Los scripts están escritos en TypeScript y Node.js los ejecuta sin compilarlos. | ||
|
|
||
| ## Skills y comandos | ||
|
|
||
| - `name` es igual al nombre de la carpeta: minúsculas, dígitos y guiones. | ||
| - `description` va en una sola línea, en tercera persona, y dice qué hace la skill, cuándo usarla y cuándo no. | ||
| - `SKILL.md` tiene menos de 500 líneas. | ||
| - Las skills enlazan la documentación en lugar de copiarla. Usa la URL `.md` de la sección (`https://docs.fiscalapi.com/<página>/<sección>.md`). | ||
| - Las API keys siempre se leen de variables de entorno, y los ejemplos usan el ambiente de pruebas. | ||
|
|
||
| Valida los cambios con: | ||
|
|
||
| ``` | ||
| node scripts/check-skills.mts | ||
| ``` | ||
|
|
||
| ## Servidor MCP | ||
|
|
||
| ``` | ||
| cd docs-mcp | ||
| npm ci | ||
| npm run typecheck | ||
| npm run build | ||
| npm test | ||
| ``` | ||
|
|
||
| `npm run build:data` genera `data/` a partir de la especificación OpenAPI pública y de docs.fiscalapi.com. Las pruebas no usan la red: trabajan con los archivos de `test/fixtures/`. Para actualizar la copia de la documentación que usan las pruebas: | ||
|
|
||
| ``` | ||
| node scripts/snapshot-docs.ts https://docs.fiscalapi.com test/fixtures/docs-corpus.json.gz | ||
| ``` | ||
|
|
||
| Convenciones del código: | ||
|
|
||
| - TypeScript estricto, sin `any`, sin aserciones de tipo y sin comentarios. Si un fragmento necesita explicarse, se reescribe con nombres más claros. | ||
| - El código y los mensajes internos van en inglés. Los títulos, las descripciones y los resultados de las herramientas van en español, porque los lee el modelo. | ||
| - Cada herramienta es una clase que implementa `McpTool` en `src/tools/` y recibe sus dependencias por interfaces. | ||
|
|
||
| ## Pull requests | ||
|
|
||
| El workflow `Check` debe pasar: valida las skills, los manifiestos y el servidor MCP (typecheck, build, pruebas y contenido del paquete). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| node_modules/ | ||
| dist/ | ||
| data/ |
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win
Disable checkout credential persistence in the package job.
On pull requests,
npm ciand the package scripts run code from the checked-out revision.actions/[email protected]retains its token in Git configuration until job cleanup, so that code can read a token it does not need. Setpersist-credentials: falseon this checkout. (github.com)🧰 Tools
🪛 zizmor (1.30.1)
[warning] 43-44: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
🤖 Prompt for AI Agents
Source: Linters/SAST tools