Skip to content

Commit 5292b20

Browse files
author
sergey-ermakovich
committed
Initial commit: google-flights MCP server (docs, server.json, npm/PyPI launchers, contract test)
0 parents  commit 5292b20

13 files changed

Lines changed: 767 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Something in the README is wrong
3+
about: A tool table, a response sample or a documented behaviour does not match reality
4+
labels: documentation
5+
---
6+
7+
**Where in the README**
8+
9+
Section or heading.
10+
11+
**What it says**
12+
13+
Quote the line.
14+
15+
**The call you made**
16+
17+
Tool name and arguments, or the equivalent REST URL with your key removed.
18+
19+
**What came back**
20+
21+
Trimmed response, with anything private removed.

.github/workflows/contract.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# The tool contract is checked on a schedule as well as on push, because the upstream tool list
2+
# can change without a single commit in this repository.
3+
name: tool contract
4+
5+
on:
6+
push:
7+
branches: [main]
8+
pull_request:
9+
schedule:
10+
- cron: '0 6 * * 1'
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
contract:
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 5
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: '22'
25+
# Forks cannot read repository secrets. The suite skips its live checks when the key is
26+
# absent, so a pull request from a fork stays green instead of failing for a reason the
27+
# contributor cannot fix.
28+
- name: Assert the tool list still matches the README
29+
env:
30+
HASDATA_API_KEY: ${{ secrets.HASDATA_API_KEY }}
31+
run: npm test

.github/workflows/publish.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Publishes the npm and PyPI wrapper packages on a version tag, using OIDC
2+
# trusted publishing. No NPM_TOKEN or PYPI_TOKEN is stored anywhere: GitHub
3+
# mints a short-lived OIDC token per run, and npmjs.org / pypi.org accept it
4+
# because this repo + workflow are configured as trusted publishers.
5+
#
6+
# One-time setup, done once per package on the registries (not in this repo):
7+
# npmjs.org -> package settings -> Trusted Publisher -> GitHub Actions,
8+
# repo HasData/google-flights-mcp, workflow publish.yml
9+
# pypi.org -> the hasdata org -> Publishing -> add a trusted publisher
10+
# (pending publisher works before the first release),
11+
# repo HasData/google-flights-mcp, workflow publish.yml
12+
#
13+
# The MCP registry entry (com.hasdata/google-flights) is NOT published here. It uses
14+
# domain auth, which would need the namespace-wide Ed25519 key as a secret in
15+
# every repo. That key stays off CI; the registry entry is published by hand
16+
# when server.json changes, after the package versions below are live.
17+
#
18+
# Release: bump nothing by hand. Tag the commit `vX.Y.Z` and push the tag; the
19+
# tag is the single source of the version and is written into both manifests.
20+
21+
name: publish
22+
23+
on:
24+
push:
25+
tags: ['v*.*.*']
26+
27+
permissions:
28+
contents: read
29+
id-token: write
30+
31+
jobs:
32+
npm:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: actions/setup-node@v4
37+
with:
38+
node-version: '22'
39+
registry-url: 'https://registry.npmjs.org'
40+
- name: Set version from the tag
41+
run: npm version "${GITHUB_REF_NAME#v}" --no-git-tag-version --allow-same-version
42+
- name: Publish to npm (OIDC, no token)
43+
run: npm publish --access public
44+
45+
pypi:
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: actions/checkout@v4
49+
- uses: actions/setup-python@v5
50+
with:
51+
python-version: '3.12'
52+
- name: Set version from the tag
53+
run: |
54+
python - "${GITHUB_REF_NAME#v}" <<'PY'
55+
import re, sys
56+
v = sys.argv[1]
57+
p = "pyproject.toml"
58+
t = open(p, encoding="utf-8").read()
59+
t = re.sub(r'(?m)^version = ".*"$', f'version = "{v}"', t, count=1)
60+
open(p, "w", encoding="utf-8", newline="\n").write(t)
61+
PY
62+
- name: Build the wheel and sdist
63+
run: pipx run build
64+
- name: Publish to PyPI (OIDC, no token)
65+
uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
node_modules/
2+
package-lock.json
3+
dist/
4+
build/
5+
*.egg-info/
6+
__pycache__/
7+
*.pyc
8+
.env
9+
.env.*
10+
.DS_Store
11+
*.log

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 HasData
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)