Back to portfolio

+ Project

Firebird MCP Server

2025

C#.NET 9MCPFirebird SQL

An MCP (Model Context Protocol) server that connects AI assistants like Claude directly to Firebird databases. Once configured, Claude can inspect schema, run queries, and execute DDL or DML without you copy-pasting anything.

The server reads connection details from FlameRobin's existing fr_databases.conf file. If you already have FlameRobin set up with your databases, the server works out of the box. No extra config files, no connection strings to manage.

Built on the native Firebird .NET driver, which means wire encryption works by default. All registered databases are available in a single session, so you can query across databases without restarting anything.

View on GitHub

+ vs mcpFirebird

This projectmcpFirebird
CredentialsRead automatically from FlameRobin's configMust pass --user, --password, --host, --database on every launch
Multi-databaseAll FlameRobin-registered databases available in one sessionSingle database per server instance
Wire encryptionSupported via native .NET Firebird driverNot supported, requires WireCrypt=Disabled on the server
Runtime.NET 9 self-contained executableNode.js / npm
Schema introspectionTables, views, procedures, triggers, generators, roles, FK/PK/constraints, execution plans, missing indexesTables and basic schema
DDL / DML / scriptsYesSQL execution only

+ Claude Desktop Setup

Build a self-contained executable with dotnet publish, then add it to claude_desktop_config.json:

{
  "mcpServers": {
    "firebird": {
      "command": "C:\\path\\to\\FirebirdMcp.exe",
      "env": {
        "Logging__LogLevel__Default": "None"
      }
    }
  }
}

The Logging__LogLevel__Default=None env var is required. Startup log output goes to stdout, which Claude reads as part of the MCP handshake, so any unexpected output breaks the connection.

+ Tools

Discovery

  • ListDatabasesList all servers and databases registered in FlameRobin
  • GetSchemaSummaryCompact overview of every table: columns, PK, and FK counts
  • SearchSchemaFind tables or columns whose names match a pattern

Schema Inspection

  • InspectTableFull structural detail for a table: columns, PK, indexes, and FKs in one call
  • ListObjectsList tables, views, or both with optional name filter
  • DescribeTableColumn definitions with types, lengths, nullability, and defaults
  • GetForeignKeysFK relationships for a table in either or both directions
  • GetTableConstraintsPK, FK, UNIQUE, and CHECK constraints
  • GetCheckConstraintsThe actual expression behind each CHECK constraint
  • GetViewSourceThe SELECT statement that defines a view

Procedures, Triggers and Generators

  • ListProceduresList stored procedures with optional filter
  • DescribeProcedureInput and output parameter signatures without the full body
  • GetProcedureSourceFull PSQL source of a stored procedure
  • ListTriggersList triggers with their parent table
  • GetTriggerSourceFull PSQL source of a trigger
  • ListGeneratorsGenerators/sequences with current values
  • GetNextGeneratorValueAdvance a generator and return the new value
  • ListRolesRoles defined in the database

Querying and Analysis

  • RunQueryExecute a SELECT and return results as row objects
  • SampleTableReturn a small sample of rows without writing SQL
  • CountRowsCount rows in a table, optionally filtered by a WHERE clause
  • GetDistinctValuesDistinct values for a column, ordered by frequency
  • GetExecutionPlanExecution plan for a SELECT to detect full-table scans
  • AnalyzeMissingIndexesWhich columns lack indexes; optionally scoped to a subset

Monitoring and Writes

  • GetDatabaseInfoODS version, page size, dialect, and other file metadata
  • ListActiveConnectionsActive connections to the database
  • ExecuteDdlExecute a single CREATE/ALTER/DROP statement and commit
  • ExecuteDmlExecute INSERT, UPDATE, or DELETE and commit
  • ExecuteScriptExecute multiple semicolon-separated statements