MCP Firebird is a server that allows Large Language Models (LLMs) to interact with Firebird databases securely and efficiently via the Model Context Protocol. With this server, you can:
Execute SQL Queries: Run SQL queries with support for pagination and parameterized queries
Schema Analysis: List tables, describe table schemas, and retrieve field descriptions
Query Performance: Analyze query performance, get execution plans, and identify missing indexes
Database Management: Perform backup, restore, and integrity validation operations
Security: Validate SQL queries with built-in security features
Connectivity: Test server connectivity and echo messages for debugging
Integration: Works with Claude Desktop, GitHub Copilot, and VSCode
Multiple Transports: Supports STDIO and SSE (Server-Sent Events) communication
Provides integration examples for Delphi applications to connect with the MCP Firebird server, allowing Delphi programs to execute SQL queries, list database tables, and generate SQL through the MCP protocol.
Offers Docker configuration for containerized deployment of the MCP Firebird server alongside a Firebird database, with detailed Dockerfile and docker-compose examples for production use.
Offers JavaScript client examples for integrating with the MCP Firebird server, allowing JavaScript applications to execute queries and manage Firebird database data.
Includes Python client examples for connecting to the MCP server, enabling Python applications to execute SQL queries and interact with Firebird databases through the MCP protocol.
Provides TypeScript client examples for integrating with the MCP server, enabling TypeScript applications to execute database queries and interact with Firebird databases through the MCP protocol.
Uses Zod for input validation as part of the server's security measures, ensuring that all inputs to the MCP server are properly validated before processing.
MCP Firebird
Implementation of Anthropic's MCP (Model Context Protocol) for Firebird databases.
Example Usage
https://github.com/user-attachments/assets/e68e873f-f87b-4afd-874f-157086e223af
Related MCP server: Quick-start Auto MCP
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.
Key Features
SQL Queries: Execute SQL queries on Firebird databases
Schema Analysis: Get detailed information about tables, columns, and relationships
Database Management: Perform backup, restore, and validation operations
Performance Analysis: Analyze query performance and suggest optimizations
Multiple Transports: Supports STDIO, SSE (Server-Sent Events), and Streamable HTTP transports
Modern Protocol Support: Full support for MCP Streamable HTTP (2025-03-26) and legacy SSE
Unified Server: Automatic protocol detection and backwards compatibility
Claude Integration: Works seamlessly with Claude Desktop and other MCP clients
VSCode Integration: Works with GitHub Copilot in Visual Studio Code
Session Management: Robust session handling with automatic cleanup and configurable timeouts
Security: Includes SQL query validation and security configuration options
Dual Driver Support: Choose between simple installation (default) or native driver with wire encryption support
๐ Quick Start with Smithery (Recommended for Cloud Deployment)
Deploy MCP Firebird to the cloud in under 5 minutes!
Smithery is the easiest way to deploy MCP Firebird to production:
โ One-click deployment - No infrastructure setup required โ Automatic scaling - Handles traffic spikes automatically โ Built-in monitoring - Track usage and performance โ Secure credentials - Encrypted environment variables โ Auto-updates - Always running the latest version โ Global CDN - Low latency worldwide
How to Deploy on Smithery
Visit smithery.ai
Connect your GitHub account
Select the
mcpFirebirdrepositoryConfigure your Firebird database connection:
host: "your-firebird-server.com" port: 3050 database: "/path/to/database.fdb" user: "SYSDBA" password: "your-secure-password" useNativeDriver: true # Enable wire encryption (optional) logLevel: "info"Click Deploy - Done! โจ
Your MCP Firebird server will be available at:
Using with AI Clients
๐ For detailed Smithery deployment instructions, see
๐ Wire Encryption Support
MCP Firebird supports two driver options:
Driver | Installation | Wire Encryption | Use Case |
Pure JavaScript (default) | โ
Simple ( | โ No | Most users, quick setup |
Native Driver (optional) | โ ๏ธ Complex (requires build tools) | โ Yes | Enterprise, security required |
Quick Start (Default - No Wire Encryption)
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):
Client Installation (MUST be global):
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:
Smithery CLI Installation Guide - โญ Recommended for local setup
Native Driver Installation Guide - Step-by-step for Windows/Linux/macOS
๐ฅ๏ธ Local Installation with Smithery CLI
โญ Recommended for local AI clients (Claude Desktop, Cursor, etc.)
The Smithery CLI provides the easiest way to install and configure MCP Firebird for local use:
Quick Install
Features
โ One-command installation - No manual configuration needed
โ Multiple clients - Works with Claude Desktop, Cursor, and more
โ Interactive setup - Prompts for all required settings
โ Auto-configuration - Automatically configures your AI client
โ Easy management - List, inspect, and uninstall servers easily
Common Commands
๐ Full Guide: Smithery CLI Installation Guide
Manual Installation
Stable Version
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)
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.
Basic Usage
With Claude Desktop
Edit the Claude Desktop configuration:
code $env:AppData\Claude\claude_desktop_config.json # Windows code ~/Library/Application\ Support/Claude/claude_desktop_config.json # macOSAdd 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" } } }Restart Claude Desktop
Transport Configuration
MCP Firebird supports multiple transport protocols to accommodate different client needs and deployment scenarios.
STDIO Transport (Default)
The STDIO transport is the standard method for Claude Desktop integration:
SSE Transport (Server-Sent Events)
SSE transport allows the server to run as a web service, useful for web applications and remote access:
Basic SSE Configuration
Environment Variables for SSE
SSE Client Connection
Once the SSE server is running, clients can connect to:
SSE Endpoint:
http://localhost:3003/sseMessages Endpoint:
http://localhost:3003/messagesHealth Check:
http://localhost:3003/health
Streamable HTTP Transport (Modern)
The latest MCP protocol supporting bidirectional communication:
Unified Transport (Recommended)
Supports both SSE and Streamable HTTP protocols simultaneously with automatic detection:
Unified Server Endpoints
SSE (Legacy):
http://localhost:3003/sseStreamable HTTP (Modern):
http://localhost:3003/mcpAuto-Detection:
http://localhost:3003/mcp-autoHealth Check:
http://localhost:3003/health
Configuration Examples
Development Setup (SSE)
Production Setup (Unified)
Docker with SSE
Advanced SSE Configuration
Session Management
Configure session timeouts and limits:
CORS Configuration
For web applications, configure CORS settings:
SSL/TLS Support
For production deployments, use a reverse proxy like nginx:
Troubleshooting
Firebird Connection Issues
Wire Encryption Incompatibility (Firebird 3.0+) โ ๏ธ CRITICAL
Error:
Incompatible wire encryption levels requested on client and serverIMPORTANT: The
node-firebirdlibrary does NOT support Firebird 3.0+ wire encryption. The--wire-cryptparameter does NOT work.ONLY Solution: You MUST disable wire encryption on the Firebird server:
For Firebird 3.0, add to
firebird.conf:WireCrypt = Disabled AuthServer = Srp, Legacy_AuthFor Firebird 4.0+, add to
firebird.conf:WireCrypt = Disabled AuthServer = Srp256, Srp, Legacy_AuthFor Firebird 5.0 Docker:
environment: FIREBIRD_CONF_WireCrypt: Disabled FIREBIRD_CONF_AuthServer: Srp256, SrpIf you cannot change server configuration, see Wire Encryption Limitation for alternatives.
Database Path Issues on Linux/Unix
Problem: Remote connection strings or Unix paths not working
Solution: This is fixed in v2.4.0-alpha.1+. The following paths now work correctly:
Remote:
server:/path/to/database.fdbUnix absolute:
/var/lib/firebird/database.fdbIP-based:
192.168.1.100:/data/db.fdb
I/O Error with Mixed-Case Paths on Windows
Error:
I/O error during CreateFile (open) operationProblem: Database path with mixed case (e.g.,
C:\MyData\database.fdb) causes errorsWorkarounds:
Use all-uppercase paths:
C:\MYDATA\DATABASE.FDBUse forward slashes:
C:/MyData/database.fdbSee Wire Encryption Fix Documentation for more details
SSE Connection Issues
Connection Refused
# Check if server is running curl http://localhost:3003/health # Check port availability netstat -an | grep 3003Session Timeout
# Increase session timeout export SSE_SESSION_TIMEOUT_MS=3600000 # 1 hourCORS Errors
# Allow all origins (development only) export CORS_ORIGIN="*"Memory Issues
# Reduce max sessions export MAX_SESSIONS=100 # Enable more frequent cleanup export SESSION_CLEANUP_INTERVAL_MS=30000JSON Parsing Issues (Fixed in v2.3.0-alpha.1+)
# If experiencing "Invalid message: [object Object]" errors, # upgrade to the latest alpha version: npm install mcp-firebird@alpha # Or use the latest alpha directly: npx mcp-firebird@alpha --transport-type sseNote: Versions prior to 2.3.0-alpha.1 had a bug where POST requests to
/messagesendpoint failed to parse JSON body correctly. This has been fixed with improved middleware handling for bothapplication/jsonandtext/plaincontent types.
Monitoring and Logging
Quick Installation via Smithery
To install MCP Firebird for Claude Desktop automatically via Smithery:
Documentation
For more detailed information, check the following documents:
Getting Started
Resources, Tools, and Prompts Reference - Complete guide to all MCP capabilities
Transport Protocols
Integration Guides
Advanced Topics
Wire Encryption Fix - Firebird 3.0+ compatibility and Linux path fix
SSE JSON Parsing Fix - Details about the v2.3.0-alpha.1 bug fix
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.
GitHub Sponsors: Sponsor @PuroDelphi
PayPal: Donate via PayPal
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.