Lekha API

v0.1.0
io.github.backstab319/lekha-mcp Checked 1 day ago Published 6 days ago

Parse Indian bank statement PDFs into balance-checked transactions (Kotak, SBI, Indian Bank, more).

Values you need

VariableWhat it is
LEKHA_KEYrequired secret API key from https://lekhaapi.com/dashboard (50 free pages on signup)

PyPI (uvx) discovery passed

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add lekha-mcp -e 'LEKHA_KEY=<LEKHA_KEY>' -- uvx lekha-mcp==0.1.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "lekha-mcp": {
      "args": [
        "lekha-mcp==0.1.0"
      ],
      "command": "uvx",
      "env": {
        "LEKHA_KEY": "<LEKHA_KEY>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "lekha-mcp": {
      "args": [
        "lekha-mcp==0.1.0"
      ],
      "command": "uvx",
      "env": {
        "LEKHA_KEY": "<LEKHA_KEY>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "LEKHA_KEY",
      "id": "lekha-key",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "lekha-mcp": {
      "args": [
        "lekha-mcp==0.1.0"
      ],
      "command": "uvx",
      "env": {
        "LEKHA_KEY": "${input:lekha-key}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.lekha-mcp]
command = "uvx"
args = ["lekha-mcp==0.1.0"]
env = { "LEKHA_KEY" = "<LEKHA_KEY>" }

For AI agents

  1. Ask the user for: LEKHA_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: parse_statement, get_credits.
  5. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json