finance-mcp-server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
finance-mcp-server
A standalone MCP (Model Context Protocol) server that exposes an H2
database as a set of tools an LLM can call: list_tables,
describe_table, run_query, run_update, sample_rows.
This is intentionally a separate Python process/repo from the Java service — they only share the H2 database itself.
Important: running alongside a Java service
Embedded H2 (jdbc:h2:./data/mydb) locks the database file for a single
process. If your Java service opens H2 that way, this Python server can't
connect to the same file at the same time. Two ways around that:
Option A — H2 TCP server mode (recommended for this setup) Run H2 as a small server process; both your Java app and this MCP server connect to it over TCP as clients:
java -cp h2-2.2.224.jar org.h2.tools.Server \
-tcp -tcpAllowOthers -ifNotExistsThen both sides use a URL like:
jdbc:h2:tcp://localhost:9092/./data/mydbOption B — AUTO_SERVER=TRUE
Keep the embedded URL in your Java app but append ;AUTO_SERVER=TRUE.
H2 will then also accept other connections to the same file.
This project defaults to Option A (see .env.example).
Related MCP server: database-mcp-server
Setup
# 1. Get the H2 driver jar (match your H2 version)
mkdir -p drivers
curl -L -o drivers/h2.jar \
https://repo1.maven.org/maven2/com/h2database/h2/2.2.224/h2-2.2.224.jar
# 2. Python env
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
# 3. Configure
cp .env.example .env
# edit .env if your JDBC URL / credentials differ
# 4. Fetch the H2 driver JAR **before** first startup
This is a required step — the server will fail to start (or fail to connect) without the H2 jar present.
```bash
scripts\fetch_h2_driver.sh⚠️ Known issue: a missing or wrong H2 jar version was the main setup blocker. Make sure
fetch_h2_driver.shcompletes successfully and downloads the jar version your H2 database file was created with — a version mismatch between the driver jar and the.mv.dbfile format will cause connection failures. Confirm the jar lands whereverserver.pyexpects it (check the script/config for the exact path) before moving on.
5. Start H2 in TCP server mode (separate terminal), then run:
python server.py
`jaydebeapi` starts an embedded JVM to load the H2 driver, so you need a
JDK/JRE installed and on `PATH` (or `JAVA_HOME` set) — this is separate
from whatever JVM your Java service runs under.
## Trying it with Claude Desktop
Add to your Claude Desktop MCP config
(`~/Library/Application Support/Claude/claude_desktop_config.json` on
macOS, `%APPDATA%\Claude\claude_desktop_config.json` on Windows):
```json
{
"mcpServers": {
"h2-database": {
"command": "/absolute/path/to/.venv/bin/python",
"args": ["/absolute/path/to/h2-mcp-server/server.py"],
"env": {
"H2_JDBC_URL": "jdbc:h2:tcp://localhost:9092/./data/mydb",
"H2_USER": "sa",
"H2_PASSWORD": "",
"H2_ALLOW_WRITES": "false"
}
}
}
}Restart Claude Desktop, then ask it something like "what tables are in
my H2 database?" — it will call list_tables / describe_table /
run_query as needed.
Safety notes
run_queryonly acceptsSELECTstatements.run_update(INSERT/UPDATE/DELETE/MERGE) is disabled by default — setH2_ALLOW_WRITES=trueto turn it on.Both tools block
DROP,TRUNCATE,ALTER,GRANT,REVOKE,SHUTDOWN, and user-management statements outright.This is demo-grade guarding (regex-based), not a substitute for a real permissions model — don't point it at a production database with real user data without tightening this further.
Moving to AWS later
Swap the last line of server.py:
mcp.run(transport="stdio")for:
mcp.run(transport="streamable-http")and put it behind whatever orchestrator/API layer talks to your LLM provider — stdio only works for local parent/child process setups.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceAn MCP server that exposes relational databases (PostgreSQL/MySQL) to AI agents with natural language to SQL query support.19-
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that provides database operations as tools for LLM-powered applications. Supports PostgreSQL, MySQL, and MongoDB databases with connection pooling and flexible result formatting.-
- AlicenseNot gradedqualityDmaintenanceMCP tool server providing SQLite database access for AI agents.MIT
- FlicenseNot gradedqualityDmaintenanceMCP server enabling natural-language querying of SQLite databases via schema discovery, GraphRAG retrieval, and safely guarded read-only SQL execution.-