Skip to content

Commit ad35f32

Browse files
authored
feat: first version (#1)
1 parent 86385ba commit ad35f32

File tree

474 files changed

+34527
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

474 files changed

+34527
-0
lines changed

.github/workflows/release.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: release
2+
3+
on:
4+
pull_request:
5+
push:
6+
# run only against tags
7+
tags:
8+
- "*"
9+
10+
permissions:
11+
contents: write
12+
packages: write
13+
id-token: write
14+
15+
jobs:
16+
17+
goreleaser:
18+
runs-on: ubuntu-latest
19+
steps:
20+
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Set up Go
27+
uses: actions/setup-go@v5
28+
with:
29+
go-version-file: go.mod
30+
31+
- name: Run GoReleaser
32+
uses: goreleaser/goreleaser-action@v6
33+
with:
34+
version: "~> v2"
35+
args: release --clean
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
39+
- name: Upload assets
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: firebolt-mcp-server
43+
path: dist/*

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.idea/
2+
dist/

.goreleaser.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
version: 2
2+
project_name: firebolt-mcp-server
3+
4+
before:
5+
hooks:
6+
- go mod tidy
7+
8+
builds:
9+
- main: ./cmd/firebolt-mcp-server
10+
mod_timestamp: "{{ .CommitTimestamp }}"
11+
buildmode: pie
12+
env:
13+
- CGO_ENABLED=0
14+
goos:
15+
- linux
16+
- darwin
17+
- windows
18+
goarch:
19+
- amd64
20+
- arm64
21+
22+
archives:
23+
- formats: [tar.gz]
24+
# This name template makes the OS and Arch
25+
# compatible with the results of `uname`.
26+
name_template: >-
27+
{{ .ProjectName }}-
28+
{{- title .Os }}-
29+
{{- if eq .Arch "amd64" }}x86_64
30+
{{- else if eq .Arch "386" }}i386
31+
{{- else }}{{ .Arch }}{{ end }}
32+
{{- if .Arm }}v{{ .Arm }}{{ end }}
33+
# Use zip for windows archives
34+
format_overrides:
35+
- goos: windows
36+
formats: [zip]
37+
38+
dockers:
39+
- use: buildx
40+
image_templates:
41+
- "ghcr.io/firebolt-db/mcp-server:{{ .Version }}-amd64"
42+
build_flag_templates:
43+
- --platform=linux/amd64
44+
- --label=org.opencontainers.image.title={{ .ProjectName }}
45+
- --label=org.opencontainers.image.description={{ .ProjectName }}
46+
- --label=org.opencontainers.image.url=https://github.com/firebolt-db/mcp-server
47+
- --label=org.opencontainers.image.source=https://github.com/firebolt-db/mcp-server
48+
- --label=org.opencontainers.image.version={{ .Version }}
49+
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
50+
- --label=org.opencontainers.image.revision={{ .FullCommit }}
51+
- --label=org.opencontainers.image.licenses=MIT
52+
- use: buildx
53+
image_templates:
54+
- "ghcr.io/firebolt-db/mcp-server:{{ .Version }}-arm64v8"
55+
goarch: arm64
56+
build_flag_templates:
57+
- --platform=linux/arm64/v8
58+
- --label=org.opencontainers.image.title={{ .ProjectName }}
59+
- --label=org.opencontainers.image.description={{ .ProjectName }}
60+
- --label=org.opencontainers.image.url=https://github.com/firebolt-db/mcp-server
61+
- --label=org.opencontainers.image.source=https://github.com/firebolt-db/mcp-server
62+
- --label=org.opencontainers.image.version={{ .Version }}
63+
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
64+
- --label=org.opencontainers.image.revision={{ .FullCommit }}
65+
- --label=org.opencontainers.image.licenses=MIT
66+
67+
docker_manifests:
68+
- name_template: ghcr.io/firebolt-db/mcp-server:latest
69+
image_templates:
70+
- ghcr.io/firebolt-db/mcp-server:{{ .Version }}-amd64
71+
- ghcr.io/firebolt-db/mcp-server:{{ .Version }}-arm64v8
72+
- name_template: ghcr.io/firebolt-db/mcp-server:{{ .Version }}
73+
image_templates:
74+
- ghcr.io/firebolt-db/mcp-server:{{ .Version }}-amd64
75+
- ghcr.io/firebolt-db/mcp-server:{{ .Version }}-arm64v8
76+
77+
release: {}

.legitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cmd/docs-scrapper/fireboltdocs/**

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# syntax=docker/dockerfile:1
2+
3+
FROM gcr.io/distroless/base:debug
4+
COPY ./firebolt-mcp-server /usr/local/bin/firebolt-mcp-server
5+
ENTRYPOINT ["/usr/local/bin/firebolt-mcp-server"]

README.md

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
<h1 align="center">
2+
<br>
3+
<a href="https://www.firebolt.io"><img src="https://cdn.prod.website-files.com/5e8a264ceaf4870394477fc7/5e8a264ceaf4879f75477fdd_logo_website.svg" alt="Firebolt" width="300"></a>
4+
<br>
5+
Firebolt MCP Server
6+
<br>
7+
</h1>
8+
9+
<h4 align="center">
10+
A Model Context Protocol implementation that connects your LLM to Firebolt's cloud data warehouse
11+
</h4>
12+
13+
<p align="center">
14+
<a href="https://github.com/firebolt-db/mcp-server/releases">
15+
<img src="https://img.shields.io/github/v/release/firebolt-db/mcp-server" alt="Release">
16+
</a>
17+
<a href="https://github.com/firebolt-db/mcp-server/blob/main/LICENSE">
18+
<img src="https://img.shields.io/github/license/firebolt-db/mcp-server" alt="License">
19+
</a>
20+
<a href="https://go.dev">
21+
<img src="https://img.shields.io/badge/go-1.24.1-blue" alt="Go Version">
22+
</a>
23+
<a href="https://github.com/firebolt-db/mcp-server/actions/workflows/build.yml">
24+
<img src="https://img.shields.io/github/actions/workflow/status/firebolt-db/mcp-server/build.yml" alt="Build Status">
25+
</a>
26+
</p>
27+
28+
<p align="center">
29+
<a href="#key-features">Key Features</a> |
30+
<a href="#how-to-use">How To Use</a> |
31+
<a href="#requirements">Requirements</a> |
32+
<a href="#architecture">Architecture</a> |
33+
<a href="#development">Development</a> |
34+
<a href="#license">License</a>
35+
</p>
36+
37+
![screenshot](https://img.example.firebolt.io/mcp-server-demo.gif)
38+
39+
## Key Features
40+
41+
* **LLM Integration with Firebolt** - Connect your AI assistants directly to your data warehouse
42+
- Enable AI agents to autonomously query your data and build analytics solutions
43+
- Provide LLMs with specialized knowledge of Firebolt's capabilities and features
44+
45+
* **SQL Query Execution**
46+
- Direct query execution against Firebolt databases
47+
- Support for multiple query types and execution modes
48+
49+
* **Documentation Access**
50+
- Comprehensive Firebolt documentation available to the LLM
51+
- SQL reference, function reference, and more
52+
53+
* **Account Management**
54+
- Connect to different accounts and engines
55+
- Manage authentication seamlessly
56+
57+
* **Multi-platform Support**
58+
- Run on any platform supporting Go binaries
59+
- Docker container support for easy deployment
60+
61+
## How To Use
62+
63+
To get started with the Firebolt MCP Server, you'll need a Firebolt service account. If you don't have a Firebolt account yet, [sign up here](https://www.firebolt.io/signup).
64+
65+
### Option 1: Use the Docker image
66+
67+
```bash
68+
# Run with Docker
69+
docker run -p 8080:8080 \
70+
-e FIREBOLT_MCP_CLIENT_ID=your-client-id \
71+
-e FIREBOLT_MCP_CLIENT_SECRET=your-client-secret \
72+
-e FIREBOLT_MCP_TRANSPORT=sse \
73+
firebolt/mcp-server:latest
74+
```
75+
76+
### Option 2: Download and run the binary
77+
78+
```bash
79+
# Download the latest release for your platform from:
80+
# https://github.com/firebolt-db/mcp-server/releases
81+
82+
# Run the server
83+
./firebolt-mcp-server \
84+
--client-id your-client-id \
85+
--client-secret your-client-secret \
86+
--transport sse
87+
```
88+
89+
### Connecting your LLM
90+
91+
Once the server is running, you can connect to it using any MCP-compatible client. For example:
92+
93+
```bash
94+
# Using the OpenAI API with MCP extension
95+
curl -X POST https://api.openai.com/v1/chat/completions \
96+
-H "Content-Type: application/json" \
97+
-H "Authorization: Bearer $OPENAI_API_KEY" \
98+
-d '{
99+
"model": "gpt-4",
100+
"messages": [
101+
{"role": "system", "content": "You are a data analyst working with Firebolt."},
102+
{"role": "user", "content": "How many users did we have last month?"}
103+
],
104+
"tools": [
105+
{
106+
"type": "mcp",
107+
"mcp": {
108+
"endpoint": "http://localhost:8080",
109+
"auth": {
110+
"type": "bearer",
111+
"token": "YOUR_TOKEN"
112+
}
113+
}
114+
}
115+
]
116+
}'
117+
```
118+
119+
## Requirements
120+
121+
- Firebolt service account credentials (client ID and client secret)
122+
- For development: Go 1.24.1 or later
123+
- For deployment: Docker (optional)
124+
125+
## Architecture
126+
127+
The Firebolt MCP Server implements the [Model Context Protocol](https://github.com/anthropics/anthropic-cookbook/tree/main/model_context_protocol) specification, providing:
128+
129+
1. **Tools** - Task-specific capabilities provided to the LLM:
130+
- `Connect`: Establish connections to Firebolt engines and databases
131+
- `Docs`: Access Firebolt documentation
132+
- `Query`: Execute SQL queries against Firebolt
133+
134+
2. **Resources** - Data that can be referenced by the LLM:
135+
- Documentation articles
136+
- Account information
137+
- Database schema
138+
- Engine statistics
139+
140+
3. **Prompts** - Predefined instructions for the LLM:
141+
- Firebolt Expert: Prompts the model to act as a Firebolt specialist
142+
143+
## Development
144+
145+
To set up the development environment:
146+
147+
```bash
148+
# Clone this repository
149+
git clone https://github.com/firebolt-db/mcp-server.git
150+
151+
# Go into the repository
152+
cd mcp-server
153+
154+
# Install Task (if you don't have it already)
155+
go install github.com/go-task/task/v3/cmd/task@latest
156+
157+
# Update Go dependencies
158+
task mod
159+
160+
# Build the application
161+
task build
162+
```
163+
164+
### Running tests
165+
166+
```bash
167+
go test ./...
168+
```
169+
170+
### Building Docker image
171+
172+
```bash
173+
docker build -t firebolt-mcp-server .
174+
```
175+
176+
## License
177+
178+
MIT
179+
180+
---
181+
182+
> [firebolt.io](https://www.firebolt.io) &nbsp;&middot;&nbsp;
183+
> GitHub [@firebolt-db](https://github.com/firebolt-db) &nbsp;&middot;&nbsp;
184+
> Twitter [@FireboltDB](https://twitter.com/FireboltDB)

Taskfile.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
version: 3
2+
3+
tasks:
4+
5+
help:
6+
desc: Display this help screen
7+
silent: true
8+
cmds:
9+
- task --list
10+
11+
mod:
12+
desc: tidy Go modules, download dependencies
13+
silent: true
14+
cmd: |
15+
go mod tidy
16+
go mod download
17+
18+
build:
19+
desc: Build application binary
20+
silent: true
21+
deps:
22+
- task: goreleaser
23+
vars:
24+
CLI_ARGS: build --clean --snapshot --single-target
25+
26+
goreleaser:
27+
desc: Build application binary
28+
silent: true
29+
cmd: |
30+
docker run --rm --privileged \
31+
-v $PWD:/src \
32+
-v /var/run/docker.sock:/var/run/docker.sock \
33+
-w /src \
34+
-e GOOS={{OS}} \
35+
-e GOARCH={{ARCH}} \
36+
goreleaser/goreleaser:v2.8.2 \
37+
{{.CLI_ARGS}}

cmd/docs-scrapper/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Firebolt Documentation Scrapper
2+
3+
This tools scrapes Firebolt documentation website and puts content to a local directory.
4+
This is a temporary solution until we rework our documentation to be LLM-friendly.

0 commit comments

Comments
 (0)