Skip to content

Commit a562767

Browse files
Merge pull request #1 from stainless-api/release-please--branches--main--changes--next--components--dbahn-stations
release: 1.0.0
2 parents a9a23ed + 57228a1 commit a562767

File tree

15 files changed

+256
-41
lines changed

15 files changed

+256
-41
lines changed

.github/workflows/publish-npm.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# This workflow is triggered when a GitHub release is created.
2+
# It can also be run manually to re-publish to NPM in case it failed for some reason.
3+
# You can run this workflow by navigating to https://www.github.com/stainless-api/dbahn-stations-typescript/actions/workflows/publish-npm.yml
4+
name: Publish NPM
5+
on:
6+
workflow_dispatch:
7+
inputs:
8+
path:
9+
description: The path to run the release in, e.g. '.' or 'packages/mcp-server'
10+
required: true
11+
12+
release:
13+
types: [published]
14+
15+
jobs:
16+
publish:
17+
name: publish
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: write
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Set up Node
26+
uses: actions/setup-node@v3
27+
with:
28+
node-version: '20'
29+
30+
- name: Set up pnpm
31+
uses: pnpm/action-setup@v4
32+
33+
- name: Install dependencies
34+
run: |
35+
pnpm install
36+
37+
- name: Publish to NPM
38+
run: |
39+
if [ -n "${{ github.event.inputs.path }}" ]; then
40+
PATHS_RELEASED='[\"${{ github.event.inputs.path }}\"]'
41+
else
42+
PATHS_RELEASED='[\".\", \"packages/mcp-server\"]'
43+
fi
44+
pnpm tsn scripts/publish-packages.ts "{ \"paths_released\": \"$PATHS_RELEASED\" }"
45+
env:
46+
NPM_TOKEN: ${{ secrets.DBAHN_STATIONS_NPM_TOKEN || secrets.NPM_TOKEN }}
47+
48+
- name: Upload MCP Server DXT GitHub release asset
49+
run: |
50+
gh release upload ${{ github.event.release.tag_name }} \
51+
packages/mcp-server/dbahn_stations_api.mcpb
52+
env:
53+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release Doctor
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
8+
jobs:
9+
release_doctor:
10+
name: release doctor
11+
runs-on: ubuntu-latest
12+
if: github.repository == 'stainless-api/dbahn-stations-typescript' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Check release environment
18+
run: |
19+
bash ./bin/check-release-environment
20+
env:
21+
NPM_TOKEN: ${{ secrets.DBAHN_STATIONS_NPM_TOKEN || secrets.NPM_TOKEN }}
22+

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "1.0.0"
3+
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 4
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/references%2Fdbahn-stations-2a72886a1ec37a86550e3c5137230284269a32a606b28816e214905c8b06f677.yml
33
openapi_spec_hash: 7c2a8cbfc4afd14d0ea8dbb3c3eb2e6a
4-
config_hash: a996ee7b58cc2c0f3b880a503024080a
4+
config_hash: 05f9ba56e7143961fa36c22bada6d450

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Changelog
2+
3+
## 1.0.0 (2025-12-10)
4+
5+
Full Changelog: [v0.0.1...v1.0.0](https://github.com/stainless-api/dbahn-stations-typescript/compare/v0.0.1...v1.0.0)
6+
7+
### Features
8+
9+
* **mcp:** add typescript check to code execution tool ([eff235b](https://github.com/stainless-api/dbahn-stations-typescript/commit/eff235b644c69ca3f28dec4d47b142188c6f1642))
10+
* **mcp:** handle code mode calls in the Stainless API ([d892d76](https://github.com/stainless-api/dbahn-stations-typescript/commit/d892d7609e3fd1f0a5b94229395a2aeaabf372f6))
11+
12+
13+
### Bug Fixes
14+
15+
* **mcp:** correct code tool API endpoint ([3995f04](https://github.com/stainless-api/dbahn-stations-typescript/commit/3995f04594ea100bb3a3161b8ecb88a004d87cc1))
16+
* **mcp:** return correct lines on typescript errors ([3dfff0a](https://github.com/stainless-api/dbahn-stations-typescript/commit/3dfff0a91b64fa8835eabc7e37fc89a28c59da24))
17+
18+
19+
### Chores
20+
21+
* configure new SDK language ([63460e8](https://github.com/stainless-api/dbahn-stations-typescript/commit/63460e81f47218742406a42195bea4083eff713b))
22+
* **internal:** codegen related update ([a9a23ed](https://github.com/stainless-api/dbahn-stations-typescript/commit/a9a23edd001ad74d76e181d207c073770b484947))
23+
* **internal:** codegen related update ([7a093ef](https://github.com/stainless-api/dbahn-stations-typescript/commit/7a093ef2a26b0593684fd477c8f4c02f1a15f3b0))
24+
* **internal:** configure MCP Server hosting ([005cd72](https://github.com/stainless-api/dbahn-stations-typescript/commit/005cd72e94fee7114297a5da4841271474e038e5))
25+
* **internal:** configure pnpm minimumReleaseAge to 1 day ([62740a2](https://github.com/stainless-api/dbahn-stations-typescript/commit/62740a2d74a9e25ff27a7c8175ccfa90fab5bda1))
26+
* update SDK settings ([f1f08bf](https://github.com/stainless-api/dbahn-stations-typescript/commit/f1f08bf94b80aa8e115785bb3ec8bf6df79b6b12))
27+
* update SDK settings ([914fb2e](https://github.com/stainless-api/dbahn-stations-typescript/commit/914fb2eae98add15b5c2e58971b59130c2e346d1))
28+
* use latest @modelcontextprotocol/sdk ([9f606ca](https://github.com/stainless-api/dbahn-stations-typescript/commit/9f606ca09313d0ad58f3868e80a1609fb45206a4))

CONTRIBUTING.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ If you’d like to use the repository from source, you can either install from g
4242
To install via git:
4343

4444
```sh
45-
$ npm install git+ssh://[email protected]:stainless-sdks/dbahn-stations-typescript.git
45+
$ npm install git+ssh://[email protected]:stainless-api/dbahn-stations-typescript.git
4646
```
4747

4848
Alternatively, to link a local copy of the repo:
4949

5050
```sh
5151
# Clone
52-
$ git clone https://www.github.com/stainless-sdks/dbahn-stations-typescript
52+
$ git clone https://www.github.com/stainless-api/dbahn-stations-typescript
5353
$ cd dbahn-stations-typescript
5454

5555
# With yarn
@@ -91,3 +91,17 @@ To format and fix all lint issues automatically:
9191
```sh
9292
$ pnpm fix
9393
```
94+
95+
## Publishing and releases
96+
97+
Changes made to this repository via the automated release PR pipeline should publish to npm automatically. If
98+
the changes aren't made through the automated pipeline, you may want to make releases manually.
99+
100+
### Publish with a GitHub workflow
101+
102+
You can release to package managers by using [the `Publish NPM` GitHub action](https://www.github.com/stainless-api/dbahn-stations-typescript/actions/workflows/publish-npm.yml). This requires a setup organization or repository secret to be set up.
103+
104+
### Publish manually
105+
106+
If you need to manually release a package, you can run the `bin/publish-npm` script with an `NPM_TOKEN` set on
107+
the environment.

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@ It is generated with [Stainless](https://www.stainless.com/).
1111
## Installation
1212

1313
```sh
14-
npm install git+ssh://[email protected]:stainless-sdks/dbahn-stations-typescript.git
14+
npm install dbahn-stations
1515
```
1616

17-
> [!NOTE]
18-
> Once this package is [published to npm](https://www.stainless.com/docs/guides/publish), this will become: `npm install dbahn-stations`
19-
2017
## Usage
2118

2219
The full API of this library can be found in [api.md](api.md).
@@ -337,7 +334,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
337334

338335
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
339336

340-
We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/dbahn-stations-typescript/issues) with questions, bugs, or suggestions.
337+
We are keen for your feedback; please open an [issue](https://www.github.com/stainless-api/dbahn-stations-typescript/issues) with questions, bugs, or suggestions.
341338

342339
## Requirements
343340

bin/check-release-environment

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env bash
2+
3+
errors=()
4+
5+
if [ -z "${NPM_TOKEN}" ]; then
6+
errors+=("The NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
7+
fi
8+
9+
lenErrors=${#errors[@]}
10+
11+
if [[ lenErrors -gt 0 ]]; then
12+
echo -e "Found the following errors in the release environment:\n"
13+
14+
for error in "${errors[@]}"; do
15+
echo -e "- $error\n"
16+
done
17+
18+
exit 1
19+
fi
20+
21+
echo "The environment is ready to push releases!"
22+

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "dbahn-stations",
3-
"version": "0.0.1",
3+
"version": "1.0.0",
44
"description": "The official TypeScript library for the Dbahn Stations API",
55
"author": "Dbahn Stations <[email protected]>",
66
"types": "dist/index.d.ts",
77
"main": "dist/index.js",
88
"type": "commonjs",
9-
"repository": "github:stainless-sdks/dbahn-stations-typescript",
9+
"repository": "github:stainless-api/dbahn-stations-typescript",
1010
"license": "Apache-2.0",
1111
"packageManager": "[email protected]",
1212
"files": [

packages/mcp-server/README.md

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,18 @@ It is generated with [Stainless](https://www.stainless.com/).
44

55
## Installation
66

7-
### Building
7+
### Direct invocation
88

9-
Because it's not published yet, clone the repo and build it:
9+
You can run the MCP Server directly via `npx`:
1010

1111
```sh
12-
git clone [email protected]:stainless-sdks/dbahn-stations-typescript.git
13-
cd dbahn-stations-typescript
14-
./scripts/bootstrap
15-
./scripts/build
16-
```
17-
18-
### Running
19-
20-
```sh
21-
# set env vars as needed
2212
export DBAHN_STATIONS_CLIENT_ID="My Client ID"
2313
export DBAHN_STATIONS_CLIENT_SECRET="My Client Secret"
24-
node ./packages/mcp-server/dist/index.js
14+
npx -y dbahn-stations-mcp@latest
2515
```
2616

27-
> [!NOTE]
28-
> Once this package is [published to npm](https://www.stainless.com/docs/guides/publish), this will become: `npx -y dbahn-stations-mcp`
29-
3017
### Via MCP Client
3118

32-
[Build the project](#building) as mentioned above.
33-
3419
There is a partial list of existing clients at [modelcontextprotocol.io](https://modelcontextprotocol.io/clients). If you already
3520
have a client, consult their documentation to install the MCP server.
3621

@@ -40,12 +25,8 @@ For clients with a configuration JSON, it might look something like this:
4025
{
4126
"mcpServers": {
4227
"dbahn_stations_api": {
43-
"command": "node",
44-
"args": [
45-
"/path/to/local/dbahn-stations-typescript/packages/mcp-server",
46-
"--client=claude",
47-
"--tools=all"
48-
],
28+
"command": "npx",
29+
"args": ["-y", "dbahn-stations-mcp", "--client=claude", "--tools=all"],
4930
"env": {
5031
"DBAHN_STATIONS_CLIENT_ID": "My Client ID",
5132
"DBAHN_STATIONS_CLIENT_SECRET": "My Client Secret"
@@ -55,6 +36,29 @@ For clients with a configuration JSON, it might look something like this:
5536
}
5637
```
5738

39+
### Cursor
40+
41+
If you use Cursor, you can install the MCP server by using the button below. You will need to set your environment variables
42+
in Cursor's `mcp.json`, which can be found in Cursor Settings > Tools & MCP > New MCP Server.
43+
44+
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=dbahn-stations-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImRiYWhuLXN0YXRpb25zLW1jcCJdLCJlbnYiOnsiREJBSE5fU1RBVElPTlNfQ0xJRU5UX0lEIjoiU2V0IHlvdXIgREJBSE5fU1RBVElPTlNfQ0xJRU5UX0lEIGhlcmUuIiwiREJBSE5fU1RBVElPTlNfQ0xJRU5UX1NFQ1JFVCI6IlNldCB5b3VyIERCQUhOX1NUQVRJT05TX0NMSUVOVF9TRUNSRVQgaGVyZS4ifX0)
45+
46+
### VS Code
47+
48+
If you use MCP, you can install the MCP server by clicking the link below. You will need to set your environment variables
49+
in VS Code's `mcp.json`, which can be found via Command Palette > MCP: Open User Configuration.
50+
51+
[Open VS Code](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22dbahn-stations-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22dbahn-stations-mcp%22%5D%2C%22env%22%3A%7B%22DBAHN_STATIONS_CLIENT_ID%22%3A%22Set%20your%20DBAHN_STATIONS_CLIENT_ID%20here.%22%2C%22DBAHN_STATIONS_CLIENT_SECRET%22%3A%22Set%20your%20DBAHN_STATIONS_CLIENT_SECRET%20here.%22%7D%7D)
52+
53+
### Claude Code
54+
55+
If you use Claude Code, you can install the MCP server by running the command below in your terminal. You will need to set your
56+
environment variables in Claude Code's `.claude.json`, which can be found in your home directory.
57+
58+
```
59+
claude mcp add --transport stdio dbahn_stations_api --env DBAHN_STATIONS_CLIENT_ID="Your DBAHN_STATIONS_CLIENT_ID here." DBAHN_STATIONS_CLIENT_SECRET="Your DBAHN_STATIONS_CLIENT_SECRET here." -- npx -y dbahn-stations-mcp
60+
```
61+
5862
## Exposing endpoints to your MCP Client
5963

6064
There are three ways to expose endpoints as tools in the MCP server:

0 commit comments

Comments
 (0)