Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
43 changes: 43 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: release

on:
pull_request:
push:
# run only against tags
tags:
- "*"

permissions:
contents: write
packages: write
id-token: write

jobs:

goreleaser:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload assets
uses: actions/upload-artifact@v4
with:
name: firebolt-mcp-server
path: dist/*
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea/
dist/
77 changes: 77 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
version: 2
project_name: firebolt-mcp-server

before:
hooks:
- go mod tidy

builds:
- main: ./cmd/firebolt-mcp-server
mod_timestamp: "{{ .CommitTimestamp }}"
buildmode: pie
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64

archives:
- formats: [tar.gz]
# This name template makes the OS and Arch
# compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}-
{{- title .Os }}-
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# Use zip for windows archives
format_overrides:
- goos: windows
formats: [zip]

dockers:
- use: buildx
image_templates:
- "ghcr.io/firebolt-db/mcp-server:{{ .Version }}-amd64"
build_flag_templates:
- --platform=linux/amd64
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://github.com/firebolt-db/mcp-server
- --label=org.opencontainers.image.source=https://github.com/firebolt-db/mcp-server
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=MIT
- use: buildx
image_templates:
- "ghcr.io/firebolt-db/mcp-server:{{ .Version }}-arm64v8"
goarch: arm64
build_flag_templates:
- --platform=linux/arm64/v8
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://github.com/firebolt-db/mcp-server
- --label=org.opencontainers.image.source=https://github.com/firebolt-db/mcp-server
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=MIT

docker_manifests:
- name_template: ghcr.io/firebolt-db/mcp-server:latest
image_templates:
- ghcr.io/firebolt-db/mcp-server:{{ .Version }}-amd64
- ghcr.io/firebolt-db/mcp-server:{{ .Version }}-arm64v8
- name_template: ghcr.io/firebolt-db/mcp-server:{{ .Version }}
image_templates:
- ghcr.io/firebolt-db/mcp-server:{{ .Version }}-amd64
- ghcr.io/firebolt-db/mcp-server:{{ .Version }}-arm64v8

release: {}
1 change: 1 addition & 0 deletions .legitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmd/docs-scrapper/fireboltdocs/**
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# syntax=docker/dockerfile:1

FROM gcr.io/distroless/base:debug
COPY ./firebolt-mcp-server /usr/local/bin/firebolt-mcp-server
ENTRYPOINT ["/usr/local/bin/firebolt-mcp-server"]
184 changes: 184 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
<h1 align="center">
<br>
<a href="https://www.firebolt.io"><img src="https://cdn.prod.website-files.com/5e8a264ceaf4870394477fc7/5e8a264ceaf4879f75477fdd_logo_website.svg" alt="Firebolt" width="300"></a>
<br>
Firebolt MCP Server
<br>
</h1>

<h4 align="center">
A Model Context Protocol implementation that connects your LLM to Firebolt's cloud data warehouse
</h4>

<p align="center">
<a href="https://github.com/firebolt-db/mcp-server/releases">
<img src="https://img.shields.io/github/v/release/firebolt-db/mcp-server" alt="Release">
</a>
<a href="https://github.com/firebolt-db/mcp-server/blob/main/LICENSE">
<img src="https://img.shields.io/github/license/firebolt-db/mcp-server" alt="License">
</a>
<a href="https://go.dev">
<img src="https://img.shields.io/badge/go-1.24.1-blue" alt="Go Version">
</a>
<a href="https://github.com/firebolt-db/mcp-server/actions/workflows/build.yml">
<img src="https://img.shields.io/github/actions/workflow/status/firebolt-db/mcp-server/build.yml" alt="Build Status">
</a>
</p>

<p align="center">
<a href="#key-features">Key Features</a> |
<a href="#how-to-use">How To Use</a> |
<a href="#requirements">Requirements</a> |
<a href="#architecture">Architecture</a> |
<a href="#development">Development</a> |
<a href="#license">License</a>
</p>

![screenshot](https://img.example.firebolt.io/mcp-server-demo.gif)

## Key Features

* **LLM Integration with Firebolt** - Connect your AI assistants directly to your data warehouse
- Enable AI agents to autonomously query your data and build analytics solutions
- Provide LLMs with specialized knowledge of Firebolt's capabilities and features

* **SQL Query Execution**
- Direct query execution against Firebolt databases
- Support for multiple query types and execution modes

* **Documentation Access**
- Comprehensive Firebolt documentation available to the LLM
- SQL reference, function reference, and more

* **Account Management**
- Connect to different accounts and engines
- Manage authentication seamlessly

* **Multi-platform Support**
- Run on any platform supporting Go binaries
- Docker container support for easy deployment

## How To Use

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

### Option 1: Use the Docker image

```bash
# Run with Docker
docker run -p 8080:8080 \
-e FIREBOLT_MCP_CLIENT_ID=your-client-id \
-e FIREBOLT_MCP_CLIENT_SECRET=your-client-secret \
-e FIREBOLT_MCP_TRANSPORT=sse \
firebolt/mcp-server:latest
```

### Option 2: Download and run the binary

```bash
# Download the latest release for your platform from:
# https://github.com/firebolt-db/mcp-server/releases

# Run the server
./firebolt-mcp-server \
--client-id your-client-id \
--client-secret your-client-secret \
--transport sse
```

### Connecting your LLM

Once the server is running, you can connect to it using any MCP-compatible client. For example:

```bash
# Using the OpenAI API with MCP extension
curl -X POST https://api.openai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-4",
"messages": [
{"role": "system", "content": "You are a data analyst working with Firebolt."},
{"role": "user", "content": "How many users did we have last month?"}
],
"tools": [
{
"type": "mcp",
"mcp": {
"endpoint": "http://localhost:8080",
"auth": {
"type": "bearer",
"token": "YOUR_TOKEN"
}
}
}
]
}'
```

## Requirements

- Firebolt service account credentials (client ID and client secret)
- For development: Go 1.24.1 or later
- For deployment: Docker (optional)

## Architecture

The Firebolt MCP Server implements the [Model Context Protocol](https://github.com/anthropics/anthropic-cookbook/tree/main/model_context_protocol) specification, providing:

1. **Tools** - Task-specific capabilities provided to the LLM:
- `Connect`: Establish connections to Firebolt engines and databases
- `Docs`: Access Firebolt documentation
- `Query`: Execute SQL queries against Firebolt

2. **Resources** - Data that can be referenced by the LLM:
- Documentation articles
- Account information
- Database schema
- Engine statistics

3. **Prompts** - Predefined instructions for the LLM:
- Firebolt Expert: Prompts the model to act as a Firebolt specialist

## Development

To set up the development environment:

```bash
# Clone this repository
git clone https://github.com/firebolt-db/mcp-server.git

# Go into the repository
cd mcp-server

# Install Task (if you don't have it already)
go install github.com/go-task/task/v3/cmd/task@latest

# Update Go dependencies
task mod

# Build the application
task build
```

### Running tests

```bash
go test ./...
```

### Building Docker image

```bash
docker build -t firebolt-mcp-server .
```

## License

MIT

---

> [firebolt.io](https://www.firebolt.io) &nbsp;&middot;&nbsp;
> GitHub [@firebolt-db](https://github.com/firebolt-db) &nbsp;&middot;&nbsp;
> Twitter [@FireboltDB](https://twitter.com/FireboltDB)
37 changes: 37 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: 3

tasks:

help:
desc: Display this help screen
silent: true
cmds:
- task --list

mod:
desc: tidy Go modules, download dependencies
silent: true
cmd: |
go mod tidy
go mod download

build:
desc: Build application binary
silent: true
deps:
- task: goreleaser
vars:
CLI_ARGS: build --clean --snapshot --single-target

goreleaser:
desc: Build application binary
silent: true
cmd: |
docker run --rm --privileged \
-v $PWD:/src \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /src \
-e GOOS={{OS}} \
-e GOARCH={{ARCH}} \
goreleaser/goreleaser:v2.8.2 \
{{.CLI_ARGS}}
4 changes: 4 additions & 0 deletions cmd/docs-scrapper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Firebolt Documentation Scrapper

This tools scrapes Firebolt documentation website and puts content to a local directory.
This is a temporary solution until we rework our documentation to be LLM-friendly.
Loading
Loading