docforge
DocForge
Agent-grade document production MCP server powered by Typst, plus Forge — a Slack agent for document workflows.
Quick install (MCP)
Requires Node 20+ and Typst 0.14.2+ on PATH (brew install typst / other platforms).
{
"mcpServers": {
"docforge": {
"command": "npx",
"args": ["-y", "@precisionutilityguild/docforge"],
"env": {
"DOCFORGE_DATA_ROOT": "/absolute/path/for/your/documents"
}
}
}
}Set DOCFORGE_DATA_ROOT when installing via npx — the default stores documents inside the installed package directory, which under npx lives in a cache that can be pruned.
Doc | Purpose |
DocForge engine specification | |
Forge product spec (workflows, architecture, guardrails) | |
Security / correctness / deploy audit + resolution log |
Related MCP server: JSONShelf
Requirements
Node.js 20+
Typst 0.14.2+ (pinned —
typst --versionmust be ≥TYPST_VERSION_PINinsrc/config.ts)
Setup
npm install
npm run build
npm run check:typst # verify Typst pin (0.14.2)
npm run check:packages # verify vendored offline @preview packages
npm run lint # eslint
npm test # unit/integration tests
npm run release:qa # full local release gate
npm run test:visual # golden PNG regression (24 templates)Run Forge (Slack agent)
Requires Slack CLI and a workspace.
cp .env.sample .env # fill SLACK_BOT_TOKEN + SLACK_APP_TOKEN
npm run slack # or: slack runIn Slack: @forge help lists Draft PDF plus the four curated document workflows (proposal, incident, board pack, status). Socket mode is default when SLACK_APP_TOKEN is set; HTTP mode uses SLACK_SIGNING_SECRET + PORT (includes GET /health).
Socket-mode manifest (local dev):
slack/manifest.jsonHTTP-mode manifest (deploy):
slack/manifest.http.json
The Slack agent drives DocForge over MCP, not in-process: producePdf spawns the
MCP server (dist/index.js) as a stdio child and calls docforge_* tools
(src/forge/mcp-client.ts). Set FORGE_MCP=off to force the in-process fallback.
Deploy (HTTP)
docker build -t forge .
docker run -p 3000:3000 \
-e SLACK_SOCKET_MODE=false \
-e SLACK_BOT_TOKEN \
-e SLACK_SIGNING_SECRET \
forgeThe image ships Node 22, pinned Typst 0.14.2, the build, dist/index.js (the MCP
child), and vendor/typst-packages/ so compiles work with no network access.
Run MCP server (stdio)
npm startCursor / MCP config example
{
"mcpServers": {
"docforge": {
"command": "node",
"args": ["/absolute/path/to/typstmcp/dist/index.js"],
"env": {
"DOCFORGE_DATA_ROOT": "/absolute/path/to/typstmcp/.data/documents"
}
}
}
}MCP tools (core workflow)
Tool | Purpose |
| Pick a template |
| JSON Schema + README + sample |
| Create document handle (24h idle TTL) |
| PDF + PNG previews (synchronous) |
| Same, via MCP Tasks (large docs) |
| Deterministic data fixes |
| Quality gate before export |
| Base64 PNG previews for visual QA |
| Layout heuristics beyond lint |
| Final artifacts |
| Cleanup |
Wave 6–7 also expose versioning, template upgrade, marketplace, custom template registration, brand extraction, and scaffold generation. See .cursor/skills/docforge/SKILL.md.
MCP resources
docforge://templates— built-in + marketplace catalogdocforge://marketplace— community templates onlydocforge://templates/{id}/readme— agent READMEdocforge://templates/{id}/sample— sample JSON
Template catalog (24)
Built-in (21): technical_note, executive_memo, sales_proposal, research_report, incident_report, kpi_report, monthly_metrics, survey_report, financial_snapshot, postmortem, project_status, decision_record, meeting_brief, invoice, contract_summary, cv, client_intake, risk_assessment, cohort_analysis, board_one_pager, compliance_memo
Marketplace (3): startup_pitch, nonprofit_report, tech_rfc
Forge Slack commands
@forge draft ...— infer a safe DocForge template from pasted notes or thread context, then generate a reviewed PDF@forge proposal for Northstar— sales proposal from discovery context + user-supplied pricing@forge incident report from #incident-api-gateway— incident report from Slack timeline@forge board pack for Q3 operating review— KPI board pack from CSV@forge status for #team-eng— weekly RAG status report from a channel's activity (workstreams, blockers, next steps — grounded, not invented)
PDF compliance options
options.pdf_standard: "ua-1"— PDF/UA accessibility export (defaultaccessibility: true)options.pdf_standard: "a-2a"— PDF/A archival (accessibility: falserequired; mutually exclusive with UA)
Environment variables
Variable | Default | Purpose |
|
| Document workspaces + custom templates |
|
| Typst CLI binary |
|
| Offline Typst package source |
| — | Typst package cache override |
|
| Compile timeout |
|
| Idle document handle TTL (24h) |
| — | Extra allowed dirs for custom template sources |
|
| Max document JSON payload |
|
| Max Slack CSV attachment |
|
| Max uploaded/brand asset |
|
| Set |
|
| Override MCP child entry |
|
| Set |
|
| Visual-regression diff threshold |
|
| Script-level Typst pin override |
| see | Local Slack poll/seed utility controls |
CI
GitHub Actions runs: checksum-verified Typst install → npm audit → Typst pin check →
template sync check → vendored-package check → lint + script syntax check → format
check → build → unit/integration tests → Forge smoke → visual regression → package
contents dry-run → Docker build. Golden drift fails CI; update with
npm run compile:golden.
For the full local release gate, run npm run release:qa. It executes the
offline CI-critical checks, verifies Slack manifest scopes/events, confirms the
npm package carries Slack setup/deploy assets, and scans tracked files for common
secret token patterns.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/PrecisionUtilityGuild/docforge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server