Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f0547d1
Increase version
filipsedivy May 15, 2025
44df4ac
Update build system
filipsedivy May 15, 2025
3a80c56
Update homepage url address
filipsedivy May 15, 2025
0ba2cb0
Create dynamic version
filipsedivy May 15, 2025
83abecb
Create dynamic version
filipsedivy May 15, 2025
6affad4
Create dynamic version
filipsedivy May 15, 2025
fd40061
Add isort tool
filipsedivy May 15, 2025
b196645
Update dynamic vars
filipsedivy May 15, 2025
4f40625
Move build system
filipsedivy May 15, 2025
d49b0a0
Remove detect version
filipsedivy May 15, 2025
d3c6c6f
Separation of the publishing process into a separate pipeline
filipsedivy May 15, 2025
e6b1399
Update uv.lock
filipsedivy May 15, 2025
0c5aad0
Update linter
filipsedivy May 15, 2025
3052fc0
Restore uv cache
filipsedivy May 15, 2025
58141b2
Update CI/CD
filipsedivy May 15, 2025
6470a8b
Install python dependecies
filipsedivy May 15, 2025
a2baa5b
Update CI/CD
filipsedivy May 15, 2025
a5e34f7
Update CI/CD
filipsedivy May 15, 2025
b2c0b3f
Update CI/CD
filipsedivy May 15, 2025
95f431a
Ruff checker
filipsedivy May 15, 2025
eb580d2
Remove action
filipsedivy May 16, 2025
d33c1e0
Update style check
filipsedivy May 16, 2025
6b8a2b2
Remove name
filipsedivy May 16, 2025
f82f348
Remove fail-fast
filipsedivy May 16, 2025
138cabe
Add type-check
filipsedivy May 16, 2025
3cb1364
Implement mypy
filipsedivy May 16, 2025
414fe08
Add comments
filipsedivy May 16, 2025
57fa8fd
Remove isort
filipsedivy May 16, 2025
c798505
Remove space
filipsedivy May 16, 2025
85584a1
Exclude .github
filipsedivy May 16, 2025
38f5ea3
Update dev-dependencies
filipsedivy May 16, 2025
7881125
Remove version
filipsedivy May 16, 2025
ad797fe
Remove version
filipsedivy May 16, 2025
9144bdf
Add version
filipsedivy May 16, 2025
e83396b
Update pyproject.toml
filipsedivy May 16, 2025
7ea32bb
Update uv.lock
filipsedivy May 16, 2025
9ab609c
Fix license
filipsedivy May 16, 2025
afb8017
Add license check
filipsedivy May 16, 2025
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
28 changes: 0 additions & 28 deletions .github/scripts/detect_version.sh

This file was deleted.

24 changes: 1 addition & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,26 +45,4 @@ jobs:
echo "BOOSTSPACE_TOKEN=dummy" >> $GITHUB_ENV

- name: Run unit tests
run: uv run pytest -q

publish:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read

steps:
- uses: actions/checkout@v4

- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6

- name: Install the project
run: uv sync --all-groups

- name: Build dists with uv
run: uv build --no-sources

- name: Publish to PyPI with uv
run: uv publish
run: uv run pytest -q
46 changes: 46 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Publish pip package to PyPI https://pypi.org/project/boostspace-mcp-server

name: Publish to PyPI

on:
push:
branches: [ main ]
workflow_dispatch:
inputs:
pypi:
type: boolean
description: Publish to PyPI

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- uses: astral-sh/setup-uv@v6
- run: uv pip install --system --no-cache build
- run: python -m build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
- run: uv cache prune --ci

publish:
needs: build
runs-on: ubuntu-latest
environment: # for GitHub Deployments tab
name: Release - PyPI
url: https://pypi.org/p/boostspace-mcp-server/
permissions:
id-token: write # for PyPI trusted publishing
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
79 changes: 79 additions & 0 deletions .github/workflows/style-check-py.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Ruff Style Check

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
ruff:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.11", "3.12" ]

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install project, validate lockfile
run: uv sync --locked --all-packages --all-extras

- name: Ruff
run: uv run ruff check --output-format=github .

- name: Check format
run: uv run ruff format --check .

type-check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.11", "3.12" ]

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install project, validate lockfile
run: uv sync --locked --all-packages --all-extras

- name: Check Types
run: uv run mypy --install-types --non-interactive .

license-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: Set up Python
run: uv python install

- name: Install project, validate lockfile
run: uv sync --locked --all-packages --all-extras

- name: License check
run: uv run licensecheck
57 changes: 43 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
[build-system]
requires = ["setuptools>=70.0.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "boostspace-mcp-server"
version = "0.1.1"
version = "0.1.2"
description = "A Model Context Protocol (MCP) server for Boost.space"
readme = "README.md"
requires-python = ">=3.11"
license = { file = "LICENSE" }
license = { text = "MIT" }
maintainers = [
{ name = "Boost.space", email = "team@boost.space" },
]
Expand All @@ -14,22 +18,44 @@ dependencies = [
]

[project.urls]
"Homepage" = "https://github.com/boostspace/boostspace-mcp-server"
"Homepage" = "https://boost.space"
"Bug Tracker" = "https://github.com/boostspace/boostspace-mcp-server/issues"

[project.optional-dependencies]
dev = ["pytest", "ruff", "setuptools", "liccheck"]
tests = ["pytest"]

[tool.setuptools]
package-dir = { "" = "src" }


[tool.uv]
dev-dependencies = [
"pytest>=8.3.5",
"coverage>=7.5.3",
"pytest-coverage>=0.0",
"pytest-mock>=3.14.0",
"ruff>=0.11.10",
"pyright>=1.1.400",
"licensecheck>=2025.1.0",
"mypy>=1.15.0",
]


[tool.pytest.ini_options]
addopts = "-q"


[tool.ruff]
line-length = 100
line-length = 100
target-version = "py311"
exclude = [".github"]

[tool.ruff.lint]
select = ["E", "F", "I", "UP"]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
]


[tool.liccheck]
authorized_licenses = [
Expand All @@ -53,14 +79,17 @@ unauthorized_licenses = [
"lgpl with exceptions or zpl",
]

[build-system]
requires = ["setuptools>=68", "wheel", "build"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
package-dir = { "" = "src" }

[tool.setuptools.packages.find]
where = ["src"]
include = ["boostspace_mcp*"]


[tool.mypy]
strict = true


[tool.licensecheck]
only_licenses = [
"APACHE SOFTWARE LICENSE"
]
1 change: 0 additions & 1 deletion src/boostspace_mcp/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class BoostSpaceClient:

def __init__(self, api_base: str = API_BASE, token: str = TOKEN):
self.base = api_base.rstrip("/")
self.headers = {"Authorization": f"Bearer {token}"}
Expand Down
8 changes: 4 additions & 4 deletions src/boostspace_mcp/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import os

SERVER_NAME = "boostspace-mcp"
SERVER_NAME = "boostspace-mcp"
API_BASE: str | None = os.getenv("BOOSTSPACE_API_BASE")
TOKEN: str | None = os.getenv("BOOSTSPACE_TOKEN")
TOKEN: str | None = os.getenv("BOOSTSPACE_TOKEN")

ALLOWED_ENDPOINTS: list[str] = [] # Empty list ⇒ allow every endpoint
ALLOWED_ENDPOINTS: list[str] = [] # Empty list ⇒ allow every endpoint
# EXAMPLE of ALLOWED_ENDPOINTS values:
# [
# "GET /custom-module",
Expand All @@ -25,4 +25,4 @@
"Missing required environment variable BOOSTSPACE_TOKEN.\n"
"Set it in your MCP host application (e.g. Claude Desktop) before "
"starting the server."
)
)
1 change: 1 addition & 0 deletions src/boostspace_mcp/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ def main():
registry.register_all()
mcp.run(transport="stdio")


if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion src/boostspace_mcp/spec_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
def load_openapi_spec() -> dict:
refresh_openapi_cache()
text = Path(OPENAPI_JSON).read_text("utf-8")
return json.loads(text)
return json.loads(text)
6 changes: 1 addition & 5 deletions src/boostspace_mcp/tool_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ def _fill_path(self, template: str, parameters: dict) -> tuple[str, dict]:

@staticmethod
def _generate_tool_id(method: str, path: str) -> str:
cleaned = (
path.strip("/")
.replace("/", "_")
.translate(str.maketrans("", "", "{}"))
)
cleaned = path.strip("/").replace("/", "_").translate(str.maketrans("", "", "{}"))
return f"{method.lower()}_{cleaned}"

def _sanitize_name(self, raw: str) -> str:
Expand Down
1 change: 1 addition & 0 deletions src/boostspace_mcp/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def get_version() -> str:
except importlib_metadata.PackageNotFoundError:
return "0.0.0+dev"


SERVER_VERSION: str = get_version()

__all__ = ["get_version", "SERVER_VERSION"]
Loading
Loading