Invoice MCP Server
Allows AI clients like Claude and Cursor to authenticate and interact with an invoice generator backend, enabling login, invoice creation, and invoice download.
README
Invoice MCP Server
A standalone Model Context Protocol (MCP) Server for the Invoice Generator application. This server bridges an AI Client (like Claude, Cursor, ChatGPT) with an existing Express.js/Supabase backend, allowing the AI to authenticate and interact with invoices.
Features
- login: Authenticates against the backend and stores the JWT securely in-memory.
- create_invoice: Searches for a client by name and creates a new invoice for them.
- download_invoice: Retrieves the download link/stream for a specific invoice.
Setup and Installation
-
Install dependencies:
npm install -
Environment Variables: Ensure you have a
.envfile at the root of the project with the following variable:API_BASE_URL=https://suriyainvoicegenerator.inReplace the URL with your actual backend URL.
Running Locally
To run the server locally for testing:
npm start
Note: The server uses stdio for MCP communication, so it will wait for stdin messages rather than acting as an HTTP server.
Registering the MCP Server
You can register this MCP server in your AI client. For example, in Cursor, go to Settings -> Features -> MCP, and add a new server with the following command:
node /absolute/path/to/invoice-mcp-server/src/index.js
(Make sure to use the absolute path to your src/index.js file.)
Architecture & Folder Structure
mcp-server/
├── src/
│ ├── index.js # Entry point, sets up stdio transport
│ ├── server.js # Registers MCP server and routes tool requests
│ ├── config/
│ │ └── env.js # Environment variable configuration (dotenv & Zod)
│ ├── services/
│ │ └── api.js # Axios client and in-memory session manager
│ ├── tools/
│ │ ├── login.js # Tool for backend authentication
│ │ ├── createInvoice.js # Tool for creating an invoice
│ │ └── downloadInvoice.js # Tool for downloading an invoice
│ ├── middleware/
│ │ └── errorHandler.js # Centralized error handler returning MCP errors
│ └── utils/
│ ├── logger.js # Basic logger (hides sensitive data)
│ └── response.js # MCP response formatting utilities
├── package.json
├── .env
└── README.md
Sample Prompts
Once registered with your AI client, try prompts like:
- "Login to the invoice generator with email user@example.com and password mypassword."
- "Create an invoice for Acme Corp with 2 Laptops at 45000 each. The invoice date is today and due in 30 days."
- "Download invoice number 12345 and give me the link."
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.