Invoice MCPのロゴ

Invoice MCP

コミュニティ
markslorach

Model Context Protocol server for creating professional PDF invoices using natural language.

公開者markslorach
リポジトリinvoice-mcp
言語TypeScript
フォーク
7
スター
11
利用可能なツール
0
通信方式stdio
カテゴリ
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    Invoice MCPは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには11件のスターと7件のフォークがあります。

invoice-mcp

Invoice MCP

A Model Context Protocol server for creating professional PDF invoices using natural language.

Getting Started

Prerequisites

  • Node v18 +

1. Installation

bash
git clone https://github.com/markslorach/invoice-mcp.git
cd invoice-mcp/server
npm install
npm run build

2. Configuring Claude Desktop

Add the following json to your Claude Desktop config file -

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

This can be accessed in Claude Desktop settings in the Developer tab.

json
{
  "mcpServers": {
    "Invoice MCP Server": {
      "command": "node",
      "args": ["/path/to/your/invoice-mcp/server/build/index.js"]
    }
  }
}

Example path -

json
{
  "mcpServers": {
    "Invoice MCP Server": {
      "command": "node",
      "args": ["/Users/markslorach/Desktop/invoice-mcp/server/build/index.js"]
    }
  }
}

Make sure to restart Claude Desktop for the MCP server to show in chat tools.

Usage

Prompt Examples

You can be brief -

text
Create an invoice to Mike Smith for web development work

Or detailed -

text
Create an invoice to Mike Smith for:
- Logo design (5 hours @ £75/hour)
- Website updates (3 hours @ £60/hour)
- Due in 14 days

123 Business Street, London, SW1A 1AA
mike@business.com

By using the instructions below, you'll be prompted to confirm or add any missing details. You can then confirm and create the invoice without all customer details if needed.

Demo

invoice-mcp-demo

Logo Requirements

A logo is optional - if provided, it must be a direct URL to a JPG, PNG or WebP image file. The URL should end with the file extension (.jpg, .png) and link directly to the image, not a webpage. SVG files are not supported.

I recommend using an image with no padding around the logo for best results.

✅ Good: https://example.com/logo.png ❌ Bad: https://example.com/logo-page or https://example.com/logo.svg

Prompt Instructions

For consistent invoice generation, I recommend filling in and adding these instructions to a Claude Desktop project. If using another platform without project support - you can paste these instructions at the start of your conversation before creating an invoice.

markdown
# Invoice MCP Project Instructions

## Pre-filled Business Information

### Logo

[Your logo URL here]

### Sender Details:

**Name:** [Your Business Name]  
**Address:** [Your Business Address]  
**Email:** [Your Business Email]

### Payment Information:

**Account Name:** [Your Account Name]  
**Account Number:** [Your Account Number]  
**Sort Code:** [Your Sort Code]

### Default Terms:

- Payment due within 30 days of invoice date
- **VAT Rate:** 0% (no VAT unless explicitly requested)
- **Currency:** GBP (supported currencies: GBP, USD, CAD, EUR)

### Default Notes:

"Thank you for your business."

## Processing Rules

### Confirmation Required

**ALWAYS** ask the user to confirm all invoice details before running the MCP tool and exporting the PDF - even for mock/test invoices. Present the confirmation in a clear, readable format.

### Invoice Detection

Watch for invoice-related keywords: "invoice", "bill", "charge", "billing" - users may say "invoice Joe Bloggs for..." instead of "create an invoice for..."

### Service Descriptions

- Enter services exactly as mentioned by the user
- Do NOT modify or rephrase service descriptions apart from correcting obvious spelling mistakes
- Preserve the user's original wording and terminology
- Never include the price in the title or description
- For hourly work, include the hourly rate in the description (e.g., "Web development @ £50.00/hour") so the quantity field represents hours worked

### Invoice Numbering

Create unique invoice numbers using format: `[Customer Initials]-[DD-MM-YYYY]`  
Examples:

- "John Smith" on 15th January 2024 = `JS-15-01-2024`
- "ABC Limited" on 3rd March 2024 = `AL-03-03-2024`

### Date Handling

- Default invoice date to today's date
- Default due date to 30 days from invoice date
- Accept natural language dates ("next Friday", "in 2 weeks")

### Missing Information Handling

- If customer details are incomplete, ask for what's missing
- For mock invoices, create realistic but fictional details
- Always prioritise user-provided information over defaults

### Error Prevention

- Validate that all monetary amounts are positive numbers
- Ensure dates are logical (due date after invoice date)
- Check that invoice numbers are unique within the conversation

### Mock Invoices

When asked for mock/test invoices:

- Create realistic but fictional customer details
- Use varied service types (consulting, design, development, etc.)
- Include mix of hourly and fixed-price items
- Still confirm details with user before generating

### File Output

- Default output path: Desktop
- Filename format: `invoice-{invoiceNumber}.pdf`
- Inform user of exact save location after generation

## User Experience Guidelines

### Conversation Flow

1. Gather invoice requirements
2. Present complete invoice details for confirmation
3. Generate PDF using MCP tool
4. Confirm successful creation and file location

### Error Handling

- If PDF generation fails, explain the issue clearly
- Offer to retry with corrected information
- Never expose technical error details to users

Development

Server

Build the MCP server -

bash
cd server
npm run build

Test the MCP server using the inspector -

bash
npm run inspector

Preview App

Preview the invoice template at http://localhost:5173/ -

bash
cd preview
npm run dev

The invoice template can be edited through invoice-template.tsx and styles.ts in the server folder - changes will automatically carry over to the preview.

Tech Stack

Server

  • Model Context Protocol SDK
  • TypeScript
  • React PDF

Preview

  • React 19
  • TypeScript
  • React PDF
  • Vite

Local Model Support

Currently testing compatibility with local AI models via LM Studio. While the MCP server works, local models are less reliable than Claude and may return errors. I'm looking at ways to improve the code to help with this.

Privacy

When using online AI services such as Claude Desktop, only include information you're comfortable sharing as data may be processed for model training.

In Progress

  • Support for generating quotes
  • Invoice template refinements

Contributing

Contributions are welcome! If you'd like to improve the Invoice MCP server -

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

For major changes, please open an issue first to discuss what you'd like to change.

Licence

This project is licensed under the MIT Licence - see the LICENSE file for details.

Acknowledgements

Invoice MCPのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Invoice MCPに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Invoice MCPをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Invoice MCPのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "invoice-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてInvoice MCPのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Invoice MCPのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Invoice MCPを使ってこのタスクを手伝ってもらえますか?
Invoice MCP
はい、読みました。
Invoice MCPで調べた結果をお伝えします。

よくある質問

Invoice MCP MCPサーバーは何に使いますか?

Invoice MCPは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでInvoice MCP MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでInvoice MCPを利用できます。

TypingMindでInvoice MCP MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Invoice MCPを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Invoice MCP MCPをTypingMindに接続するにはどうすればよいですか?

Invoice MCPはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでInvoice MCP MCPのどのようなツールを利用できますか?

Invoice MCPはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Invoice MCP MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Invoice MCPで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇