Multi-Tenant Invoice Autofill 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., "@Multi-Tenant Invoice Autofill MCP ServerAutofill invoice for tenant Acme Corp using the extracted order JSON."
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.
Multi-Tenant Invoice Autofill MCP Server
A Python backend service enabling function-calling or MCP-capable LLMs (Claude, Gemini, GPT, etc.) to autofill and save invoices on Digital Invoicing Software on behalf of tenants.
Features
Dual Transport Support: Exposed via standard MCP protocol (stdio / Streamable HTTP) and REST API (FastAPI) with OpenAPI schema.
Multi-Tenancy & Auth: Per-tenant credential encryption, custom MCP API keys, and isolated session management.
Resilient Adapter: Encapsulated HTTP adapter replicating browser headers, with reactive session refresh and dynamic cookie expiry parsing.
Idempotency & Concurrency: Deduplication via document hash and per-tenant Redis distributed locking (
lock:tenant:{id}).Privacy First: Mandatory structured log redaction layer scrubbing passwords, cookies, keys, and tokens.
Zero Hardcoded Values: No credentials or business identities baked into code, comments, or tests; full synthetic test data generation.
Related MCP server: Invoice MCP Server
Local Prerequisites
Python 3.12+
Docker & Docker Compose (for local Postgres & Redis)
Getting Started
1. Environment Setup
Copy .env.example to .env and set local variables:
cp .env.example .env2. Launch Local Database & Redis
docker-compose up -d3. Install Dependencies
python -m venv .venv
# Windows:
.\.venv\Scripts\pip install -r requirements.txt
# Linux/macOS:
source .venv/bin/activate
pip install -r requirements.txt4. Run Migrations
.\.venv\Scripts\alembic upgrade head5. Start the Server
# Start FastAPI REST server:
.\.venv\Scripts\uvicorn mcp_digitalinvoice.main:app --reload --port 8000
# Run MCP stdio server:
.\.venv\Scripts\python -m mcp_digitalinvoice.mcp_server.serverSecurity
Encryption Key Management: The ENCRYPTION_KEY environment variable must be set to a secure 32-byte base64-encoded Fernet key. Application startup will fail immediately if ENCRYPTION_KEY is not provided. If an encryption key was ever used to encrypt real tenant data and is suspected of exposure, that data must be re-encrypted under a freshly generated key, since the old key must be considered compromised.
Workflows
Tenant Onboarding (connect_account)
Call
connect_accountwith the tenant's Digital Invoicing Software login email, password, and business name.The server encrypts credentials, validates them via an initial login, and returns a unique
mcp_api_key.Provide this
mcp_api_keyto the LLM (as a Bearer token or header) for subsequent tool invocations.
Invoice Autofill (fill_invoice)
The LLM invokes fill_invoice with extracted invoice JSON payload (buyer, items, meta). The service validates required fields, enforces single-document sequencing, checks idempotency, resolves tenant session, maps payload to downstream shape, and creates the invoice draft.
Running Tests
.\.venv\Scripts\pytest -v tests/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
- -licenseNot gradedqualityBmaintenanceEnables AI assistants to prepare and create invoices via Outvoicer's invoicing platform using Streamable HTTP MCP.
- AlicenseNot gradedqualityCmaintenanceAllows AI clients like Claude and Cursor to authenticate and interact with an invoice generator backend, enabling login, invoice creation, and invoice download.29MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to securely interact with rental management data (leases, rent status, tenant records, tax filings) through a per-user OAuth 2.0 authenticated MCP server, with human-in-the-loop for sensitive actions.5AGPL 3.0
- AlicenseAqualityBmaintenanceMCP server for POP — enabling LLMs to generate, submit, and manage Italian e-invoices (FatturaPA/SdI), Peppol invoices, and PDF invoices directly from AI assistants.1657MIT
Related MCP Connectors
Connect MCP clients to 2,000+ AI models without managing provider API keys.
Brazil NFS-e service invoices for AI agents via Focus NFe and NFe.io. Stateless, never stores data.
MCP Server for agents to onboard, pay, and provision services autonomously with InFlow
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/Muhammad-Usman-Tariq/Mcp-Digitalinvoice'
If you have feedback or need assistance with the MCP directory API, please join our Discord server