firebird-mcp 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- firebird_mcp-0.1.0/LICENSE +21 -0
- firebird_mcp-0.1.0/PKG-INFO +420 -0
- firebird_mcp-0.1.0/README.md +407 -0
- firebird_mcp-0.1.0/firebird_mcp/__init__.py +3 -0
- firebird_mcp-0.1.0/firebird_mcp/analyzer.py +244 -0
- firebird_mcp-0.1.0/firebird_mcp/connection.py +573 -0
- firebird_mcp-0.1.0/firebird_mcp/inspector.py +220 -0
- firebird_mcp-0.1.0/firebird_mcp/server.py +281 -0
- firebird_mcp-0.1.0/firebird_mcp/telemetry.py +124 -0
- firebird_mcp-0.1.0/firebird_mcp.egg-info/PKG-INFO +420 -0
- firebird_mcp-0.1.0/firebird_mcp.egg-info/SOURCES.txt +17 -0
- firebird_mcp-0.1.0/firebird_mcp.egg-info/dependency_links.txt +1 -0
- firebird_mcp-0.1.0/firebird_mcp.egg-info/entry_points.txt +2 -0
- firebird_mcp-0.1.0/firebird_mcp.egg-info/requires.txt +4 -0
- firebird_mcp-0.1.0/firebird_mcp.egg-info/top_level.txt +1 -0
- firebird_mcp-0.1.0/pyproject.toml +19 -0
- firebird_mcp-0.1.0/setup.cfg +4 -0
- firebird_mcp-0.1.0/tests/test_connection_rules.py +250 -0
- firebird_mcp-0.1.0/tests/test_safety_rules.py +128 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lucas Gabriel dos Santos
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: firebird-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Open-source community MCP Server for Firebird Database (2.5 to 5.0) - Multi-database, execution plans and inspection
|
|
5
|
+
Requires-Python: >=3.10
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Dist: mcp>=1.0.0
|
|
9
|
+
Requires-Dist: firebirdsql>=1.2.2
|
|
10
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
11
|
+
Requires-Dist: passlib>=1.7.4
|
|
12
|
+
Dynamic: license-file
|
|
13
|
+
|
|
14
|
+
# Firebird MCP Server π₯
|
|
15
|
+
|
|
16
|
+
[](LICENSE)
|
|
17
|
+
[](https://modelcontextprotocol.io)
|
|
18
|
+
[](https://www.python.org/downloads/)
|
|
19
|
+
[](https://www.firebirdsql.org)
|
|
20
|
+
|
|
21
|
+
> π **Language / Idioma:** **English** | [PortuguΓͺs (Brasil)](README.pt-BR.md)
|
|
22
|
+
|
|
23
|
+
Open-source **Model Context Protocol (MCP)** server for **Firebird Database**, developed for free and independent community use with support for all major releases (**Firebird 2.5, 3.0, 4.0, and 5.0**).
|
|
24
|
+
|
|
25
|
+
Built according to the **open industry standards for MCP servers (stdio / JSON-RPC 2.0)**, ensuring turnkey compatibility with **any AI client or IDE**: **Google Antigravity IDE**, **Cursor**, **Claude Desktop**, **VS Code (with Cline / Roo Code / Copilot extensions)**, **Windsurf**, **Zed**, and CLI tools.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## π― Key Highlights
|
|
30
|
+
|
|
31
|
+
1. **Pure Python Wire Protocol (Zero DLL Dependencies)**:
|
|
32
|
+
- Connects directly over TCP (default port `3050`) using pure Python (`firebirdsql`).
|
|
33
|
+
- Requires no native C/C++ compilation and eliminates the need to install `fbclient.dll` (Windows) or `libfbclient.so` (Linux) on the host running the AI client or IDE.
|
|
34
|
+
- Fully compatible with legacy authentication (`Legacy_Auth` in FB 2.5) as well as modern pluggable SRP authentication in FB 3.0, 4.0, and 5.0.
|
|
35
|
+
2. **Multi-Database Support per Project**:
|
|
36
|
+
- Allows a single project workspace to declare and manage multiple databases (e.g., `main`, `audit_logs`, `staging`), switching dynamically via chat prompts or tool arguments.
|
|
37
|
+
3. **Workspace Auto-Discovery (`.firebird-mcp.json`)**:
|
|
38
|
+
- Automatically detects database configuration files placed at the root of your project or repository.
|
|
39
|
+
4. **Execution Plan & Performance Analysis (`PLAN`)**:
|
|
40
|
+
- Compiles queries to extract the Firebird optimizer's execution plan (`PLAN`) without scanning entire datasets, detecting unindexed full-table scans (`NATURAL SCAN`) and memory/disk sorting bottlenecks (`SORT`).
|
|
41
|
+
5. **Strict Query Safety & MVCC Best Practices**:
|
|
42
|
+
- `fb_query` enforces read-only operations (`SELECT`), guarding against accidental data modification.
|
|
43
|
+
- Commits read transactions immediately upon completion, preventing **OAT (*Oldest Active Transaction*)** stalls, garbage collection starvation, and runaway `.fdb` database file growth.
|
|
44
|
+
6. **Broad System Catalog Mapping**:
|
|
45
|
+
- Comprehensive introspection of Firebird system catalog tables (`RDB$`), supporting types across versions: `BOOLEAN` (FB3+), `INT128`, `DECFLOAT(16/34)`, `TIMESTAMP WITH TIME ZONE` (FB4+), `BLOB SUB_TYPE TEXT/BINARY`, and index selectivity (`RDB$STATISTICS`).
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## ποΈ Multi-Database & Per-Project Configuration
|
|
50
|
+
|
|
51
|
+
Real-world production codebases (such as enterprise ERPs in Delphi, Laravel, or Python) frequently require:
|
|
52
|
+
- Different databases per project/workspace.
|
|
53
|
+
- Multiple databases within the same project (e.g., operational database `ERP_DATA.FDB` and audit trail `AUDIT_LOGS.FDB`).
|
|
54
|
+
|
|
55
|
+
### Where and How to Configure Databases:
|
|
56
|
+
|
|
57
|
+
Firebird MCP provides two flexible organization patterns:
|
|
58
|
+
|
|
59
|
+
#### Option A (Recommended Default): Central Global Catalog (`~/.firebird-mcp.json`)
|
|
60
|
+
Instead of scattering `.firebird-mcp.json` files across every repository, maintain a **single central catalog** in your user home directory (`~/.firebird-mcp.json` on Linux/macOS or `C:\Users\YourUser\.firebird-mcp.json` on Windows).
|
|
61
|
+
|
|
62
|
+
In this catalog, you register all databases on your machine and use the `"projects"` property to specify which projects/repositories use each database:
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"default": "erp_main",
|
|
67
|
+
"databases": {
|
|
68
|
+
"erp_main": {
|
|
69
|
+
"host": "localhost",
|
|
70
|
+
"port": 3050,
|
|
71
|
+
"database": "/var/data/ERP_DATA.FDB",
|
|
72
|
+
"user": "SYSDBA",
|
|
73
|
+
"password": "masterkey",
|
|
74
|
+
"charset": "WIN1252",
|
|
75
|
+
"description": "Primary ERP operational database",
|
|
76
|
+
"projects": ["web_projects", "erp-desktop"],
|
|
77
|
+
"tags": ["erp", "financial", "sales"]
|
|
78
|
+
},
|
|
79
|
+
"erp_audit": {
|
|
80
|
+
"host": "localhost",
|
|
81
|
+
"port": 3050,
|
|
82
|
+
"database": "/var/data/AUDIT_LOGS.FDB",
|
|
83
|
+
"user": "SYSDBA",
|
|
84
|
+
"password": "masterkey",
|
|
85
|
+
"charset": "WIN1252",
|
|
86
|
+
"description": "Secondary database for audit trails and logs",
|
|
87
|
+
"projects": ["web_projects", "erp-desktop"],
|
|
88
|
+
"tags": ["audit", "logs", "security"]
|
|
89
|
+
},
|
|
90
|
+
"pos_store": {
|
|
91
|
+
"host": "192.168.1.10",
|
|
92
|
+
"port": 3050,
|
|
93
|
+
"database": "C:\\POS\\STORE.FDB",
|
|
94
|
+
"user": "SYSDBA",
|
|
95
|
+
"password": "masterkey",
|
|
96
|
+
"charset": "WIN1252",
|
|
97
|
+
"description": "Store front checkout database",
|
|
98
|
+
"projects": ["pos-vcl"],
|
|
99
|
+
"tags": ["pos", "cashier"]
|
|
100
|
+
},
|
|
101
|
+
"shared_staging": {
|
|
102
|
+
"host": "localhost",
|
|
103
|
+
"port": 3050,
|
|
104
|
+
"database": "/data/STAGING.FDB",
|
|
105
|
+
"user": "SYSDBA",
|
|
106
|
+
"password": "masterkey",
|
|
107
|
+
"charset": "WIN1252",
|
|
108
|
+
"description": "Shared staging/test database accessible across all projects",
|
|
109
|
+
"projects": []
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
> **Tip on Shared Databases:** Databases with an empty `"projects": []` array or `"*"` are treated as global shared databases and remain visible across all workspaces.
|
|
116
|
+
|
|
117
|
+
#### Option B: Local Project Configuration (`.firebird-mcp.json`)
|
|
118
|
+
If you prefer a repository to isolate its own credentials, place a `.firebird-mcp.json` file in the project root. The MCP checks for a local project file first; if present, it has **absolute precedence** over the global catalog.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
### How the Agent Interacts with Databases:
|
|
123
|
+
1. **Automatic Workspace Context (CWD):**
|
|
124
|
+
- When you open a workspace (e.g., `/home/lucas/web_projects`), the MCP automatically resolves the active project and filters databases matching that project.
|
|
125
|
+
- **Single Database in Project:** The MCP auto-selects the database without asking unnecessary questions.
|
|
126
|
+
- **Multiple Databases in Project (e.g., main and audit):** For generic commands (e.g., *"run a select on orders"*), the MCP halts and asks which database to use.
|
|
127
|
+
2. **Direct Investigation Targeting (Zero Friction):**
|
|
128
|
+
- If you mention the database in your prompt (e.g., *"investigate bug on audit database"* or *"check table X on pos"*), the agent/MCP resolves the alias immediately and connects **without asking confirmation questions**.
|
|
129
|
+
3. **Smart Approximate Search:**
|
|
130
|
+
- Switch databases using `fb_use_database("audit")` β the MCP matches exact names, substrings (e.g., `erp_audit`), and associated tags.
|
|
131
|
+
4. **β οΈ Rigid Safety Rule: Mandatory Double Confirmation for DDL and Data Manipulation (DML):**
|
|
132
|
+
- Structural commands (`CREATE`, `ALTER`, `DROP`, `RECREATE`) and data mutation commands (`INSERT`, `UPDATE`, `DELETE`, `EXECUTE PROCEDURE`) are **NEVER** executed directly without prior explicit user consent.
|
|
133
|
+
- The assistant must present the exact SQL/DDL statement, explain its technical purpose, detail the impact (affected rows/tables, lock risks, irreversibility), and request confirmation.
|
|
134
|
+
- The MCP server blocks execution with an error unless the `confirmed=True` parameter is passed following the user's explicit affirmative response.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## π οΈ Available MCP Tools
|
|
139
|
+
|
|
140
|
+
### Database & Connection Management
|
|
141
|
+
| Tool | Parameters | Description |
|
|
142
|
+
| :--- | :--- | :--- |
|
|
143
|
+
| `fb_create_config` | `database`, `alias`, `host`, `port`, `user`, `password`, `charset`, `description`, `projects`, `tags`, `filepath` | Creates and saves Central Global Catalog (`~/.firebird-mcp.json`) or local file with project tags. |
|
|
144
|
+
| `fb_list_databases` | `project_filter` *(optional)* | Lists all databases in catalog, highlighting matches for the active project. |
|
|
145
|
+
| `fb_use_database` | `alias` | Switches the active database for the current session (with smart match by name, substring, or tag). |
|
|
146
|
+
| `fb_configure_database` | `alias`, `database`, `host`, `port`, `user`, `password`, `charset`, `description`, `projects`, `tags`, `set_as_default`, `save_to_file` | Registers or updates a connection with projects/tags dynamically and persists to file. |
|
|
147
|
+
| `fb_reload_config` | `config_path` *(optional)* | Reloads the catalog from global or local file. |
|
|
148
|
+
|
|
149
|
+
### Schema & Metadata Introspection
|
|
150
|
+
| Tool | Parameters | Description |
|
|
151
|
+
| :--- | :--- | :--- |
|
|
152
|
+
| `fb_list_tables` | `db_alias` *(optional)* | Lists all user tables (filters out `RDB$` system tables). |
|
|
153
|
+
| `fb_list_views` | `db_alias` *(optional)* | Lists all registered user views. |
|
|
154
|
+
| `fb_list_procedures` | `db_alias` *(optional)* | Lists all user Stored Procedures. |
|
|
155
|
+
| `fb_list_generators` | `db_alias` *(optional)* | Lists all user Generators / Sequences. |
|
|
156
|
+
| `fb_inspect_table` | `table_name`, `db_alias` *(optional)* | Returns column definitions, precise data types, PK/FK constraints, and indices with real selectivity (`RDB$STATISTICS`). |
|
|
157
|
+
|
|
158
|
+
### Performance Analysis & Execution
|
|
159
|
+
| Tool | Parameters | Description |
|
|
160
|
+
| :--- | :--- | :--- |
|
|
161
|
+
| `fb_explain_plan` | `sql`, `db_alias` *(optional)* | Compiles the query in the engine, extracts the `PLAN`, highlights `NATURAL SCAN` warnings, and suggests indexing strategies. |
|
|
162
|
+
| `fb_query` | `sql`, `limit` (default 50, max 1000), `db_alias` *(optional)* | Executes read-only `SELECT` queries with safety guards and immediate transaction commits. |
|
|
163
|
+
| `fb_execute_dml` | `sql`, `db_alias` *(optional)*, `confirmed` (default `false`) | Executes explicit `INSERT`, `UPDATE`, `DELETE`, or `EXECUTE PROCEDURE` statements. Requires mandatory double confirmation (`confirmed=True`). |
|
|
164
|
+
| `fb_execute_ddl` | `ddl`, `db_alias` *(optional)*, `confirmed` (default `false`) | Executes structural DDL statements (`CREATE INDEX`, `ALTER TABLE`, etc.) with explicit commit. Requires mandatory double confirmation (`confirmed=True`). |
|
|
165
|
+
| `fb_database_health` | `db_alias` *(optional)* | Audits database health via `MON$` tables (ODS version, page size, active attachments, and OAT-to-Next-Transaction gap). |
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## π» Installation & Execution
|
|
170
|
+
|
|
171
|
+
### π³ Option 1: Docker (Gold Standard β Recommended for Windows, macOS & Linux)
|
|
172
|
+
Running via Docker eliminates all local Python runtime and dependency requirements:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
# Clone and build the image locally:
|
|
176
|
+
git clone https://github.com/lucasgabriel0802/firebird-mcp.git
|
|
177
|
+
cd firebird-mcp
|
|
178
|
+
docker build -t firebird-mcp:latest .
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
#### Universal IDE Configuration via Docker (Stdio Mode):
|
|
182
|
+
Configure your IDE to launch the container on-demand. This configuration works seamlessly on **Windows, macOS, and Linux**:
|
|
183
|
+
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"mcpServers": {
|
|
187
|
+
"firebird": {
|
|
188
|
+
"command": "docker",
|
|
189
|
+
"args": [
|
|
190
|
+
"run",
|
|
191
|
+
"-i",
|
|
192
|
+
"--rm",
|
|
193
|
+
"-v", "${workspaceFolder}:/workspace",
|
|
194
|
+
"-w", "/workspace",
|
|
195
|
+
"--add-host", "host.docker.internal:host-gateway",
|
|
196
|
+
"firebird-mcp:latest"
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
> **Why this is the Gold Standard:**
|
|
204
|
+
> - `-i`: Keeps stdin/stdout open for JSON-RPC without allocating a pseudo-TTY (no `-t` to avoid byte corruption).
|
|
205
|
+
> - `--rm`: Cleans up the container automatically when the IDE closes.
|
|
206
|
+
> - `-v "${workspaceFolder}:/workspace"`: Mounts your current project for automatic `.firebird-mcp.json` discovery.
|
|
207
|
+
> - `--add-host host.docker.internal:host-gateway`: Resolves your host machine's IP (e.g. Firebird running on port 3050 in Windows, macOS, or Linux) using `host.docker.internal`.
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
### π Option 2: Docker Compose (Background Service & Batteried Testing DB)
|
|
212
|
+
|
|
213
|
+
#### A. Run as an HTTP/SSE Background Service
|
|
214
|
+
If you prefer running the MCP server as a permanent background service on port `8000`:
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
docker compose up -d firebird-mcp
|
|
218
|
+
```
|
|
219
|
+
Connect via SSE endpoint: `http://localhost:8000/sse`.
|
|
220
|
+
|
|
221
|
+
#### B. Full Local Testing Environment (with Firebird 5.0 Database)
|
|
222
|
+
Spin up both the MCP server and a ready-to-test Firebird 5.0 database container:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
docker compose --profile test-db up -d
|
|
226
|
+
```
|
|
227
|
+
This starts:
|
|
228
|
+
- Firebird 5.0 on `localhost:3050` (password: `masterkey`, database: `TESTE.FDB`).
|
|
229
|
+
- Firebird MCP Server on `http://localhost:8000/sse`.
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
### π Option 3: Local Python Virtual Environment
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
git clone https://github.com/lucasgabriel0802/firebird-mcp.git ~/firebird-mcp
|
|
237
|
+
cd ~/firebird-mcp
|
|
238
|
+
python3 -m venv venv
|
|
239
|
+
source venv/bin/activate # On Windows: venv\Scripts\activate
|
|
240
|
+
pip install -r requirements.txt
|
|
241
|
+
pip install -e .
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## βοΈ Universal Configuration for Any IDE
|
|
247
|
+
|
|
248
|
+
### 1. Google Antigravity IDE
|
|
249
|
+
In `~/.gemini/config/mcp_config.json` (or workspace configuration):
|
|
250
|
+
|
|
251
|
+
**Using Docker (Recommended):**
|
|
252
|
+
```json
|
|
253
|
+
{
|
|
254
|
+
"mcpServers": {
|
|
255
|
+
"firebird": {
|
|
256
|
+
"command": "docker",
|
|
257
|
+
"args": [
|
|
258
|
+
"run",
|
|
259
|
+
"-i",
|
|
260
|
+
"--rm",
|
|
261
|
+
"-v", "${workspaceFolder}:/workspace",
|
|
262
|
+
"-w", "/workspace",
|
|
263
|
+
"--add-host", "host.docker.internal:host-gateway",
|
|
264
|
+
"firebird-mcp:latest"
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
**Or using Python Virtual Environment:**
|
|
272
|
+
```json
|
|
273
|
+
{
|
|
274
|
+
"mcpServers": {
|
|
275
|
+
"firebird": {
|
|
276
|
+
"command": "/home/lucas/firebird-mcp/venv/bin/python",
|
|
277
|
+
"args": ["-m", "firebird_mcp.server"],
|
|
278
|
+
"cwd": "${workspaceFolder}"
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
### 2. Cursor
|
|
287
|
+
In `.cursor/mcp.json` at your project root or in **Settings > Features > MCP**:
|
|
288
|
+
|
|
289
|
+
```json
|
|
290
|
+
{
|
|
291
|
+
"mcpServers": {
|
|
292
|
+
"firebird": {
|
|
293
|
+
"command": "docker",
|
|
294
|
+
"args": [
|
|
295
|
+
"run",
|
|
296
|
+
"-i",
|
|
297
|
+
"--rm",
|
|
298
|
+
"-v", "${workspaceFolder}:/workspace",
|
|
299
|
+
"-w", "/workspace",
|
|
300
|
+
"--add-host", "host.docker.internal:host-gateway",
|
|
301
|
+
"firebird-mcp:latest"
|
|
302
|
+
]
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
### 3. VS Code (Cline / Roo Code / Copilot MCP)
|
|
311
|
+
In `cline_mcp_settings.json` or Roo Code settings:
|
|
312
|
+
|
|
313
|
+
```json
|
|
314
|
+
{
|
|
315
|
+
"mcpServers": {
|
|
316
|
+
"firebird": {
|
|
317
|
+
"command": "docker",
|
|
318
|
+
"args": [
|
|
319
|
+
"run",
|
|
320
|
+
"-i",
|
|
321
|
+
"--rm",
|
|
322
|
+
"-v", "${workspaceFolder}:/workspace",
|
|
323
|
+
"-w", "/workspace",
|
|
324
|
+
"--add-host", "host.docker.internal:host-gateway",
|
|
325
|
+
"firebird-mcp:latest"
|
|
326
|
+
]
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
### 4. Claude Desktop
|
|
335
|
+
In `claude_desktop_config.json`:
|
|
336
|
+
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
337
|
+
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
338
|
+
|
|
339
|
+
```json
|
|
340
|
+
{
|
|
341
|
+
"mcpServers": {
|
|
342
|
+
"firebird": {
|
|
343
|
+
"command": "python",
|
|
344
|
+
"args": ["-m", "firebird_mcp.server", "--config", "C:\\my_project\\.firebird-mcp.json"],
|
|
345
|
+
"cwd": "C:\\my_project"
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
### 5. Windsurf
|
|
354
|
+
In `~/.codeium/windsurf/mcp_config.json`:
|
|
355
|
+
|
|
356
|
+
```json
|
|
357
|
+
{
|
|
358
|
+
"mcpServers": {
|
|
359
|
+
"firebird": {
|
|
360
|
+
"command": "python3",
|
|
361
|
+
"args": ["-m", "firebird_mcp.server"],
|
|
362
|
+
"cwd": "${workspaceFolder}"
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
### 6. Zed Editor
|
|
371
|
+
In Zed's `settings.json`:
|
|
372
|
+
|
|
373
|
+
```json
|
|
374
|
+
{
|
|
375
|
+
"context_servers": {
|
|
376
|
+
"firebird": {
|
|
377
|
+
"command": {
|
|
378
|
+
"path": "python3",
|
|
379
|
+
"args": ["-m", "firebird_mcp.server"]
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
## π§ Synergy: `firebird-master` Skill + `firebird-mcp`
|
|
389
|
+
|
|
390
|
+
This MCP server works hand-in-hand with the [`firebird-master`](https://github.com/lucasgabriel0802/my-agent-skills/tree/main/skills/firebird-master) skill:
|
|
391
|
+
|
|
392
|
+
```
|
|
393
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
394
|
+
β AI AGENT / COPILOT β
|
|
395
|
+
ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ€
|
|
396
|
+
β SKILL: firebird-master β MCP: firebird-mcp β
|
|
397
|
+
β (Brain) β (Muscle) β
|
|
398
|
+
ββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββ€
|
|
399
|
+
β β’ Cross-version syntax β β’ TCP socket wire protocol β
|
|
400
|
+
β (FB 2.5 vs 3 vs 4 vs 5)β β’ Executes & fetches PLAN β
|
|
401
|
+
β β’ SQL anti-pattern rules β β’ Introspects RDB$ schema β
|
|
402
|
+
β β’ Delphi FireDAC best β β’ Gathers MON$ telemetry β
|
|
403
|
+
β practices & index hintsβ β’ Auto-discovers project DB β
|
|
404
|
+
ββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
---
|
|
408
|
+
|
|
409
|
+
## βοΈ Disclaimer & Trademarks
|
|
410
|
+
|
|
411
|
+
<!-- mcp-name: io.github.lucasgabriel0802/firebird-mcp -->
|
|
412
|
+
|
|
413
|
+
- **Firebird:** "Firebird" is a registered trademark of the Firebird Foundation. This is an independent open-source community project licensed under the MIT License and is not affiliated with, funded by, endorsed by, or officially associated with the Firebird Project or the Firebird Foundation.
|
|
414
|
+
- **Model Context Protocol:** "Model Context Protocol" and "MCP" are trademarks of Anthropic, PBC. This project is an independent implementation compliant with open MCP standards.
|
|
415
|
+
- **Limitation of Liability:** This software connects directly to database servers and executes queries or commands per user/agent instruction. Always maintain regular database backups and verify queries prior to execution on production environments. Under the terms of the MIT License, the software is provided "AS IS", without warranty of any kind, and the authors shall not be liable for any damages or data loss.
|
|
416
|
+
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
## π License
|
|
420
|
+
Distributed under the [MIT](LICENSE) License.
|