Invoice Studio

io.github.vijaystPublished by GitHub account vijaystv1.0.0Updated Oct 24, 2026

Edit Markdown invoice templates, generate PDFs, and inspect preview PNGs.

Overview

AI-generated overview

Lets an assistant edit Markdown invoice templates, regenerate PDFs, and inspect preview PNGs in a local invoice project.

What you can do
Invoice Studio exposes tools to read and write invoice template and CSS files, run the project's generate build to produce a PDF and preview PNG, and return that preview for visual review. It also reports Git status, shows the workspace root the server is using, and can export templates, styles, and data into a cloned fork. Three headless pipelines are available: Markdown plus Handlebars, Handlebars plus Tailwind, and raw Markdown.
When to use it
Use it when you keep invoice templates in this repository and want an assistant to iterate on layout and wording, regenerate the PDF, and check the preview before committing. It is aimed at a local, desktop editing workflow rather than a hosted service.
Requirements
Runs locally over stdio as an npm package, typically via npx, or from a built dist/index.js with an absolute path in the client config. Requires Node.js, npm install and npm run build:mcp, and Chrome or Chromium for PDF and PNG rendering, optionally pointed to by the CHROME_PATH environment variable. The Tailwind pipeline needs network access to load the Tailwind CDN. No accounts, API keys, or headers are declared.
Before you install
Tools write template, CSS, and data files and run the generate build, so changes land in the project workspace and can overwrite existing files; review Git status before committing. The export tool copies files into a cloned fork. The Tailwind pipeline fetches styling from a third-party CDN, which exposes that request to an external host.

Installation

In SourceWeft

  1. Open Invoice Studio in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

Invoice Studio

Invoice templates with an MCP server for interactive editing (Claude Desktop / Cursor / Windsurf) and three headless generate pipelines for monthly PDF runs.

Agents: see AGENTS.md for the edit → generate → preview workflow. Registry → PDF → fork: USER-JOURNEY.md.

How it works

Phase 1 — Interactive studio: an AI client connects to the MCP server over stdio. You ask it to tweak the template or styles, regenerate, and inspect the preview PNG until the layout looks right.

Phase 2 — Monthly execution: pick one of the three generate commands below. The default pipeline updates src/data/invoice-input.json (or injects it from CI), then runs npm run generate to produce output/invoice.pdf and output/preview.png.

Markdown + Handlebars (npm run generate)

src/templates/invoice.md   ← Markdown template ({{placeholders}} for data)src/styles/invoice.css     ← Print stylessrc/data/invoice-input.json        │        ▼  npm run generateoutput/invoice.md          ← rendered markdownoutput/invoice.htmloutput/invoice.pdfoutput/preview.png         ← used by get_invoice_preview

Handlebars fills src/templates/invoice.md from src/data/invoice-input.json. Marked turns that Markdown into HTML, src/styles/invoice.css styles it, and headless Chrome writes the PDF and preview.

Handlebars + Tailwind CDN (npm run generate:hbs)

src/templates/invoice.hbs  ← HTML template ({{placeholders}} + Tailwind classes)src/data/invoice-input.json        │        ▼  npm run generate:hbsoutput/invoice-hbs.htmloutput/invoice-hbs.pdfoutput/preview-hbs.png

scripts/generate-invoice-hbs.js compiles src/templates/invoice.hbs with the same JSON. Styling is Tailwind utility classes in the template. The page loads Tailwind from https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4, so this command needs network access. The script does not compile a CSS file.

Raw Markdown (npm run generate:raw)

src/templates/invoice-raw.md  ← Markdown with invoice values written insrc/styles/invoice.css        │        ▼  npm run generate:rawoutput/invoice-raw.htmloutput/invoice-raw.pdfoutput/preview-raw.png

src/templates/invoice-raw.md contains the invoice text itself (dates, amounts, parties, line items). scripts/generate-invoice-raw.js converts that file with Marked and src/styles/invoice.css. This path does not read invoice-input.json and does not run Handlebars. Change the Markdown when the month’s values change.

Setup

bash
npm installnpm run build:mcp

Chrome or Chromium is required for PDF/PNG rendering. The generate script finds common install paths (macOS / Linux / Windows). If needed:

bash
export CHROME_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"

Generate an invoice (headless)

Markdown + Handlebars

  1. Edit monthly fields in src/data/invoice-input.json (amounts, dates, line items, etc.).
  2. Optionally adjust layout in src/templates/invoice.md or src/styles/invoice.css.
  3. Run npm run generate.

Handlebars + Tailwind

  1. Edit src/data/invoice-input.json for monthly values.
  2. Adjust layout with Tailwind classes in src/templates/invoice.hbs.
  3. Run npm run generate:hbs (requires network so Chrome can load the Tailwind CDN).

Raw Markdown

  1. Edit the values directly in src/templates/invoice-raw.md.
  2. Optionally adjust src/styles/invoice.css.
  3. Run npm run generate:raw.

Artifacts land in output/.

Use the MCP to edit and generate

1. Build and point your client at the server

bash
npm installnpm run build:mcp   # required — creates dist/index.js

Cursor (recommended): this repo includes .cursor/mcp.json. Open the project folder in Cursor, then reload MCP / the window. It uses ${workspaceFolder}/dist/index.js so the path is always the repo root.

If you configure MCP manually in Cursor Settings, use the absolute path to dist/index.js (relative dist/index.js alone resolves under your home directory and fails):

json
{  "mcpServers": {    "invoice-studio": {      "command": "node",      "args": ["/Users/YOU/Documents/invoice/dist/index.js"]    }  }}

Claude Desktop — in claude_desktop_config.json (absolute paths required):

json
{  "mcpServers": {    "invoice-studio": {      "command": "node",      "args": ["/Users/YOU/Documents/invoice/dist/index.js"]    }  }}

The server locates the repo from its own script path, so tools always read/write this project even if the client’s cwd is wrong.

Public MCP Registry

Registry name: io.github.vijayst/invoice-studio (npm: @vijayst/invoice-studio). After publish, search the official MCP Registry.

Clients that install from the registry typically run:

json
{  "mcpServers": {    "invoice-studio": {      "command": "npx",      "args": ["-y", "@vijayst/invoice-studio"]    }  }}

npx runs a copy of this repo (sample data included). You can generate output/invoice.pdf in that copy, then fork this repo and export the template into the clone.

Full walkthrough: USER-JOURNEY.md.

2. Interactive edit loop

Ask the model something like:

Read src/templates/invoice.md and tighten the payment section. Regenerate and show me the preview.

Typical tool sequence:

ToolPurpose
read_template_fileRead src/templates/invoice.md or src/styles/invoice.css
write_template_fileWrite updated template/CSS
run_generate_buildRuns npm run generate → PDF + output/preview.png
get_invoice_previewReturns the preview PNG for visual review
get_git_statusCheck what changed before committing
get_workspace_rootShow the npx or clone directory this server is using
export_studio_to_repoCopy template/CSS/data from this workspace into a cloned fork

Repeat edit → generate → preview until satisfied, then commit.

3. Scripts reference

ScriptCommand
Build MCPnpm run build:mcp
Start MCP (stdio)npm run start:mcp
Markdown + Handlebars PDFnpm run generate
Handlebars + Tailwind CDN PDFnpm run generate:hbs
Raw Markdown PDFnpm run generate:raw

Project layout

├── smithery.yaml├── package.json├── src/│   ├── templates/invoice.md│   ├── templates/invoice.hbs│   ├── templates/invoice-raw.md│   ├── styles/invoice.css│   ├── data/invoice-input.json│   └── mcp/index.ts├── scripts/generate-invoice.js├── scripts/generate-invoice-hbs.js├── scripts/generate-invoice-raw.js└── output/preview.png

Source: README.md at commit 886f902

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v1.0.0LatestSep 21, 2026

Score

40% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.