Skip to content

MCP server for AI assistants

fbadmin is an MCP server: AI assistants that speak the Model Context Protocol (Claude Desktop, Claude Code, IDE assistants) can look at your Firebird databases through fbadmin, with the same permissions you have in fbadmin.

Tools

Tool What it does
list_servers The registered servers and their databases (ids and names). The assistant calls it first
database_info Engine version, ODS, page size, charset, dialect, size and object counts
list_objects Names of the tables, views, procedures, ... of a database (any type of the Object Explorer)
describe_object The CREATE DDL of an object and its details: columns, keys, indices, parameters, dependencies, comments
run_sql Runs SQL and returns at most 500 rows per statement (100 by default)
explain_plan The plan of a statement without running it: the PLAN and, on Firebird 3+, the detailed plan

Servers and databases can be given by id or by name.

Read-only by default. run_sql runs in a read-only transaction, so Firebird itself refuses INSERT, UPDATE, DELETE, DDL and procedures that change data, and the transaction is rolled back. The assistant can ask for read_only: false only when fbadmin allows it (FBADMIN_MCP_WRITES=1, or fbadmin mcp --allow-writes); the statements are then committed, and your fbadmin permissions still apply. Statements time out after 60 seconds.

Same rules as the browser. Each tool call runs through fbadmin's REST API with your credentials: servers and databases you cannot see are not listed, hidden objects stay hidden, read-only servers and read-only API tokens refuse changes, and the audit log records the SQL.

Connect an assistant

On your computer (desktop mode)

Assistants that start a local program use fbadmin mcp, which talks MCP over stdin and stdout and uses the servers registered in your fbadmin data directory, with their saved passwords. For Claude Desktop, add to claude_desktop_config.json:

{
  "mcpServers": {
    "fbadmin": { "command": "fbadmin", "args": ["mcp"] }
  }
}

For Claude Code: claude mcp add fbadmin -- fbadmin mcp. fbadmin is the command installed by pip install firebird-admin (use its full path if the assistant does not find it). --data-dir selects another data directory. If your saved passwords are encrypted with a master password, put it in FBADMIN_MASTER_PASSWORD in the env of the server entry.

fbadmin mcp is its own process: a password you typed in the fbadmin window without saving it is not known there, and the tools answer Password required. Tick Save password in the server dialog for the servers the assistant should use.

A shared fbadmin (server mode)

In server mode, create an API token (user menu → Sign-in & API tokens). A read-only token keeps the assistant read-only whatever FBADMIN_MCP_WRITES says. Then either:

  • point an assistant that supports remote MCP servers at https://fbadmin.example.com/api/mcp with the header Authorization: Bearer <token> (Streamable HTTP transport); or
  • run the stdio bridge on your computer, which forwards to the server:
{
  "mcpServers": {
    "fbadmin": {
      "command": "fbadmin",
      "args": ["mcp", "--url", "https://fbadmin.example.com"],
      "env": { "FBADMIN_TOKEN": "fbat_..." }
    }
  }
}

fbadmin mcp refuses a data directory in server mode without --url, so that a local process cannot bypass the server's sign-in and permissions.

Details

  • Protocol versions 2025-11-25, 2025-06-18, 2025-03-26 and 2024-11-05. The HTTP endpoint is stateless: POST /api/mcp answers each JSON-RPC message (or batch) with JSON; GET answers 405 (no server-to-client stream).
  • Like the rest of /api/, the endpoint refuses cross-site browser requests.
  • Results longer than 200,000 characters are cut.