InvoiceNinja MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@InvoiceNinja MCP Serverlist my unpaid invoices from this month"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
InvoiceNinja MCP Server
Model Context Protocol (MCP) server for InvoiceNinja v5.11.62 integration with Claude Desktop, Claude Code, and Cursor.ai.
Features
ā READ-ONLY Operations (Tested & Working)
š List and view invoices with tax calculations
š³ List and view expenses
š„ List clients, vendors, and expense categories
š Generate tax reports (quarterly and custom date ranges)
š Invoice and expense reports
š WRITE Operations (To Be Implemented)
Create invoices and expenses
Update invoices and expenses
Clone invoices and expenses
Send invoice emails
Upload expense documents
Related MCP server: EspoCRM Assistant
Installation
Prerequisites
Python 3.10+
Poetry (recommended) or pip
InvoiceNinja v5.11.62 instance
API token from your InvoiceNinja admin panel
Setup
Clone or navigate to the project:
cd in-mcpInstall dependencies:
poetry installConfigure environment variables:
cp .env.example .envEdit .env with your InvoiceNinja credentials:
API_URL=https://your-instance.com/api/v1
API_KEY=your_api_token_hereTest the connection:
poetry run python test_connection.pyMCP Server Configuration
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"invoiceninja": {
"command": "poetry",
"args": ["run", "python", "-m", "invoiceninja_mcp"],
"cwd": "/full/path/to/in-mcp"
}
}
}Cursor.ai
Add similar configuration in Cursor's MCP settings.
Claude Code
The MCP server should be automatically detected when running in the project directory.
Available Tools
š Utility Tools
test_connection()- Test API connection and authenticationlist_clients(per_page=100)- List all clientslist_vendors(per_page=100)- List all vendorslist_expense_categories(per_page=100)- List expense categories
š Invoice Tools (Read-Only)
list_invoices(status?, client_id?, per_page=20)- List invoices with filtersStatus: draft, sent, viewed, approved, partial, paid
get_invoice(invoice_id)- Get detailed invoice informationShows amounts including/excluding tax
Line items breakdown
Payment status
get_invoice_status(invoice_id)- Get current invoice status
š³ Expense Tools (Read-Only)
list_expenses(per_page=20)- List expensesget_expense(expense_id)- Get detailed expense information
š Report Tools
get_tax_report_quarterly(year, quarter)- Get tax report for Q1/Q2/Q3/Q4Example:
get_tax_report_quarterly(2024, 1)for Q1 2024
get_tax_report_custom(start_date, end_date)- Custom date range tax reportDates in YYYY-MM-DD format
get_expense_report(start_date, end_date)- Expense summary reportget_invoice_report(start_date, end_date)- Invoice summary report
Usage Examples
With Claude Desktop
List all invoices from this month
Show me invoices that are still unpaid
Get the tax report for Q3 2024
What's the status of invoice ID abc123?
List all expenses from January 2024Programmatic Usage
from invoiceninja_mcp.client import InvoiceNinjaClient
async def example():
client = InvoiceNinjaClient()
# List invoices
invoices = await client.list_invoices(status="sent", per_page=10)
# Get specific invoice
invoice = await client.get_invoice("invoice_id_here")
# List clients
clients = await client.list_clients()Project Structure
in-mcp/
āāā invoiceninja_mcp/
ā āāā __init__.py
ā āāā __main__.py # Entry point
ā āāā server.py # FastMCP server with tools
ā āāā client.py # InvoiceNinja API client
ā āāā config.py # Settings management
ā āāā models.py # Pydantic models
āāā pyproject.toml # Dependencies
āāā .env # Your config (gitignored)
āāā .env.example # Example config
āāā .gitignore
āāā README.mdDevelopment
Running Tests
# Test API connection
poetry run python test_connection.py
# Test all MCP tools
poetry run python test_mcp_tools.pyRunning the MCP Server
# Start the server
poetry run python -m invoiceninja_mcp
# Or with poetry
poetry run invoiceninja_mcpAPI Details
Authentication Headers
The client automatically includes:
X-API-Token: Your API tokenX-Requested-With: XMLHttpRequestContent-Type: application/jsonAccept: application/json
Invoice Status Codes
1 = Draft
2 = Sent
3 = Viewed
4 = Approved
5 = Partial
6 = Paid
Tax Calculations
Invoices return both:
Amount including tax - Full invoice total
Amount excluding tax - Subtotal before tax
Tax amount - Total tax
Troubleshooting
403 Forbidden Error
Verify your API token in InvoiceNinja admin panel
Check that the token has appropriate permissions
Ensure API_URL includes
/api/v1
Connection Timeout
Increase
INVOICENINJA_TIMEOUTin.envCheck your InvoiceNinja instance is accessible
Validation Errors
Ensure you're using InvoiceNinja v5.11.62 or compatible version
Check API responses match expected data structure
License
MIT
Credits
Built with:
FastMCP - MCP server framework
httpx - Async HTTP client
Pydantic - Data validation
InvoiceNinja - Invoice management platform
Contributing
Contributions welcome! Please ensure:
All tests pass
Code follows existing patterns
Documentation is updated
Security best practices are followed
Security
Never commit
.envfileKeep API tokens secure
Use HTTPS for InvoiceNinja instance
Review API token permissions regularly
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.
Related MCP Servers
- -license-quality-maintenanceEnables secure, read-only access to the Payday API through Claude Desktop with OAuth2 authentication. Supports querying customers, invoices, expenses, and payments with multi-profile support for different environments.Last updated
- FlicenseBqualityCmaintenanceProvides read-only EspoCRM access for AI assistants, enabling record retrieval and preparation of signed change sets without direct modification or deletion.Last updated7

ZEVO Host MCP Serverofficial
Flicense-qualityCmaintenanceGives AI agents read-only access to ZEVO financial data, enabling queries about vehicles, bookings, transactions, and more through natural language.Last updated- AlicenseAqualityBmaintenanceExposes all 379 Invoice Ninja v5 REST API endpoints through three consolidated tools (list, describe, call), enabling full invoice management and business operations via natural language.Last updated330AGPL 3.0
Related MCP Connectors
Read-only NuMetric.work accounting & ERP data: statements, KPIs, reports, invoices, documents.
Read-only access to your VortexIQ store data: audits, KPIs, alerts, Brand DNA, reports, Ask VIQ.
Read-only bank access for your AI agent. Connects Claude, ChatGPT, Cursor, Gemini, Codex.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/a-wiseguy/invoiceninja-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server