Lekha API
Turns Indian bank statement PDFs into balance-checked transactions for finance teams
Lekha API is a freemium MCP server for accounting and tax. It runs locally on your machine and is started by your AI client.
- Pricing
- Freemium
- Platforms
- API, Web, CLI
- Runs
- Locally
- Access
- Needs a secret key or token
- Version
- 0.1.0
- Listing updated
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add lekha-mcp --env LEKHA_KEY='<LEKHA_KEY>' -- uvx lekha-mcpAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"lekha-mcp": {
"command": "uvx",
"args": [
"lekha-mcp"
],
"env": {
"LEKHA_KEY": "<LEKHA_KEY>"
}
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"lekha-mcp": {
"command": "uvx",
"args": [
"lekha-mcp"
],
"env": {
"LEKHA_KEY": "<LEKHA_KEY>"
}
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"lekha-mcp": {
"command": "uvx",
"args": [
"lekha-mcp"
],
"env": {
"LEKHA_KEY": "<LEKHA_KEY>"
}
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"lekha-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"lekha-mcp"
],
"env": {
"LEKHA_KEY": "<LEKHA_KEY>"
}
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add lekha-mcp --env LEKHA_KEY='<LEKHA_KEY>' -- uvx lekha-mcpOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.lekha-mcp]
command = "uvx"
args = ["lekha-mcp"]
env = { LEKHA_KEY = "<LEKHA_KEY>" }Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"lekha-mcp": {
"command": "uvx",
"args": [
"lekha-mcp"
],
"env": {
"LEKHA_KEY": "<LEKHA_KEY>"
}
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "lekha-mcp": { "command": "uvx", "args": [ "lekha-mcp" ], "env": { "LEKHA_KEY": "<LEKHA_KEY>" } } } }Or run: gemini mcp add -s user -e LEKHA_KEY='<LEKHA_KEY>' lekha-mcp uvx -- lekha-mcp
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "lekha-mcp": { "command": "uvx", "args": [ "lekha-mcp" ], "env": { "LEKHA_KEY": "<LEKHA_KEY>" } } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "lekha-mcp": { "command": "uvx", "args": [ "lekha-mcp" ], "env": { "LEKHA_KEY": "<LEKHA_KEY>" } } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "lekha-mcp": { "command": "uvx", "args": [ "lekha-mcp" ], "env": { "LEKHA_KEY": "<LEKHA_KEY>" } } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "lekha-mcp": { "command": "uvx", "args": [ "lekha-mcp" ], "env": { "LEKHA_KEY": "<LEKHA_KEY>" } } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "lekha-mcp": { "command": "uvx", "args": [ "lekha-mcp" ], "env": { "LEKHA_KEY": "<LEKHA_KEY>" } } } }The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.
Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "lekha-mcp": { "command": "uvx", "args": [ "lekha-mcp" ], "env": { "LEKHA_KEY": "<LEKHA_KEY>" } } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "lekha-mcp": { "command": "uvx", "args": [ "lekha-mcp" ], "env": { "LEKHA_KEY": "<LEKHA_KEY>" } } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
Configuration
LEKHA_KEYAPI key from https://lekhaapi.com/dashboard (50 free pages on signup)Required
About Lekha API
Lekha takes a bank statement PDF and returns every transaction with its date, debit, credit and running balance as structured data. Each row is reconciled against the running balance, and when a figure fails to add up the response points to the first row that doesn't match, so errors are not passed along silently.
It can be used through a single HTTP call with an API key, or without code by uploading a statement on the dashboard and downloading the result as Excel, CSV or a TallyPrime import file. Statements from Kotak Mahindra Bank, Indian Bank and State Bank of India are supported, including older and newer layouts, and password-protected files are accepted. Statements are processed in memory and not stored.
It suits lenders doing underwriting, accountants and small businesses moving bank data into their books, and developers building finance workflows. Pricing is prepaid per page, with 50 free pages on signup and no subscription.
What it does
- Balance-checked transactions
- Each row is reconciled against the running balance and flagged with its row number when it does not add up.
- Password-protected PDF support
- A statement password can be sent with the file and is used once to open the document.
- Excel, CSV and Tally export
- Dashboard users can download parsed statements as Excel, CSV or a TallyPrime import file.
- Stable error codes
- Errors such as wrong_password, unsupported_bank and scanned_pdf let applications explain what to fix.
- Per-page prepaid credits
- One credit is charged per page only when a statement parses successfully, and credits do not expire.
- MCP server for AI assistants
- The MCP package lets AI clients such as Claude Desktop and Cursor convert statements and answer questions about them.
Good for
- Verify income and balances from bank statements during loan underwriting
- Convert monthly bank statements into CSV or Excel for bookkeeping
- Import bank transactions into TallyPrime against a bank ledger
- Summarise UPI or card spending by asking an AI assistant about a statement
- Automate statement ingestion in a finance app through a single API call
Pricing
Freemium
Prepaid per page; 50 free pages on signup, credits never expire, prices in Indian rupees
Prices change. Check lekhaapi.com before you buy.
Lekha API FAQ
Which banks are supported?
Kotak Mahindra Bank, Indian Bank and State Bank of India, including older and newer Kotak and Indian Bank layouts. HDFC, ICICI and Axis are listed as coming next.
Do you store uploaded statements?
No. Files are processed in memory and discarded once the response is sent. Passwords are used once to open the file and are not stored or logged.
Do I pay for failed parses?
No. Credits are charged per page only when a statement parses successfully. Unsupported banks, bad files and wrong passwords cost nothing.
Do scanned statements work?
Not yet. The PDF needs a text layer, and scanned or photographed pages return a scanned_pdf error at no cost.
Is Lekha API free?
Lekha API has a free plan, with paid plans for more usage or features.
How do I add Lekha API to Claude Code?
Run this command in your terminal: claude mcp add lekha-mcp --env LEKHA_KEY='<LEKHA_KEY>' -- uvx lekha-mcp
What are the best alternatives to Lekha API?
The closest alternatives to Lekha API are UK Bank Statement PDF to CSV, Bank Statement Parser & Reconciler, Bank Statement Sheet, Extractivio and StatementPro.ai.
Where this comes from
- Description: written from the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.