Skip to content

Commit 46414d0

Browse files
feat: Add toolset selection when using stdio server (#42)
* chore: fix target params * feat: Add toolset support to stdio
1 parent 5b0086f commit 46414d0

13 files changed

Lines changed: 9050 additions & 3564 deletions

File tree

.github/workflows/release.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: release-${{ github.ref }}
11+
cancel-in-progress: false
12+
13+
jobs:
14+
semantic-release:
15+
runs-on: ubuntu-latest
16+
outputs:
17+
released: ${{ steps.release.outputs.released }}
18+
tag: ${{ steps.release.outputs.tag }}
19+
permissions:
20+
contents: write
21+
issues: write
22+
pull-requests: write
23+
id-token: write
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v5
28+
with:
29+
fetch-depth: 0
30+
persist-credentials: true
31+
32+
- name: Setup Node.js
33+
uses: actions/setup-node@v5
34+
with:
35+
node-version: 'lts/*'
36+
registry-url: 'https://registry.npmjs.org'
37+
38+
- name: Install dependencies
39+
run: npm ci
40+
41+
- name: Build
42+
run: npm run build --if-present
43+
44+
- name: Semantic release
45+
id: release
46+
env:
47+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
48+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
49+
run: |
50+
set -e
51+
BEFORE=$(git describe --tags --abbrev=0 2>/dev/null || true)
52+
npx semantic-release
53+
AFTER=$(git describe --tags --abbrev=0 2>/dev/null || true)
54+
if [ -n "$AFTER" ] && [ "$BEFORE" != "$AFTER" ]; then
55+
echo "released=true" >> "$GITHUB_OUTPUT"
56+
echo "tag=$AFTER" >> "$GITHUB_OUTPUT"
57+
else
58+
echo "released=false" >> "$GITHUB_OUTPUT"
59+
fi
60+
61+
mcp-publish:
62+
needs: semantic-release
63+
if: needs.semantic-release.outputs.released == 'true'
64+
runs-on: ubuntu-latest
65+
permissions:
66+
id-token: write
67+
contents: read
68+
69+
steps:
70+
- name: Checkout tag
71+
uses: actions/checkout@v5
72+
with:
73+
ref: ${{ needs.semantic-release.outputs.tag }}
74+
75+
- name: Setup Node.js
76+
uses: actions/setup-node@v5
77+
with:
78+
node-version: 'lts/*'
79+
80+
- name: Install dependencies
81+
run: npm ci
82+
83+
- name: Build package
84+
run: npm run build --if-present
85+
86+
- name: Install MCP Publisher
87+
run: |
88+
curl -L "https://github.com/modelcontextprotocol/registry/releases/download/v1.1.0/mcp-publisher_1.1.0_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
89+
90+
- name: Login to MCP Registry
91+
run: ./mcp-publisher login github-oidc
92+
93+
- name: Publish to MCP Registry
94+
run: ./mcp-publisher publish

.releaserc.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"branches": ["main"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
"@semantic-release/changelog",
7+
[
8+
"@semantic-release/npm",
9+
{
10+
"npmPublish": true
11+
}
12+
],
13+
"@semantic-release/github",
14+
[
15+
"@semantic-release/git",
16+
{
17+
"assets": ["package.json", "package-lock.json", "CHANGELOG.md"],
18+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
19+
}
20+
]
21+
]
22+
}

CONTRIBUTING.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1 @@
11
# Contributing
2-
3-
# Development
4-
5-
The `mcps-logger` package is used to redirect stdio logs into the console during development. To
6-
enable the logger:
7-
8-
1. Set the `ENABLE_MCPS_LOGGER` env to `true`.
9-
10-
2. Build MCP server and run it with a client.
11-
12-
3. Run `npx mcps-logger` in a new terminal tab.
13-
14-
Now logs like `console.log("test")` should show up in the new terminal tab.

README.md

Lines changed: 72 additions & 50 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)