mcp-trino-python 0.7.1__tar.gz → 0.8.1__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.
- mcp_trino_python-0.8.1/.claude-plugin/marketplace.json +12 -0
- mcp_trino_python-0.8.1/.claude-plugin/plugin.json +36 -0
- {mcp_trino_python-0.7.1 → mcp_trino_python-0.8.1}/.dockerignore +16 -13
- {mcp_trino_python-0.7.1 → mcp_trino_python-0.8.1}/.env.example +15 -12
- mcp_trino_python-0.8.1/.gitattributes +2 -0
- mcp_trino_python-0.8.1/.github/FUNDING.yml +1 -0
- {mcp_trino_python-0.7.1 → mcp_trino_python-0.8.1}/.github/ISSUE_TEMPLATE/bug_report.md +29 -29
- {mcp_trino_python-0.7.1 → mcp_trino_python-0.8.1}/.github/ISSUE_TEMPLATE/feature_request.md +19 -19
- {mcp_trino_python-0.7.1 → mcp_trino_python-0.8.1}/.github/pull_request_template.md +24 -24
- {mcp_trino_python-0.7.1 → mcp_trino_python-0.8.1}/.github/workflows/docker.yml +60 -60
- mcp_trino_python-0.8.1/.github/workflows/docs.yml +41 -0
- mcp_trino_python-0.8.1/.github/workflows/publish.yml +89 -0
- mcp_trino_python-0.8.1/.github/workflows/test.yml +35 -0
- {mcp_trino_python-0.7.1 → mcp_trino_python-0.8.1}/.gitignore +1 -0
- mcp_trino_python-0.8.1/Dockerfile +36 -0
- {mcp_trino_python-0.7.1 → mcp_trino_python-0.8.1}/LICENSE +201 -201
- mcp_trino_python-0.8.1/PKG-INFO +122 -0
- mcp_trino_python-0.8.1/README.md +101 -0
- mcp_trino_python-0.8.1/docker-compose.yml +40 -0
- mcp_trino_python-0.8.1/docs/clients.md +115 -0
- mcp_trino_python-0.8.1/docs/configuration.md +40 -0
- mcp_trino_python-0.8.1/docs/deployment.md +53 -0
- mcp_trino_python-0.8.1/docs/development.md +62 -0
- mcp_trino_python-0.8.1/docs/getting-started.md +46 -0
- mcp_trino_python-0.8.1/docs/index.md +50 -0
- mcp_trino_python-0.8.1/docs/tools.md +62 -0
- mcp_trino_python-0.8.1/mcpb/manifest.json +200 -0
- mcp_trino_python-0.8.1/mcpb/pack.sh +11 -0
- mcp_trino_python-0.8.1/mkdocs.yml +44 -0
- {mcp_trino_python-0.7.1 → mcp_trino_python-0.8.1}/pyproject.toml +19 -13
- {mcp_trino_python-0.7.1 → mcp_trino_python-0.8.1}/ruff.toml +49 -40
- mcp_trino_python-0.8.1/server.json +44 -0
- mcp_trino_python-0.8.1/src/mcp_trino/__init__.py +1 -0
- mcp_trino_python-0.8.1/src/mcp_trino/config.py +44 -0
- mcp_trino_python-0.8.1/src/mcp_trino/server.py +302 -0
- mcp_trino_python-0.8.1/src/mcp_trino/trino_client.py +175 -0
- mcp_trino_python-0.8.1/tests/conftest.py +32 -0
- mcp_trino_python-0.8.1/tests/test_server.py +65 -0
- mcp_trino_python-0.8.1/tests/test_trino_client.py +78 -0
- mcp_trino_python-0.8.1/uv.lock +2173 -0
- mcp_trino_python-0.7.1/.github/workflows/publish.yml +0 -29
- mcp_trino_python-0.7.1/Dockerfile +0 -38
- mcp_trino_python-0.7.1/PKG-INFO +0 -443
- mcp_trino_python-0.7.1/README.md +0 -420
- mcp_trino_python-0.7.1/docker-compose.yml +0 -83
- mcp_trino_python-0.7.1/requirements.txt +0 -4
- mcp_trino_python-0.7.1/smithery.yaml +0 -64
- mcp_trino_python-0.7.1/src/__init__.py +0 -0
- mcp_trino_python-0.7.1/src/config.py +0 -39
- mcp_trino_python-0.7.1/src/server.py +0 -617
- mcp_trino_python-0.7.1/src/trino_client.py +0 -596
- mcp_trino_python-0.7.1/uv.lock +0 -947
- {mcp_trino_python-0.7.1 → mcp_trino_python-0.8.1}/.github/CODEOWNERS +0 -0
- {mcp_trino_python-0.7.1 → mcp_trino_python-0.8.1}/.python-version +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mcp-trino-python",
|
|
3
|
+
"description": "Trino and Iceberg tools for Claude Code",
|
|
4
|
+
"owner": { "name": "alaturqua" },
|
|
5
|
+
"plugins": [
|
|
6
|
+
{
|
|
7
|
+
"name": "trino",
|
|
8
|
+
"source": "./",
|
|
9
|
+
"description": "Query Trino and inspect or maintain Iceberg tables"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "trino",
|
|
3
|
+
"version": "0.8.1",
|
|
4
|
+
"description": "Query Trino and inspect or maintain Iceberg tables",
|
|
5
|
+
"author": { "name": "alaturqua" },
|
|
6
|
+
"homepage": "https://github.com/alaturqua/mcp-trino-python",
|
|
7
|
+
"repository": "https://github.com/alaturqua/mcp-trino-python",
|
|
8
|
+
"license": "Apache-2.0",
|
|
9
|
+
"keywords": ["trino", "iceberg", "sql", "mcp"],
|
|
10
|
+
"mcpServers": {
|
|
11
|
+
"trino": {
|
|
12
|
+
"command": "uvx",
|
|
13
|
+
"args": ["mcp-trino-python"],
|
|
14
|
+
"env": {
|
|
15
|
+
"TRINO_HOST": "${user_config.trino_host}",
|
|
16
|
+
"TRINO_PORT": "${user_config.trino_port}",
|
|
17
|
+
"TRINO_USER": "${user_config.trino_user}",
|
|
18
|
+
"TRINO_PASSWORD": "${user_config.trino_password}",
|
|
19
|
+
"TRINO_HTTP_SCHEME": "${user_config.trino_http_scheme}",
|
|
20
|
+
"TRINO_CATALOG": "${user_config.trino_catalog}",
|
|
21
|
+
"TRINO_SCHEMA": "${user_config.trino_schema}",
|
|
22
|
+
"TRINO_READ_ONLY": "${user_config.trino_read_only}"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"userConfig": {
|
|
27
|
+
"trino_host": { "type": "string", "title": "Trino host", "description": "Trino server hostname", "required": true, "default": "localhost" },
|
|
28
|
+
"trino_port": { "type": "number", "title": "Trino port", "description": "Trino server port", "default": 8080 },
|
|
29
|
+
"trino_user": { "type": "string", "title": "Trino user", "description": "Trino username", "required": true, "default": "trino" },
|
|
30
|
+
"trino_password": { "type": "string", "title": "Trino password", "description": "Optional; enables basic auth (use with https)", "sensitive": true, "default": "" },
|
|
31
|
+
"trino_http_scheme": { "type": "string", "title": "HTTP scheme", "description": "http or https", "default": "http", "options": ["http", "https"] },
|
|
32
|
+
"trino_catalog": { "type": "string", "title": "Default catalog", "description": "Optional default catalog", "default": "" },
|
|
33
|
+
"trino_schema": { "type": "string", "title": "Default schema", "description": "Optional default schema", "default": "" },
|
|
34
|
+
"trino_read_only": { "type": "boolean", "title": "Read-only", "description": "Allow only read statements and hide maintenance tools", "default": false }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
.env
|
|
2
|
-
.venv/
|
|
3
|
-
.vscode/
|
|
4
|
-
.github/
|
|
5
|
-
dist/
|
|
6
|
-
__pycache__/
|
|
7
|
-
*.egg-info/
|
|
8
|
-
*.pyc
|
|
9
|
-
*.pyo
|
|
10
|
-
*.pyd
|
|
11
|
-
*.db
|
|
12
|
-
|
|
13
|
-
docker-compose.
|
|
1
|
+
.env
|
|
2
|
+
.venv/
|
|
3
|
+
.vscode/
|
|
4
|
+
.github/
|
|
5
|
+
dist/
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.egg-info/
|
|
8
|
+
*.pyc
|
|
9
|
+
*.pyo
|
|
10
|
+
*.pyd
|
|
11
|
+
*.db
|
|
12
|
+
|
|
13
|
+
docker-compose.yml
|
|
14
|
+
tests/
|
|
15
|
+
.claude-plugin/
|
|
16
|
+
plugins/
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
# Trino Connection Settings
|
|
2
|
-
TRINO_HOST=localhost
|
|
3
|
-
TRINO_PORT=8080
|
|
4
|
-
TRINO_USER=trino
|
|
5
|
-
TRINO_CATALOG=tpch
|
|
6
|
-
TRINO_SCHEMA=tiny
|
|
7
|
-
TRINO_HTTP_SCHEME=http
|
|
8
|
-
# TRINO_PASSWORD= # Optional: Set password if authentication is required
|
|
9
|
-
|
|
10
|
-
# Optional: Set default catalog and schema
|
|
11
|
-
# TRINO_CATALOG=iceberg
|
|
12
|
-
# TRINO_SCHEMA=default
|
|
1
|
+
# Trino Connection Settings
|
|
2
|
+
TRINO_HOST=localhost
|
|
3
|
+
TRINO_PORT=8080
|
|
4
|
+
TRINO_USER=trino
|
|
5
|
+
TRINO_CATALOG=tpch
|
|
6
|
+
TRINO_SCHEMA=tiny
|
|
7
|
+
TRINO_HTTP_SCHEME=http
|
|
8
|
+
# TRINO_PASSWORD= # Optional: Set password if authentication is required
|
|
9
|
+
|
|
10
|
+
# Optional: Set default catalog and schema
|
|
11
|
+
# TRINO_CATALOG=iceberg
|
|
12
|
+
# TRINO_SCHEMA=default
|
|
13
|
+
|
|
14
|
+
# Optional: only allow read statements and hide maintenance tools
|
|
15
|
+
# TRINO_READ_ONLY=true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
github: alaturqua
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "\U0001F41B Bug report"
|
|
3
|
-
about: Report a bug or unexpected behavior while using GitHub MCP Server
|
|
4
|
-
title: ""
|
|
5
|
-
labels: bug
|
|
6
|
-
assignees: ""
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
### Describe the bug
|
|
10
|
-
|
|
11
|
-
A clear and concise description of what the bug is.
|
|
12
|
-
|
|
13
|
-
### Affected version
|
|
14
|
-
|
|
15
|
-
Please specify the version of the software where the bug was observed.
|
|
16
|
-
|
|
17
|
-
### Steps to reproduce the behavior
|
|
18
|
-
|
|
19
|
-
1. Type this '...'
|
|
20
|
-
2. View the output '....'
|
|
21
|
-
3. See error
|
|
22
|
-
|
|
23
|
-
### Expected vs actual behavior
|
|
24
|
-
|
|
25
|
-
A clear and concise description of what you expected to happen and what actually happened.
|
|
26
|
-
|
|
27
|
-
### Logs
|
|
28
|
-
|
|
29
|
-
Paste any available logs. Redact if needed.
|
|
1
|
+
---
|
|
2
|
+
name: "\U0001F41B Bug report"
|
|
3
|
+
about: Report a bug or unexpected behavior while using GitHub MCP Server
|
|
4
|
+
title: ""
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
### Describe the bug
|
|
10
|
+
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
### Affected version
|
|
14
|
+
|
|
15
|
+
Please specify the version of the software where the bug was observed.
|
|
16
|
+
|
|
17
|
+
### Steps to reproduce the behavior
|
|
18
|
+
|
|
19
|
+
1. Type this '...'
|
|
20
|
+
2. View the output '....'
|
|
21
|
+
3. See error
|
|
22
|
+
|
|
23
|
+
### Expected vs actual behavior
|
|
24
|
+
|
|
25
|
+
A clear and concise description of what you expected to happen and what actually happened.
|
|
26
|
+
|
|
27
|
+
### Logs
|
|
28
|
+
|
|
29
|
+
Paste any available logs. Redact if needed.
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "⭐ Submit a feature request"
|
|
3
|
-
about: Surface a feature or problem that you think should be solved
|
|
4
|
-
title: ""
|
|
5
|
-
labels: enhancement
|
|
6
|
-
assignees: ""
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
### Describe the feature or problem you’d like to solve
|
|
10
|
-
|
|
11
|
-
A clear and concise description of what the feature or problem is.
|
|
12
|
-
|
|
13
|
-
### Proposed solution
|
|
14
|
-
|
|
15
|
-
How will it benefit GitHub MCP Server and its users?
|
|
16
|
-
|
|
17
|
-
### Additional context
|
|
18
|
-
|
|
19
|
-
Add any other context like screenshots or mockups are helpful, if applicable.
|
|
1
|
+
---
|
|
2
|
+
name: "⭐ Submit a feature request"
|
|
3
|
+
about: Surface a feature or problem that you think should be solved
|
|
4
|
+
title: ""
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
### Describe the feature or problem you’d like to solve
|
|
10
|
+
|
|
11
|
+
A clear and concise description of what the feature or problem is.
|
|
12
|
+
|
|
13
|
+
### Proposed solution
|
|
14
|
+
|
|
15
|
+
How will it benefit GitHub MCP Server and its users?
|
|
16
|
+
|
|
17
|
+
### Additional context
|
|
18
|
+
|
|
19
|
+
Add any other context like screenshots or mockups are helpful, if applicable.
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
### Pull Request Title
|
|
2
|
-
|
|
3
|
-
### Description
|
|
4
|
-
|
|
5
|
-
A clear and concise description of what this pull request does.
|
|
6
|
-
|
|
7
|
-
### Related Issues
|
|
8
|
-
|
|
9
|
-
Link any related issues or pull requests.
|
|
10
|
-
|
|
11
|
-
### Description
|
|
12
|
-
|
|
13
|
-
A clear and concise description of what this pull request does.
|
|
14
|
-
|
|
15
|
-
### Related Issues
|
|
16
|
-
|
|
17
|
-
Link any related issues or pull requests.
|
|
18
|
-
|
|
19
|
-
### Checklist
|
|
20
|
-
|
|
21
|
-
- [ ] I have added tests to cover my changes.
|
|
22
|
-
- [ ] All new and existing tests passed.
|
|
23
|
-
- [ ] I have updated the documentation accordingly.
|
|
24
|
-
- [ ] I have added a changelog entry.
|
|
1
|
+
### Pull Request Title
|
|
2
|
+
|
|
3
|
+
### Description
|
|
4
|
+
|
|
5
|
+
A clear and concise description of what this pull request does.
|
|
6
|
+
|
|
7
|
+
### Related Issues
|
|
8
|
+
|
|
9
|
+
Link any related issues or pull requests.
|
|
10
|
+
|
|
11
|
+
### Description
|
|
12
|
+
|
|
13
|
+
A clear and concise description of what this pull request does.
|
|
14
|
+
|
|
15
|
+
### Related Issues
|
|
16
|
+
|
|
17
|
+
Link any related issues or pull requests.
|
|
18
|
+
|
|
19
|
+
### Checklist
|
|
20
|
+
|
|
21
|
+
- [ ] I have added tests to cover my changes.
|
|
22
|
+
- [ ] All new and existing tests passed.
|
|
23
|
+
- [ ] I have updated the documentation accordingly.
|
|
24
|
+
- [ ] I have added a changelog entry.
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
name: Docker
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
env:
|
|
14
|
-
REGISTRY: ghcr.io
|
|
15
|
-
IMAGE_NAME: ${{ github.repository }}
|
|
16
|
-
|
|
17
|
-
jobs:
|
|
18
|
-
build:
|
|
19
|
-
runs-on: ubuntu-latest
|
|
20
|
-
permissions:
|
|
21
|
-
contents: read
|
|
22
|
-
packages: write
|
|
23
|
-
|
|
24
|
-
steps:
|
|
25
|
-
- name: Checkout repository
|
|
26
|
-
uses: actions/checkout@v4
|
|
27
|
-
|
|
28
|
-
- name: Set up Docker Buildx
|
|
29
|
-
uses: docker/setup-buildx-action@v3
|
|
30
|
-
|
|
31
|
-
- name: Log into registry ${{ env.REGISTRY }}
|
|
32
|
-
if: github.event_name != 'pull_request'
|
|
33
|
-
uses: docker/login-action@v3
|
|
34
|
-
with:
|
|
35
|
-
registry: ${{ env.REGISTRY }}
|
|
36
|
-
username: ${{ github.actor }}
|
|
37
|
-
password: ${{ secrets.GITHUB_TOKEN }}
|
|
38
|
-
|
|
39
|
-
- name: Extract Docker metadata
|
|
40
|
-
id: meta
|
|
41
|
-
uses: docker/metadata-action@v5
|
|
42
|
-
with:
|
|
43
|
-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
44
|
-
tags: |
|
|
45
|
-
type=ref,event=branch
|
|
46
|
-
type=ref,event=pr
|
|
47
|
-
type=semver,pattern={{version}}
|
|
48
|
-
type=semver,pattern={{major}}.{{minor}}
|
|
49
|
-
type=sha,format=long
|
|
50
|
-
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
|
|
51
|
-
|
|
52
|
-
- name: Build and push Docker image
|
|
53
|
-
uses: docker/build-push-action@v5
|
|
54
|
-
with:
|
|
55
|
-
context: .
|
|
56
|
-
push: ${{ github.event_name != 'pull_request' }}
|
|
57
|
-
tags: ${{ steps.meta.outputs.tags }}
|
|
58
|
-
labels: ${{ steps.meta.outputs.labels }}
|
|
59
|
-
cache-from: type=gha
|
|
60
|
-
cache-to: type=gha,mode=max
|
|
1
|
+
name: Docker
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
# Called by publish.yml on release so the image exists before registry publishing
|
|
11
|
+
workflow_call:
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
REGISTRY: ghcr.io
|
|
15
|
+
IMAGE_NAME: ${{ github.repository }}
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read
|
|
22
|
+
packages: write
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
- name: Checkout repository
|
|
26
|
+
uses: actions/checkout@v4
|
|
27
|
+
|
|
28
|
+
- name: Set up Docker Buildx
|
|
29
|
+
uses: docker/setup-buildx-action@v3
|
|
30
|
+
|
|
31
|
+
- name: Log into registry ${{ env.REGISTRY }}
|
|
32
|
+
if: github.event_name != 'pull_request'
|
|
33
|
+
uses: docker/login-action@v3
|
|
34
|
+
with:
|
|
35
|
+
registry: ${{ env.REGISTRY }}
|
|
36
|
+
username: ${{ github.actor }}
|
|
37
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
38
|
+
|
|
39
|
+
- name: Extract Docker metadata
|
|
40
|
+
id: meta
|
|
41
|
+
uses: docker/metadata-action@v5
|
|
42
|
+
with:
|
|
43
|
+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
44
|
+
tags: |
|
|
45
|
+
type=ref,event=branch
|
|
46
|
+
type=ref,event=pr
|
|
47
|
+
type=semver,pattern={{version}}
|
|
48
|
+
type=semver,pattern={{major}}.{{minor}}
|
|
49
|
+
type=sha,format=long
|
|
50
|
+
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
|
|
51
|
+
|
|
52
|
+
- name: Build and push Docker image
|
|
53
|
+
uses: docker/build-push-action@v5
|
|
54
|
+
with:
|
|
55
|
+
context: .
|
|
56
|
+
push: ${{ github.event_name != 'pull_request' }}
|
|
57
|
+
tags: ${{ steps.meta.outputs.tags }}
|
|
58
|
+
labels: ${{ steps.meta.outputs.labels }}
|
|
59
|
+
cache-from: type=gha
|
|
60
|
+
cache-to: type=gha,mode=max
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths: ["docs/**", "mkdocs.yml", ".github/workflows/docs.yml"]
|
|
7
|
+
pull_request:
|
|
8
|
+
paths: ["docs/**", "mkdocs.yml", ".github/workflows/docs.yml"]
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- uses: astral-sh/setup-uv@v6
|
|
18
|
+
with:
|
|
19
|
+
enable-cache: true
|
|
20
|
+
|
|
21
|
+
- name: Build site
|
|
22
|
+
run: uv run --frozen --only-group docs mkdocs build --strict
|
|
23
|
+
|
|
24
|
+
- uses: actions/upload-pages-artifact@v3
|
|
25
|
+
if: github.event_name != 'pull_request'
|
|
26
|
+
with:
|
|
27
|
+
path: site
|
|
28
|
+
|
|
29
|
+
deploy:
|
|
30
|
+
if: github.event_name != 'pull_request'
|
|
31
|
+
needs: build
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
permissions:
|
|
34
|
+
pages: write
|
|
35
|
+
id-token: write
|
|
36
|
+
environment:
|
|
37
|
+
name: github-pages
|
|
38
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
39
|
+
steps:
|
|
40
|
+
- id: deployment
|
|
41
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
pypi:
|
|
9
|
+
name: Publish to PyPI
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment: pypi
|
|
12
|
+
permissions:
|
|
13
|
+
id-token: write # PyPI Trusted Publishing (OIDC), no token needed
|
|
14
|
+
contents: read
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- uses: astral-sh/setup-uv@v6
|
|
19
|
+
with:
|
|
20
|
+
enable-cache: true
|
|
21
|
+
|
|
22
|
+
- name: Check tag matches version
|
|
23
|
+
run: test "v$(uv version --short)" = "${GITHUB_REF_NAME}"
|
|
24
|
+
|
|
25
|
+
- name: Build
|
|
26
|
+
run: uv build
|
|
27
|
+
|
|
28
|
+
- name: Publish
|
|
29
|
+
run: uv publish
|
|
30
|
+
|
|
31
|
+
image:
|
|
32
|
+
name: Publish image to ghcr.io
|
|
33
|
+
uses: ./.github/workflows/docker.yml
|
|
34
|
+
permissions:
|
|
35
|
+
contents: read
|
|
36
|
+
packages: write
|
|
37
|
+
|
|
38
|
+
mcp-registry:
|
|
39
|
+
name: Publish to MCP Registry
|
|
40
|
+
needs: [pypi, image]
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
permissions:
|
|
43
|
+
id-token: write # GitHub OIDC login to the registry
|
|
44
|
+
contents: read
|
|
45
|
+
env:
|
|
46
|
+
MCP_PUBLISHER_VERSION: v1.8.1
|
|
47
|
+
steps:
|
|
48
|
+
- uses: actions/checkout@v4
|
|
49
|
+
|
|
50
|
+
- name: Set server.json version from tag
|
|
51
|
+
run: |
|
|
52
|
+
VERSION="${GITHUB_REF_NAME#v}"
|
|
53
|
+
jq --arg v "$VERSION" '.version = $v
|
|
54
|
+
| .packages[0].version = $v
|
|
55
|
+
| .packages[1].identifier = "ghcr.io/alaturqua/mcp-trino-python:\($v)"' server.json > server.tmp
|
|
56
|
+
mv server.tmp server.json
|
|
57
|
+
|
|
58
|
+
- name: Install mcp-publisher
|
|
59
|
+
run: |
|
|
60
|
+
curl -fsSL "https://github.com/modelcontextprotocol/registry/releases/download/${MCP_PUBLISHER_VERSION}/mcp-publisher_linux_amd64.tar.gz" | tar xz mcp-publisher
|
|
61
|
+
|
|
62
|
+
- name: Publish
|
|
63
|
+
run: |
|
|
64
|
+
./mcp-publisher login github-oidc
|
|
65
|
+
./mcp-publisher publish
|
|
66
|
+
|
|
67
|
+
mcpb:
|
|
68
|
+
name: Attach Claude Desktop extension (.mcpb) to the release
|
|
69
|
+
needs: pypi
|
|
70
|
+
runs-on: ubuntu-latest
|
|
71
|
+
permissions:
|
|
72
|
+
contents: write # upload the release asset
|
|
73
|
+
steps:
|
|
74
|
+
- uses: actions/checkout@v4
|
|
75
|
+
|
|
76
|
+
- uses: actions/setup-node@v4
|
|
77
|
+
with:
|
|
78
|
+
node-version: 22
|
|
79
|
+
|
|
80
|
+
- name: Build bundle
|
|
81
|
+
run: |
|
|
82
|
+
npm install -g @anthropic-ai/mcpb@2.1.2
|
|
83
|
+
jq --arg v "${GITHUB_REF_NAME#v}" '.version = $v' mcpb/manifest.json > m.tmp && mv m.tmp mcpb/manifest.json
|
|
84
|
+
sh mcpb/pack.sh
|
|
85
|
+
|
|
86
|
+
- name: Upload to release
|
|
87
|
+
env:
|
|
88
|
+
GH_TOKEN: ${{ github.token }}
|
|
89
|
+
run: gh release upload "$GITHUB_REF_NAME" dist/mcp-trino-python.mcpb --clobber
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Start Trino
|
|
16
|
+
run: docker compose up -d --wait trino
|
|
17
|
+
|
|
18
|
+
- uses: astral-sh/setup-uv@v6
|
|
19
|
+
with:
|
|
20
|
+
enable-cache: true
|
|
21
|
+
|
|
22
|
+
- name: Install
|
|
23
|
+
run: uv sync --frozen
|
|
24
|
+
|
|
25
|
+
- name: Lint
|
|
26
|
+
run: uv run ruff check && uv run ruff format --check
|
|
27
|
+
|
|
28
|
+
- name: Test
|
|
29
|
+
run: uv run pytest -v
|
|
30
|
+
|
|
31
|
+
- name: Validate server.json
|
|
32
|
+
run: uvx check-jsonschema --schemafile "$(jq -r '."$schema"' server.json)" server.json
|
|
33
|
+
|
|
34
|
+
- name: Validate Claude Desktop manifest
|
|
35
|
+
run: npx -y @anthropic-ai/mcpb@2.1.2 validate mcpb/manifest.json
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
FROM python:3.12-slim
|
|
2
|
+
|
|
3
|
+
LABEL io.modelcontextprotocol.server.name="io.github.alaturqua/mcp-trino-python" \
|
|
4
|
+
org.opencontainers.image.source="https://github.com/alaturqua/mcp-trino-python" \
|
|
5
|
+
org.opencontainers.image.description="MCP server for Trino and Iceberg" \
|
|
6
|
+
org.opencontainers.image.licenses="Apache-2.0"
|
|
7
|
+
|
|
8
|
+
WORKDIR /app
|
|
9
|
+
|
|
10
|
+
ENV UV_COMPILE_BYTECODE=1 \
|
|
11
|
+
UV_LINK_MODE=copy \
|
|
12
|
+
PYTHONUNBUFFERED=1 \
|
|
13
|
+
MCP_HOST=0.0.0.0 \
|
|
14
|
+
MCP_PORT=8000
|
|
15
|
+
|
|
16
|
+
COPY --from=ghcr.io/astral-sh/uv:0.13.5 /uv /bin/
|
|
17
|
+
|
|
18
|
+
# Dependencies first for layer caching, then the project itself
|
|
19
|
+
COPY pyproject.toml uv.lock ./
|
|
20
|
+
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
21
|
+
uv sync --frozen --no-dev --no-install-project
|
|
22
|
+
COPY README.md ./
|
|
23
|
+
COPY src/ src/
|
|
24
|
+
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
25
|
+
uv sync --frozen --no-dev --no-editable
|
|
26
|
+
|
|
27
|
+
ENV PATH="/app/.venv/bin:$PATH"
|
|
28
|
+
|
|
29
|
+
RUN useradd --create-home --uid 1000 mcp
|
|
30
|
+
USER mcp
|
|
31
|
+
|
|
32
|
+
EXPOSE 8000
|
|
33
|
+
|
|
34
|
+
# stdio by default (what MCP clients spawn); use `--transport http` for a remote server on :8000/mcp
|
|
35
|
+
ENTRYPOINT ["mcp-trino"]
|
|
36
|
+
CMD ["--transport", "stdio"]
|