Skip to main content

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); set FBMCP_FB_CLIENT_LIBRARY if 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

AGPL-3.0.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

firebird_sql_mcp-0.1.0a2.tar.gz (48.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

firebird_sql_mcp-0.1.0a2-py3-none-any.whl (44.1 kB view details)

Uploaded Python 3

File details

Details for the file firebird_sql_mcp-0.1.0a2.tar.gz.

File metadata

  • Download URL: firebird_sql_mcp-0.1.0a2.tar.gz
  • Upload date:
  • Size: 48.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for firebird_sql_mcp-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 8966dc090835b48193c242ed74c588ab802df2b812876ef6ced98926330a1150
MD5 6443bc0d8b4713029b68230febbaf083
BLAKE2b-256 c971c8e0e71b0ac3eb93c7f64daa329c4a2a77bc8f705c0a69f1bf5864bc3232

See more details on using hashes here.

Provenance

The following attestation bundles were made for firebird_sql_mcp-0.1.0a2.tar.gz:

Publisher: release.yml on dimitar-grigorov/firebird-sql-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file firebird_sql_mcp-0.1.0a2-py3-none-any.whl.

File metadata

File hashes

Hashes for firebird_sql_mcp-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 9f2acf39b86259a4d5c1d4b22585b89eb67647a96aa5e1be7e8676f0c910a746
MD5 3e4bd265c7680b854ee7877160fb6ed9
BLAKE2b-256 1b9470b2a1cbfd8a7f178bbfaf3a52ce0ed2f164a64432b6f7a87f198f4119e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for firebird_sql_mcp-0.1.0a2-py3-none-any.whl:

Publisher: release.yml on dimitar-grigorov/firebird-sql-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page