Firebird SQL MCP server

Enables secure access to Firebird SQL databases through natural language, supporting table listing, schema descriptions, query execution, and field metadata retrieval with comprehensive security features like data masking and operation restrictions.
Back to servers
Setup instructions
Provider
JhonnySuarez
Release date
Mar 24, 2025
Language
TypeScript
Package
Stats
23.0K downloads
33 stars

MCP Firebird is an implementation of Anthropic's Model Context Protocol (MCP) that enables Large Language Models like Claude to access, analyze, and manipulate data in Firebird SQL databases. It provides a bridge between AI models and your database, allowing secure and controlled data operations through various transport methods.

Installation Options

Quick Start (Default - No Wire Encryption)

npx mcp-firebird@alpha --database=/path/to/database.fdb

Advanced Installation (With Wire Encryption Support)

Wire encryption requires the native driver and must be installed globally:

# Step 1: Install build tools (OS-dependent)
# Windows: Visual Studio Build Tools
# Linux: sudo apt-get install build-essential python3 firebird-dev
# macOS: xcode-select --install && brew install firebird

# Step 2: Install MCP Firebird globally
npm install -g mcp-firebird@alpha

# Step 3: Install native driver globally
npm install -g node-firebird-driver-native

# Step 4: Run directly (WITHOUT npx)
mcp-firebird --use-native-driver \
  --database=/path/to/database.fdb \
  --host=localhost \
  --user=SYSDBA \
  --password=masterkey

Manual Installation

# Stable version
npm install -g mcp-firebird

# Alpha version (latest features)
npm install -g mcp-firebird@alpha

Using with Claude Desktop

  1. Edit the Claude Desktop configuration file:
code $env:AppData\Claude\claude_desktop_config.json  # Windows
code ~/Library/Application\ Support/Claude/claude_desktop_config.json  # macOS
  1. Add the MCP Firebird configuration:
{
  "mcpServers": {
    "mcp-firebird": {
      "command": "npx",
      "args": [
        "mcp-firebird",
        "--host",
        "localhost",
        "--port",
        "3050",
        "--database",
        "C:\\path\\to\\database.fdb",
        "--user",
        "SYSDBA",
        "--password",
        "masterkey"
      ],
      "type": "stdio"
    }
  }
}
  1. Restart Claude Desktop

Transport Configuration Options

MCP Firebird supports multiple transport protocols:

STDIO Transport (Default for Claude Desktop)

{
  "mcpServers": {
    "mcp-firebird": {
      "command": "npx",
      "args": [
        "mcp-firebird",
        "--database", "C:\\path\\to\\database.fdb",
        "--user", "SYSDBA",
        "--password", "masterkey"
      ],
      "type": "stdio"
    }
  }
}

SSE Transport (Server-Sent Events)

# Start SSE server on default port 3003
npx mcp-firebird --transport-type sse --database /path/to/database.fdb

# Custom port and full configuration
npx mcp-firebird \
  --transport-type sse \
  --sse-port 3003 \
  --database /path/to/database.fdb \
  --host localhost \
  --port 3050 \
  --user SYSDBA \
  --password masterkey

SSE server endpoints:

  • SSE Endpoint: http://localhost:3003/sse
  • Messages Endpoint: http://localhost:3003/messages
  • Health Check: http://localhost:3003/health

Streamable HTTP Transport (Modern)

# Start with Streamable HTTP
npx mcp-firebird --transport-type http --http-port 3003 --database /path/to/database.fdb

Unified Transport (Recommended)

# Start unified server (supports both SSE and Streamable HTTP)
npx mcp-firebird --transport-type unified --http-port 3003 --database /path/to/database.fdb

Unified server endpoints:

  • SSE (Legacy): http://localhost:3003/sse
  • Streamable HTTP (Modern): http://localhost:3003/mcp
  • Auto-Detection: http://localhost:3003/mcp-auto
  • Health Check: http://localhost:3003/health

Environment Variables Configuration

You can configure MCP Firebird using environment variables:

# Set environment variables
export TRANSPORT_TYPE=sse
export SSE_PORT=3003
export DB_HOST=localhost
export DB_PORT=3050
export DB_DATABASE=/path/to/database.fdb
export DB_USER=SYSDBA
export DB_PASSWORD=masterkey

# Start server
npx mcp-firebird

Session Management

Configure session timeouts and limits:

# Environment variables for session management
export SSE_SESSION_TIMEOUT_MS=1800000    # 30 minutes
export MAX_SESSIONS=1000                 # Maximum concurrent sessions
export SESSION_CLEANUP_INTERVAL_MS=60000 # Cleanup every minute

npx mcp-firebird --transport-type sse

Troubleshooting

Firebird Connection Issues

  1. Wire Encryption Incompatibility (Firebird 3.0+)

    If you get Incompatible wire encryption levels requested on client and server error, you must either:

    • Use the native driver with wire encryption support
    • Disable wire encryption on the Firebird server by adding to firebird.conf:
    WireCrypt = Disabled
    AuthServer = Srp, Legacy_Auth
    
  2. Database Path Issues

    • Remote: server:/path/to/database.fdb
    • Unix absolute: /var/lib/firebird/database.fdb
    • IP-based: 192.168.1.100:/data/db.fdb
  3. Windows Path Issues

    If you encounter I/O error during CreateFile (open) operation, try:

    • Use all-uppercase paths: C:\MYDATA\DATABASE.FDB
    • Use forward slashes: C:/MyData/database.fdb

SSE Connection Issues

# Check if server is running
curl http://localhost:3003/health

# Increase session timeout
export SSE_SESSION_TIMEOUT_MS=3600000  # 1 hour

# Allow all origins (development only)
export CORS_ORIGIN="*"

# Enable debug logging
export LOG_LEVEL=debug

Cloud Deployment with Smithery

For cloud deployment, you can use Smithery:

npx -y @smithery/cli install @PuroDelphi/mcpFirebird --client claude

Using with AI Clients:

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const transport = new StreamableHTTPClientTransport(
  "https://server.smithery.ai/your-username/mcp-firebird"
);

const client = new Client({
  name: "my-ai-app",
  version: "1.0.0"
});

await client.connect(transport);

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "mcp-firebird" '{"command":"npx","args":["mcp-firebird","--host","localhost","--port","3050","--database","C:\\path\\to\\database.fdb","--user","SYSDBA","--password","masterkey"],"type":"stdio"}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "mcp-firebird": {
            "command": "npx",
            "args": [
                "mcp-firebird",
                "--host",
                "localhost",
                "--port",
                "3050",
                "--database",
                "C:\\path\\to\\database.fdb",
                "--user",
                "SYSDBA",
                "--password",
                "masterkey"
            ],
            "type": "stdio"
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "mcp-firebird": {
            "command": "npx",
            "args": [
                "mcp-firebird",
                "--host",
                "localhost",
                "--port",
                "3050",
                "--database",
                "C:\\path\\to\\database.fdb",
                "--user",
                "SYSDBA",
                "--password",
                "masterkey"
            ],
            "type": "stdio"
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later