Labsco
PuroDelphi logo

MCP Firebird

β˜… 56

from PuroDelphi

An MCP server for Firebird SQL databases, enabling LLMs to securely access, analyze, and manipulate database content.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup

Verified on MseeP

MCP Firebird

Implementation of Anthropic's MCP (Model Context Protocol) for Firebird databases.

What is MCP Firebird?

MCP Firebird is a server that implements Anthropic's Model Context Protocol (MCP) for Firebird SQL databases. It allows Large Language Models (LLMs) like Claude to access, analyze, and manipulate data in Firebird databases securely and in a controlled manner.

πŸš€ What's New in MCP 2.7+ (Performance & Security)

This server has been upgraded to support the latest enterprise standards in the MCP ecosystem:

  • ⚑ Connection Pooling (Zero Latency): Repetitive database queries now use persistent in-memory connections, completely bypassing handshake overhead and executing almost instantly.
  • 🎯 Proactive Events (Triggers): Native integration with Firebird's POST_EVENT. The server listens to database events in real-time and proactively notifies the AI client (e.g., Claude/n8n) without requiring continuous polling.
    • Quick Example: Ask your agent to subscribe_to_event with NEW_ORDER. When Firebird runs POST_EVENT 'NEW_ORDER', your agent gets instantly notified! Read detailed guide and examples.
  • πŸ›‘οΈ Enterprise-Managed Authorization (EMA): Don't want to expose your actual database password (SYSDBA) to the LLM client? Enable EMA to require an --api-key on incoming connections. The server intercepts this token and injects the real password securely under the hood.
    • Quick Example: Start the server with --password "real_password" --api-key "my-secure-token". The remote client connects using Authorization: Bearer my-secure-token. The database password never leaves the server! Read detailed guide in Security.
  • 🌊 Bidirectional Streaming (Streamable HTTP / SSE): Perfect for n8n or remote deployments. Provides real-time event streaming and stateful sessions across HTTP.
    • Quick Example: Start the server with TRANSPORT_TYPE=sse SSE_PORT=3003. Configure your client (like n8n) to connect to http://YOUR_SERVER:3003/mcp. Read detailed guide.

πŸ—οΈ Transport Modes & Architecture

MCP Firebird supports multiple deployment architectures. We highly recommend using Streamable HTTP (SSE) for modern, enterprise, or remote deployments.

1. [RECOMMENDED] Modern Transport (Streamable HTTP / SSE)

Ideal for connecting n8n, cloud platforms, remote agents, or tools that don't reside on the same machine as your database.

Installation:

npm install -g mcp-firebird

Run the Server: Set up your environment variables (or .env file):

export TRANSPORT_TYPE=sse
export SSE_PORT=3003

# Real database credentials protected on the server side:
export FIREBIRD_PASSWORD=masterkey 
# Enable EMA to protect external access:
export FIREBIRD_API_KEY=my_secret_token_123

mcp-firebird --database /path/to/database.fdb --user SYSDBA

Client Connection: Your AI client (e.g., MCP Inspector, n8n) connects to http://localhost:3003 and, thanks to EMA, only needs to provide the API KEY instead of the actual database password.

2. [LOCAL / LEGACY] Standard Transport (STDIO)

This is the classic method recommended only for personal use on the same machine (e.g., Claude Desktop). Claude spawns its own MCP Firebird subprocess in the background.

Key Features

  • SQL Queries: Execute SQL queries on Firebird databases
  • Schema Analysis: Get detailed information about tables, columns, and relationships
  • Database Metadata: Inspect triggers, stored procedures, functions, and packages with source code
  • Database Management: Perform backup, restore, and validation operations
  • Performance Analysis: Analyze query performance and suggest optimizations
  • Security: Includes SQL query validation, EMA, and Connection Pooling.
  • Dual Driver Support: Choose between simple installation (default) or native driver with wire encryption support.

πŸ”’ Wire Encryption Support

MCP Firebird supports two driver options:

DriverInstallationWire EncryptionUse Case
Pure JavaScript (default)βœ… Simple (npx)❌ NoMost users, quick setup
Native Driver (optional)⚠️ Complex (requires build tools)βœ… YesEnterprise, security required

Quick Start (Default - No Wire Encryption)

npx -y mcp-firebird --database=/path/to/database.fdb

Advanced (With Wire Encryption Support)

⚠️ CRITICAL: npx does NOT work with the native driver. You MUST install globally.

⚠️ IMPORTANT: Wire encryption must be configured on the Firebird server (firebird.conf), not on the client.

Server Configuration (required first):

# In firebird.conf on the server
WireCrypt = Required  # or Enabled

Client Installation (MUST be global):

# Step 1: Install build tools
# Windows: Visual Studio Build Tools (https://visualstudio.microsoft.com/downloads/)
# 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

# 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

Why not npx? When npx runs a package from its temporary cache, it cannot access globally installed modules like node-firebird-driver-native. Both packages must be installed globally in the same location.

πŸ“š For detailed installation instructions, see:

Manual Installation

Stable Version

# Global installation
npm install -g mcp-firebird

# Run the server
npx -y mcp-firebird --database /path/to/database.fdb

Stable Features (v2.2.3):

  • πŸ› FIXED: SSE JSON parsing bug - resolves "Invalid message: [object Object]" errors
  • ✨ Streamable HTTP transport support (MCP 2025-03-26)
  • πŸ”„ Unified server with automatic protocol detection
  • πŸ“Š Enhanced session management and monitoring
  • πŸ› οΈ Modern MCP SDK integration (v1.13.2)
  • πŸ”§ Improved error handling and logging
  • πŸ§ͺ Comprehensive test suite with 9+ tests for SSE functionality

Alpha Version (Latest Features)

# Install alpha version with latest features
npm install -g mcp-firebird@alpha

# Or use specific alpha version
npm install -g mcp-firebird@2.4.0-alpha.0

Alpha Features (v2.4.0-alpha.0):

  • οΏ½ NEW: Ready for next development cycle
  • ✨ All stable features from v2.2.3 included
  • πŸ”„ Unified server with automatic protocol detection
  • πŸ“Š Enhanced session management and monitoring
  • πŸ› οΈ Modern MCP SDK integration (v1.13.2)
  • πŸ”§ Improved error handling and logging
  • πŸ§ͺ Comprehensive test suite with 9+ tests for SSE functionality
  • πŸ“š Enhanced documentation with troubleshooting guides

Note: The SSE JSON parsing bug fix is now available in stable v2.2.3

For backup/restore operations, you'll need to install the Firebird client tools. See Complete Installation for more details.

For VSCode and GitHub Copilot integration, see VSCode Integration.

Documentation

For more detailed information, check the following documents:

Getting Started

Transport Protocols

Integration Guides

Advanced Topics

Examples and Use Cases

Support the Project

Donations

If you find MCP Firebird useful for your work or projects, please consider supporting its development through a donation. Your contributions help maintain and improve this tool.

image

Hire Our AI Agents

Another great way to support this project is by hiring our AI agents through Asistentes AutΓ³nomos. We offer specialized AI assistants for various business needs, helping you automate tasks and improve productivity.

Priority Support

⭐ Donors, sponsors, and clients receive priority support and assistance with issues, feature requests, and implementation guidance. While we strive to help all users, those who support the project financially will receive faster response times and dedicated assistance.

Your support is greatly appreciated and helps ensure the continued development of MCP Firebird!

License

This project is licensed under the MIT License - see the LICENSE file for details.