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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/build-bundle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Build MCPB Bundle

on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'Version to build (e.g., 0.3.0)'
required: true
type: string

jobs:
build:
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- runner: ubuntu-latest
arch: amd64
- runner: ubuntu-24.04-arm
arch: arm64
steps:
- uses: actions/checkout@v4

- name: Set version
id: version
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT
else
echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
fi

- name: Update manifest version
run: |
jq --arg v "${{ steps.version.outputs.version }}" '.version = $v' manifest.json > manifest.tmp.json
mv manifest.tmp.json manifest.json

# pglast requires make for compilation
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential

- uses: NimbleBrainInc/mcpb-pack@v1
id: pack
with:
python-version: '3.14'
output: mcp-postgres-v${{ steps.version.outputs.version }}-linux-${{ matrix.arch }}.mcpb

- uses: actions/upload-artifact@v4
with:
name: bundle-${{ matrix.arch }}
path: ${{ steps.pack.outputs.bundle-path }}

release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true

- uses: softprops/action-gh-release@v2
with:
files: dist/*.mcpb
generate_release_notes: true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,7 @@ devenv.local.nix
# pre-commit
.pre-commit-config.yaml
*.sql

# MCPB build artifacts
deps/
*.mcpb
63 changes: 63 additions & 0 deletions .mcpbignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Build artifacts
.venv/
.git/
.github/
__pycache__/
*.pyc
*.pyo
*.pyd
.Python
build/
dist/
*.egg-info/
*.egg
.eggs/

# Test and dev files
tests/
.pytest_cache/
.coverage
htmlcov/
.tox/
.nox/

# Linting and type checking caches
.mypy_cache/
.ruff_cache/
.pytype/

# IDE and editor files
.vscode/
.idea/
*.swp
*.swo
*~

# Environment and secrets
.env
.env.*
*.local

# Documentation and assets
*.md
*.rst
docs/
assets/
examples/

# Development config
devenv.nix
devenv.yaml
devenv.lock
justfile
smithery.yaml
Dockerfile
docker-entrypoint.sh
.python-version
Makefile
pytest.ini
pyproject.toml
uv.lock

# Bundle artifacts
*.mcpb
17 changes: 17 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"manifest_version": "0.3",
"name": "ai.nimbletools/postgres",
"version": "0.3.0",
"description": "PostgreSQL MCP server with AI-powered tuning, index optimization, and database health analysis",
"author": {
"name": "Crystal DBA (packaged by NimbleBrain Inc)"
},
"server": {
"type": "python",
"entry_point": "postgres_mcp/__init__.py",
"mcp_config": {
"command": "python",
"args": ["-c", "from postgres_mcp import main; main()"]
}
}
}