Read-only MCP server for Firebird databases
Project description
firebird-sql-mcp
Read-only MCP server for Firebird databases. Gives AI assistants (Claude Desktop, Claude Code, Cursor, ...) safe access to a database: browse the schema, run SELECT queries, never write anything. Status: alpha.
Tools
| Tool | What it does |
|---|---|
list_profiles |
Configured connection profiles (never includes secrets) |
list_tables |
User tables and views, filter by kind or name |
describe_table |
Columns and types, primary key, foreign keys, indexes |
run_query |
Run one SELECT/WITH statement, capped by row count and a 1 MiB budget |
explain_query |
The engine's execution plan, without executing the query |
How read-only is enforced
Not by SQL string filtering alone. Every query runs inside a Firebird read-only transaction, so the engine itself rejects writes even if a statement slips past the SQL gate; transactions are always rolled back, never committed. A statement timeout and response caps limit runaway queries, and every query is written to a JSONL audit log. Passwords live in the OS keyring, never in files or logs.
Requirements
- Python 3.11+ and a Firebird client library (
fbclient.dll/libfbclient.so); setFBMCP_FB_CLIENT_LIBRARYif it is not on the default search path. - Firebird server 3.0+ (developed against 5.0); embedded databases work too.
Install and set up
Claude Code, as a plugin (needs uv; details in plugin/README.md):
/plugin marketplace add dimitar-grigorov/firebird-sql-mcp
/plugin install firebird-sql-mcp
Everywhere else, install the package (pip, pipx or uv tool):
pip install firebird-sql-mcp
Then add a profile - one command creates the config, stores the password in
the OS keyring and tests the connection. Omit --host for an embedded local
file. With the plugin install, prefix the command with
uvx --from firebird-sql-mcp:
fbmcp profile add mydb --host localhost --database D:\Data\MYDB.FDB --user SYSDBA
If you installed the package, register the server with your MCP client. Claude Code:
claude mcp add firebird -- fbmcp
Claude Desktop, Cursor and friends (any stdio MCP client just runs fbmcp):
{
"mcpServers": {
"firebird": { "command": "fbmcp" }
}
}
Then ask away: "What tables are in mydb?", "Describe ORDERS", "Show the 10 most recent orders with customer names".
CLI
| Command | What it does |
|---|---|
fbmcp |
Start the stdio MCP server (what the MCP client runs) |
fbmcp profile add|set|rm|list |
Manage connection profiles |
fbmcp cred set|test|rm --profile <name> |
Store, verify or remove a keyring password |
fbmcp init-config |
Create an example profiles.toml to edit by hand |
Profile options: --port, --role, --charset (default AUTO: detected from
the schema), --none-charset (what charset NONE data is assumed to be,
default WIN1251), --timeout-ms (statement timeout, 0 disables).
Configuration
Profiles live in profiles.toml (%APPDATA%\fbmcp on Windows,
~/.config/fbmcp on Linux, ~/Library/Application Support/fbmcp on macOS):
[defaults]
charset = "AUTO" # AUTO = detect; or a Firebird charset (WIN1251, UTF8, ...)
statement_timeout_ms = 30000
[profiles.mydb]
host = "localhost"
database = 'D:\Data\MYDB.FDB' # single quotes: no escaping of backslashes
user = "SYSDBA"
Environment variables: FBMCP_PW__<PROFILE> (password override for
containers/CI, beats the keyring), FBMCP_FB_CLIENT_LIBRARY (path to the
client library), FBMCP_CONFIG_DIR / FBMCP_DATA_DIR (relocate config and
audit log).
License
Firebird® is a registered trademark of the Firebird Foundation Incorporated. This project is independent and not affiliated with or endorsed by the Firebird Project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file firebird_sql_mcp-0.1.0a3.tar.gz.
File metadata
- Download URL: firebird_sql_mcp-0.1.0a3.tar.gz
- Upload date:
- Size: 48.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afbdb171612c3dc6749227759c67daa216718f0831ea610a5605a4f8adfd4846
|
|
| MD5 |
e4f036bd3993076284d4b7f0e51ae1ae
|
|
| BLAKE2b-256 |
1e68d4cc2b90d0182542701c1295eb8bfaee7c9cf8f58142a9489d8aa2952dea
|
Provenance
The following attestation bundles were made for firebird_sql_mcp-0.1.0a3.tar.gz:
Publisher:
release.yml on dimitar-grigorov/firebird-sql-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
firebird_sql_mcp-0.1.0a3.tar.gz -
Subject digest:
afbdb171612c3dc6749227759c67daa216718f0831ea610a5605a4f8adfd4846 - Sigstore transparency entry: 2063712077
- Sigstore integration time:
-
Permalink:
dimitar-grigorov/firebird-sql-mcp@911917ff47abd1d69dafeae1b13ab506341869b4 -
Branch / Tag:
refs/tags/v0.1.0a3 - Owner: https://github.com/dimitar-grigorov
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@911917ff47abd1d69dafeae1b13ab506341869b4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file firebird_sql_mcp-0.1.0a3-py3-none-any.whl.
File metadata
- Download URL: firebird_sql_mcp-0.1.0a3-py3-none-any.whl
- Upload date:
- Size: 44.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e976e56b25014d794432c988ba45d50e2806b5c84c84940ee167f55ad50d20d9
|
|
| MD5 |
4702a9f4156c056eda5fb5d53baa0f78
|
|
| BLAKE2b-256 |
9e39ce15d2fdea7b9ac310df523bbe782b3cdb67e66902b5823281fb0a467077
|
Provenance
The following attestation bundles were made for firebird_sql_mcp-0.1.0a3-py3-none-any.whl:
Publisher:
release.yml on dimitar-grigorov/firebird-sql-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
firebird_sql_mcp-0.1.0a3-py3-none-any.whl -
Subject digest:
e976e56b25014d794432c988ba45d50e2806b5c84c84940ee167f55ad50d20d9 - Sigstore transparency entry: 2063712185
- Sigstore integration time:
-
Permalink:
dimitar-grigorov/firebird-sql-mcp@911917ff47abd1d69dafeae1b13ab506341869b4 -
Branch / Tag:
refs/tags/v0.1.0a3 - Owner: https://github.com/dimitar-grigorov
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@911917ff47abd1d69dafeae1b13ab506341869b4 -
Trigger Event:
release
-
Statement type: