Skip to main content

lekha-mcp

An MCP server for Lekha API. It lets Claude, Cursor, VS Code, Gemini CLI, Codex and other MCP clients turn Indian bank statement PDFs on your computer into transactions: dates, debits, credits and balances, checked against the running balance.

Ask things like:

  • "Convert ~/Downloads/kotak-april.pdf to a CSV in the same folder."
  • "Parse these three SBI statements (password ABCD0101) and total the UPI debits per month."
  • "How many Lekha credits do I have left?"

Tools

Tool What it does
parse_statement(pdf_path, password?, save_to?) Reads the PDF from disk, sends it to Lekha API and returns the statement. save_to writes .csv (transactions) or .json (everything). Statements over 100 transactions are saved beside the PDF as <name>.lekha.json and the reply has a summary.
get_credits() Credits left on your account. Free.

One credit is one PDF page, charged only when parsing succeeds. Supported: Kotak Mahindra Bank, Indian Bank, State Bank of India, and other banks through a generic reader that answers only when every balance adds up.

Setup

  1. Sign in at lekhaapi.com (new accounts get 50 free pages) and copy an API key from the dashboard.
  2. Install uv if you don't have it (uvx comes with it).
  3. Add the server to your client, replacing your-key:

Claude Code

claude mcp add lekha --env LEKHA_KEY=your-key -- uvx lekha-mcp

Claude Desktop (claude_desktop_config.json), Cursor (~/.cursor/mcp.json), Gemini CLI (~/.gemini/settings.json), Windsurf:

{
  "mcpServers": {
    "lekha": {
      "command": "uvx",
      "args": ["lekha-mcp"],
      "env": { "LEKHA_KEY": "your-key" }
    }
  }
}

VS Code (.vscode/mcp.json):

{
  "servers": {
    "lekha": {
      "type": "stdio",
      "command": "uvx",
      "args": ["lekha-mcp"],
      "env": { "LEKHA_KEY": "your-key" }
    }
  }
}

Codex CLI (~/.codex/config.toml):

[mcp_servers.lekha]
command = "uvx"
args = ["lekha-mcp"]
env = { LEKHA_KEY = "your-key" }

The key sits in that config file, so don't commit it. LEKHA_BASE_URL overrides the API address (default https://lekhaapi.com).

Privacy

The PDF is read on your computer and sent only to Lekha API, which processes it in memory and stores nothing. The parsed result goes back to your AI client, so it becomes part of that conversation and is handled under your AI provider's terms. PDF passwords you give the assistant are sent once to open the file and never stored.

Docs: lekhaapi.com/api-docs · Support: support@lekhaapi.com

Metadata

Release files for lekha-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lekha-mcp 0.1.0
File Size Uploaded Provenance Actions
lekha_mcp-0.1.0.tar.gz 80.4 kB With provenance Details for lekha_mcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lekha-mcp 0.1.0
File Interpreter ABI Platform Actions
lekha_mcp-0.1.0-py3-none-any.whl Python 3 none any Details for lekha_mcp-0.1.0-py3-none-any.whl

Total release size: 85.8 kB

Release files / lekha_mcp-0.1.0.tar.gz

Download URL lekha_mcp-0.1.0.tar.gz
Size 80.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ff491ca92086f802fd3c3f04569cbf05ce056a0eb5dce09e96787492cb91bf3f
BLAKE2b-256 checksum
How to use checksums
0d383df88e9681c02ea702ab98501a6a6db356583d17d0ce1a021f90cc2eb222
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / lekha_mcp-0.1.0-py3-none-any.whl

Download URL lekha_mcp-0.1.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db8194fa8d5bb4ef95f248c5a78f1792acde3a4fc3ff529e041a2f9ea344076b
BLAKE2b-256 checksum
How to use checksums
de7e30f2bca815e111cd49554afca1c62825ca352f738864d8e228a04edeb989
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for lekha-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for lekha_mcp-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page