Xledger MCP Server
Click on "Deploy 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., "@Xledger MCP ServerShow outstanding AR invoices for July 2024"
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.
Xledger MCP Server
An MCP (Model Context Protocol) server that provides read-only access to the Xledger accounting system via its GraphQL API.
Use it with Claude, VS Code Copilot, or any MCP-compatible AI assistant to query your financial data — invoices, account balances, projects, timesheets, and more.
Features
9 read-only tools covering core accounting data
Compatible with Xledger GraphQL API v2
Token-based authentication (no OAuth complexity)
Zero runtime dependencies beyond the MCP SDK
TypeScript with full type safety
Related MCP server: Restaurant365 MCP Server
Tools
Tool | Description |
| Customer invoices (Accounts Receivable) — filter by date, outstanding only |
| Supplier invoices (Accounts Payable) — filter by date, outstanding only |
| GL account balances by fiscal year and period |
| Project financials — revenue, cost, hours, billability |
| Timesheet entries — hours per employee per project |
| Raw GL transactions with account, amount, project |
| Employee list with employment dates |
| Customer lookup with name search |
| Aggregated revenue by customer for a date period |
All tools are annotated with readOnlyHint: true — they never modify data in Xledger.
Quick Start
Prerequisites
Node.js 18+
A Xledger account with GraphQL API access
An API token (generate at: Xledger > Administration > System Access > GraphQL/API tokens)
Install and Build
git clone https://github.com/Eyevinn/xledger-mcp-server.git
cd xledger-mcp-server
npm install
npm run buildConfigure
Set the required environment variable:
export XLEDGER_GRAPHQL_TOKEN=your-token-hereVariable | Required | Default | Description |
| Yes | — | Your Xledger API token |
| No |
| API endpoint (use |
Run
npm startThe server communicates over stdio — it's designed to be launched by an MCP client, not run standalone.
Configuration
Claude Desktop / Claude Code
Add to your Claude configuration (~/.claude/settings.json or Claude Desktop config):
{
"mcpServers": {
"xledger": {
"command": "node",
"args": ["/path/to/xledger-mcp-server/dist/index.js"],
"env": {
"XLEDGER_GRAPHQL_TOKEN": "your-token-here"
}
}
}
}VS Code (GitHub Copilot)
Add to .vscode/mcp.json:
{
"servers": {
"xledger": {
"command": "node",
"args": ["/path/to/xledger-mcp-server/dist/index.js"],
"env": {
"XLEDGER_GRAPHQL_TOKEN": "your-token-here"
}
}
}
}Tool Details
get_ar_transactions
Get customer invoices with optional filters.
Parameters:
first(number, default: 50) — Number of records (max 200)outstandingOnly(boolean, default: false) — Only unpaid invoicesfromDate(string, YYYY-MM-DD) — Invoice date fromtoDate(string, YYYY-MM-DD) — Invoice date to
get_ap_transactions
Get supplier invoices with optional filters. Same parameters as get_ar_transactions.
get_account_balances
Get GL account balances.
Parameters:
fiscalYear(number) — Fiscal year, defaults to current yearperiodNumber(number, 1-12) — Month. Returns YTD if omittedfirst(number, default: 200) — Number of records (max 500)
get_projects
Get projects with financial data.
Parameters:
first(number, default: 100) — Number of records (max 500)activeOnly(boolean, default: true) — Only active projectsbillableOnly(boolean, default: false) — Only billable projects
get_timesheets
Get timesheet entries.
Parameters:
first(number, default: 100) — Number of records (max 500)fromDate/toDate(string, YYYY-MM-DD) — Date rangeinvoicedOnly(boolean) — Only invoiced entriesnotInvoiced(boolean) — Only uninvoiced entries
get_journal_entries
Get raw GL transactions.
Parameters:
first(number, default: 50) — Number of records (max 200)fromDate/toDate(string, YYYY-MM-DD) — Date range (usescreatedAtas proxy sincepostedDateis not filterable in API v2)fiscalYear(number) — Client-side fiscal year filter
get_employees
Get employee list.
Parameters:
first(number, default: 100) — Number of recordsactiveOnly(boolean, default: true) — Only currently employed
get_customers
Get customers (subledgers).
Parameters:
first(number, default: 100) — Number of recordssearch(string) — Partial name/code match (client-side)
get_revenue_summary
Get aggregated revenue by customer.
Parameters:
fromDate(string, YYYY-MM-DD, required) — Period starttoDate(string, YYYY-MM-DD, required) — Period end
Xledger API v2 Notes
This server is compatible with Xledger's GraphQL API v2 schema, which introduced several changes:
Filter syntax: Direct field suffixes (e.g.,
invoiceDate_gte) instead of{ AND: [{ field, op, value }] }OrderBy: Array of
{ field, direction }enums instead of single objectRemoved filters: Some fields are no longer filterable (
fiscalYearon account balances,descriptionon subledgers,billableon projects,postedDateon journal entries). These are handled with client-side filtering.SystemValue: Uses
.nameinstead of.description
Development
npm install
npm run build # Compile TypeScript
npm test # Run tests
npm run dev # Watch mode (recompile on changes)
npm run lint # Type-check without emittingSecurity
The API token grants read access scoped to your Xledger tenant
Never commit tokens to version control — use environment variables
All tools are read-only (no mutations)
Consider using Xledger's token scope controls to limit access to only the data you need
License
MIT — see LICENSE
About Eyevinn Technology
Eyevinn Technology is a Stockholm-based consultancy specializing in video streaming technology. We contribute to the open source community through our GitHub organization and Open Source Cloud platform.
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only NuMetric.work accounting & ERP data: statements, KPIs, reports, invoices, documents.
Read-only zobrx e-commerce data: P&L, orders, inventory, marketplace, tax & shelf insights.
Query financial statements, KPIs, ratios, cash forecasts and budgets from your general ledger
Read-only access to your bank, investment, and crypto accounts: balances, transactions, holdings.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables read-only interaction with Hasura GraphQL APIs, including table exploration, data preview, and schema introspection.10 npmMIT
- FlicenseAqualityCmaintenanceProvides live, near-real-time read access to Restaurant365 OData API for financial and operational data queries.8-
- FlicenseBqualityBmaintenanceEnables interaction with the Bokio accounting API for managing journal entries, invoices, customers, items, and more, with read-only mode by default for safety.18-
- FlicenseNot gradedqualityBmaintenanceEnables accountants to connect Xero, read accounting data, analyze, and execute controlled draft operations after explicit confirmation, with Xero as the source of truth.-