Token导航 LogoToken导航TokenDH.com
MCP Firebird logo
数据服务stdio官方级别未说明来源级核验

MCP Firebird

MCP Server

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.

工具数

20

提示词数

0

GitHub Stars

53

资源数

0
数据分析数据库连接JavaScriptClaude性能优化ClaudeClaude DesktopCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

PuroDelphi

提供方

PuroDelphi

最后核验

2026/5/18 02:20

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx mcp-firebird --host localhost --port 3050 --database C:\\\\Databases\\\\example.fdb --user SYSDBA --password masterk...

详细介绍

![Verified on MseeP](https://mseep.ai/app/1cb2bb07-00f4-4579-b535-1b9de9b451e9)

MCP火鸟

](https://smithery.ai/server/@PuroDelphi/mcpFirebird)

为Firebird数据库实现Anthropic的MCP(模型上下文协议)。

示例用法

https://github.com/user-attachments/assets/e68e873f-f87b-4afd-874f-157086e223af

什么是MCP火鸟?

主要特点

  • sql查询:在Firebird数据库上执行SQL查询
  • 模式分析:获取有关表、列和关系的详细信息
  • 数据库管理:执行备份、还原和验证操作
  • 性能分析:分析查询性能并提出优化建议
  • 多个传输:支持STDIO、SSE(服务器发送事件)和流式HTTP传输
  • 现代协议支持:完全支持MCP流式HTTP(2025-03-26)和传统SSE
  • 统一服务器:自动协议检测和向后兼容性
  • 克劳德集成:与Claude Desktop和其他MCP客户端无缝协作
  • VSCode集成:在Visual Studio代码中与GitHub Copilot配合使用
  • 会话管理:具有自动清理和可配置超时功能的强大会话处理
  • 安全:包括SQL查询验证和安全配置选项
  • 双驱动程序支持:在简单安装(默认)或支持有线加密的本机驱动程序之间进行选择

🚀 Smithery快速入门(建议用于云部署)

在5分钟内将MCP Firebird部署到云端!

](https://smithery.ai/server/@PuroDelphi/mcpFirebird)

史密瑟里 是将MCP Firebird部署到生产环境的最简单方法:

一键部署 -无需基础设施设置 ✅ 自动缩放 -自动处理流量峰值 ✅ 内置监控 -跟踪使用情况和性能 ✅ 安全凭据 -加密环境变量 ✅ 自动更新 -始终运行最新版本 ✅ 全球CDN -全球低延迟

如何在Smithery部署

  1. 访问 史密斯艾
  2. 连接 您的GitHub帐户
  3. 选择mcpFirebird 仓库
  4. 配置 您的Firebird数据库连接:
   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"
  1. 单击部署 -完成! ✨

您的MCP Firebird服务器将在以下网址提供:

https://server.smithery.ai/your-username/mcp-firebird

与AI客户端一起使用

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);

📚 有关Smithery部署的详细说明,请参阅 微笑_深度.md

🔒 有线加密支持

MCP Firebird支持 两种驾驶员选项:

驱动程序安装有线加密用例
纯JavaScript (默认)✅ 简单(npx)❌ 否大多数用户,快速设置
本机驱动程序 (可选)⚠️ 复杂(需要构建工具)✅ 是企业,需要安全

快速启动(默认-无线加密)

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

高级(支持有线加密)

⚠️ 关键的: npx 不适用于本地驱动程序。您必须全局安装。

⚠️ 重要:必须在上配置有线加密 Firebird服务器 (firebird.conf)而不是在客户身上。

服务器配置 (先要求):

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

客户端安装 (必须是全球性的):

# 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@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

为什么不是npx?npx 从临时缓存运行包,它无法访问全局安装的模块,如 node-firebird-driver-native。这两个软件包必须全局安装在同一位置。

📚 有关详细的安装说明,请参阅:

🖥️ 使用Smithery CLI进行本地安装

⭐ 推荐用于本地AI客户端(Claude Desktop、Cursor等)

Smithery CLI提供了安装和配置MCP Firebird以供本地使用的最简单方法:

快速安装

# Interactive installation (prompts for configuration)
npx -y @smithery/cli@latest install mcp-firebird --client claude

# Pre-configured installation (skip prompts)
npx -y @smithery/cli@latest install mcp-firebird --client claude --config '{
  "database": "/path/to/database.fdb",
  "user": "SYSDBA",
  "password": "masterkey",
  "useNativeDriver": false
}'

特性

  • 一个命令安装 -无需手动配置
  • 多个客户端 -适用于Claude Desktop、Cursor等
  • 交互式设置 -提示所有必需的设置
  • 自动配置 -自动配置您的AI客户端
  • 易于管理 -轻松列出、检查和卸载服务器

常用命令

# List installed servers
npx @smithery/cli list servers --client claude

# Inspect server configuration
npx @smithery/cli inspect mcp-firebird

# Uninstall server
npx @smithery/cli uninstall mcp-firebird --client claude

📖 完整指南: Smithery CLI安装指南

手动安装

稳定版本

# Global installation (stable)
npm install -g mcp-firebird

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

# Or use specific stable version
npm install -g mcp-firebird@2.2.3

稳定功能(v2.2.3):

  • 🐛 固定的:SSE JSON解析错误-解决“无效消息:\[object object\]”错误
  • ✨ 流式HTTP传输支持(MCP 2025-03-26)
  • 🔄 具有自动协议检测功能的统一服务器
  • 📊 增强会话管理和监控
  • 🛠️ 现代MCP SDK集成(v1.13.2)
  • 🔧 改进了错误处理和日志记录
  • 🧪 全面的测试套件,包含9个以上的SSE功能测试

Alpha版本(最新功能)

# 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功能(v2.4.0-Alpha.0):

  • :为下一个开发周期做好准备
  • ✨ 包括v2.2.3的所有稳定功能
  • 🔄 具有自动协议检测功能的统一服务器
  • 📊 增强会话管理和监控
  • 🛠️ 现代MCP SDK集成(v1.13.2)
  • 🔧 改进了错误处理和日志记录
  • 🧪 全面的测试套件,包含9个以上的SSE功能测试
  • 📚 通过故障排除指南增强文档

备注:SSE JSON解析错误修复现已在稳定的v2.2.3中提供

对于备份/还原操作,您需要安装Firebird客户端工具。看 完整安装 了解更多详情。

有关VSCode和GitHub Copilot集成,请参阅 VSCode集成.

基本用法

使用克劳德桌面

  1. 编辑Claude Desktop配置:
   code $env:AppData\Claude\claude_desktop_config.json  # Windows
   code ~/Library/Application\ Support/Claude/claude_desktop_config.json  # macOS
  1. 添加MCP Firebird配置:
   {
     "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. 重新启动克劳德桌面

传输配置

MCP Firebird支持多种传输协议,以适应不同的客户端需求和部署场景。

STDIO传输(默认)

STDIO传输是Claude Desktop集成的标准方法:

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

SSE传输(服务器发送事件)

SSE传输允许服务器作为web服务运行,这对于web应用程序和远程访问非常有用:

基本SSE配置

# 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的环境变量

# 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

SSE客户端连接

SSE服务器运行后,客户端可以连接到:

  • SSE端点: http://localhost:3003/sse
  • 消息端点: http://localhost:3003/messages
  • 健康检查: http://localhost:3003/health

流式HTTP传输(现代)

支持双向通信的最新MCP协议:

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

统一运输(推荐)

同时支持SSE和Streamable HTTP协议,并具有自动检测功能:

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

统一服务器端点

  • SSE(传统): http://localhost:3003/sse
  • 流式HTTP(现代): http://localhost:3003/mcp
  • 自动检测: http://localhost:3003/mcp-auto
  • 健康检查: http://localhost:3003/health

配置示例

开发设置(SSE)

npx mcp-firebird \
  --transport-type sse \
  --sse-port 3003 \
  --database ./dev-database.fdb \
  --user SYSDBA \
  --password masterkey

生产设置(统一)

npx mcp-firebird \
  --transport-type unified \
  --http-port 3003 \
  --database /var/lib/firebird/production.fdb \
  --host db-server \
  --port 3050 \
  --user APP_USER \
  --password $DB_PASSWORD

Docker与SSE

docker run -d \
  --name mcp-firebird \
  -p 3003:3003 \
  -e TRANSPORT_TYPE=sse \
  -e SSE_PORT=3003 \
  -e DB_DATABASE=/data/database.fdb \
  -v /path/to/database:/data \
  purodelhi/mcp-firebird:latest

高级SSE配置

会话管理

配置会话超时和限制:

# 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

CORS配置

对于web应用程序,配置CORS设置:

# Allow specific origins
export CORS_ORIGIN="https://myapp.com,https://localhost:3000"
export CORS_METHODS="GET,POST,OPTIONS"
export CORS_HEADERS="Content-Type,mcp-session-id"

npx mcp-firebird --transport-type sse

SSL/TLS支持

对于生产部署,使用nginx等反向代理:

server {
    listen 443 ssl;
    server_name mcp-firebird.yourdomain.com;

    ssl_certificate /path/to/cert.pem;
    ssl_certificate_key /path/to/key.pem;

    location / {
        proxy_pass http://localhost:3003;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

故障排除

Firebird连接问题

  1. 有线加密不兼容(Firebird 3.0+) ⚠️ 关键的

错误: Incompatible wire encryption levels requested on client and server

重要:The node-firebird 库不支持Firebird 3.0+有线加密。这 --wire-crypt 参数不起作用。

唯一解决方案:您必须在Firebird服务器上禁用有线加密:

对于Firebird 3.0,添加 firebird.conf:

   WireCrypt = Disabled
   AuthServer = Srp, Legacy_Auth

对于Firebird 4.0+,添加到 firebird.conf:

   WireCrypt = Disabled
   AuthServer = Srp256, Srp, Legacy_Auth

对于Firebird 5.0 Docker:

   environment:
     FIREBIRD_CONF_WireCrypt: Disabled
     FIREBIRD_CONF_AuthServer: Srp256, Srp

如果您无法更改服务器配置,请参阅 有线加密限制 对于替代方案。

  1. Linux/Unix上的数据库路径问题

问题:远程连接字符串或Unix路径不起作用

解决方案:这在v2.4.0-alpha.1+中已修复。以下路径现在可以正常工作:

- 远程: server:/path/to/database.fdb - Unix绝对值: /var/lib/firebird/database.fdb - 基于IP: 192.168.1.100:/data/db.fdb

  1. Windows上混合大小写路径的I/O错误

错误: I/O error during CreateFile (open) operation

问题:混合情况下的数据库路径(例如。, C:\MyData\database.fdb)导致错误

权变措施:

- 使用所有大写路径: C:\MYDATA\DATABASE.FDB - 使用正斜杠: C:/MyData/database.fdb - 看 有线加密修复文档 详情请见

SSE连接问题

  1. 连接被拒绝
   # Check if server is running
   curl http://localhost:3003/health

   # Check port availability
   netstat -an | grep 3003
  1. 会话超时
   # Increase session timeout
   export SSE_SESSION_TIMEOUT_MS=3600000  # 1 hour
  1. CORS错误
   # Allow all origins (development only)
   export CORS_ORIGIN="*"
  1. 内存问题
   # Reduce max sessions
   export MAX_SESSIONS=100

   # Enable more frequent cleanup
   export SESSION_CLEANUP_INTERVAL_MS=30000
  1. JSON解析问题(在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 sse

备注:2.3.0-alpha 1之前的版本有一个错误,POST请求 /messages 终结点未能正确解析JSON正文。此问题已通过改进得到解决 两者的中间件处理 application/jsontext/plain 内容类型。

监控和日志记录

# Enable debug logging
export LOG_LEVEL=debug

# Monitor server health
curl http://localhost:3003/health | jq

# Check active sessions
curl http://localhost:3003/health | jq '.sessions'

通过Smithery快速安装

通过以下方式自动安装MCP Firebird for Claude Desktop 史密瑟里:

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

文档

有关更多详细信息,请查看以下文件:

入门指南

传输协议

集成指南

高级主题

示例和用例

支持项目

捐款

如果您发现MCP Firebird对您的工作或项目有用,请考虑通过捐款支持其开发。您的贡献有助于维护和改进此工具。

image

雇佣我们的人工智能代理

支持这个项目的另一个好方法是通过以下方式雇佣我们的人工智能代理 自营职业者。我们为各种业务需求提供专业的人工智能助手,帮助您自动化任务并提高生产力。

优先支持

捐助者、赞助商和客户获得优先支持和援助 包括问题、功能请求和实现指导。在我们努力帮助所有用户的同时,那些在财务上支持该项目的人将获得更快的响应时间和专门的帮助。

非常感谢您的支持,这有助于确保MCP Firebird的持续发展!

许可证

此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。

目录标签

目录标签

数据分析数据库连接JavaScriptClaude性能优化mcp-firebirddatabasemcp-protocolTypeScript本地部署LLM集成SQL查询数据库管理

支持客户端

ClaudeClaude DesktopCursor

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

mcp-firebird

工具数量(toolCount,工具数)

20

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP