Firebird Model Context Protocol (MCP) Server

2.6.0 · active · verified Wed Apr 22

mcp-firebird is a server implementation of Anthropic's Model Context Protocol (MCP) specifically designed for Firebird SQL databases. It enables AI agents, such as Claude Desktop, to securely and efficiently interact with Firebird databases for various tasks including schema inspection, executing read-only or write SQL queries, analyzing table structures, and generating SQL from natural language descriptions. The package, currently at version 2.6.0, provides a robust interface to unlock valuable data in Firebird systems for AI-driven applications. It supports Server-Sent Events (SSE) for real-time data streaming and offers enhanced command-line parameter handling and environment variable configuration. Developed by PuroDelphi, it is actively maintained with ongoing feature enhancements and performance optimizations, making it a comprehensive toolkit for integrating Firebird with modern AI workflows. Key differentiators include its dedicated focus and comprehensive features for Firebird within the MCP ecosystem, offering more extensive management and analysis tools compared to simpler, older implementations.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates how to run the mcp-firebird server using `npx`, configuring it via both command-line arguments and environment variables for connecting to a Firebird database and enabling SSE transport.

import { spawn } from 'child_process';

const databasePath = process.env.FIREBIRD_DATABASE_PATH ?? '/firebird/data/test_db.fdb';
const user = process.env.FIREBIRD_USER ?? 'SYSDBA';
const password = process.env.FIREBIRD_PASSWORD ?? 'masterkey';
const host = process.env.FIREBIRD_HOST ?? 'localhost';
const port = process.env.FIREBIRD_PORT ?? '3050';

// Example of running mcp-firebird via npx with environment variables and CLI arguments
const mcpFirebirdProcess = spawn('npx', [
  'mcp-firebird',
  '--database', databasePath,
  '--user', user,
  '--password', password,
  '--host', host,
  '--port', port,
  '--transport', 'sse', // Use Server-Sent Events transport
  '--sse-port', '3003' // Specify SSE port
], {
  stdio: 'inherit',
  env: { ...process.env, 
    LOG_LEVEL: 'debug' // Example of an additional environment variable
  }
});

mcpFirebirdProcess.on('error', (err) => {
  console.error('Failed to start mcp-firebird process:', err);
});

mcpFirebirdProcess.on('exit', (code) => {
  console.log(`mcp-firebird process exited with code ${code}`);
});

console.log('MCP Firebird server started. Connect your AI client (e.g., Claude Desktop) to this server.');
console.log(`Database: ${databasePath}, User: ${user}, Host: ${host}, Port: ${port}`);
console.log('SSE Transport active on port 3003.');

view raw JSON →