Skip to content

Commit 7fc7e22

Browse files
Merge pull request #5 from CASParser/release-please--branches--main--changes--next--components--cas-parser-node
release: 1.3.0
2 parents ea51628 + e98c59a commit 7fc7e22

25 files changed

+843
-139
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Set up Node
2525
uses: actions/setup-node@v4
2626
with:
27-
node-version: '20'
27+
node-version: '22'
2828

2929
- name: Bootstrap
3030
run: ./scripts/bootstrap
@@ -46,7 +46,7 @@ jobs:
4646
- name: Set up Node
4747
uses: actions/setup-node@v4
4848
with:
49-
node-version: '20'
49+
node-version: '22'
5050

5151
- name: Bootstrap
5252
run: ./scripts/bootstrap
@@ -68,6 +68,15 @@ jobs:
6868
AUTH: ${{ steps.github-oidc.outputs.github_token }}
6969
SHA: ${{ github.sha }}
7070
run: ./scripts/utils/upload-artifact.sh
71+
72+
- name: Upload MCP Server tarball
73+
if: github.repository == 'stainless-sdks/cas-parser-typescript'
74+
env:
75+
URL: https://pkg.stainless.com/s?subpackage=mcp-server
76+
AUTH: ${{ steps.github-oidc.outputs.github_token }}
77+
SHA: ${{ github.sha }}
78+
BUILD_PATH: packages/mcp-server/dist
79+
run: ./scripts/utils/upload-artifact.sh
7180
test:
7281
timeout-minutes: 10
7382
name: test

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.2.0"
2+
".": "1.3.0"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 5
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser%2Fcas-parser-b7fdba3d3f97c7debc22c7ca30b828bce81bcd64648df8c94029b27a3321ebb9.yml
33
openapi_spec_hash: 03f1315f1d32ada42445ca920f047dff
4-
config_hash: d9c1f7b95d5659724df3e026c4fab291
4+
config_hash: cb5d75abef6264b5d86448caf7295afa

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# Changelog
22

3+
## 1.3.0 (2025-08-24)
4+
5+
Full Changelog: [v1.2.0...v1.3.0](https://github.com/CASParser/cas-parser-node/compare/v1.2.0...v1.3.0)
6+
7+
### Features
8+
9+
* **mcp:** add code execution tool ([84904a7](https://github.com/CASParser/cas-parser-node/commit/84904a7f558053aa211b8f483a7b4f6c2b13b8f6))
10+
* **mcp:** add option to infer mcp client ([c190ccd](https://github.com/CASParser/cas-parser-node/commit/c190ccdd5cb6342dc620c26a3d06c0514f693a37))
11+
* **mcp:** parse query string as mcp client options in mcp server ([1f6e085](https://github.com/CASParser/cas-parser-node/commit/1f6e085c4e7e9edf497585587fc3e6603b53a3e3))
12+
13+
14+
### Chores
15+
16+
* add package to package.json ([9a166fa](https://github.com/CASParser/cas-parser-node/commit/9a166fa5baf70f7d0114d1c4dce14a1ac8bf956f))
17+
* **client:** qualify global Blob ([902939b](https://github.com/CASParser/cas-parser-node/commit/902939be47f74826e00ca6b8f73e94f969d96952))
18+
* **internal:** codegen related update ([033f0ef](https://github.com/CASParser/cas-parser-node/commit/033f0ef5142b7f37ec8ccf9c276d5bd9bb3dbe76))
19+
* **internal:** codegen related update ([8463673](https://github.com/CASParser/cas-parser-node/commit/8463673b3bdd581f5d58b7ed18fb782b42cb94d9))
20+
* **internal:** make mcp-server publishing public by defaut ([4bbdb37](https://github.com/CASParser/cas-parser-node/commit/4bbdb3749a70bc35a4e9fdd4b9763a6f79f78a24))
21+
* **internal:** refactor array check ([00cc94f](https://github.com/CASParser/cas-parser-node/commit/00cc94fb85746fc3a79136d22214864673a3c93f))
22+
* **mcp:** add cors to oauth metadata route ([3833155](https://github.com/CASParser/cas-parser-node/commit/3833155c5d3bcca5a7bf6ca0f513e8365db316cc))
23+
* **mcp:** update package.json ([02b1e54](https://github.com/CASParser/cas-parser-node/commit/02b1e541dcf8d3a253c91f55266be3edb3db60e8))
24+
* **mcp:** update types ([db1c76c](https://github.com/CASParser/cas-parser-node/commit/db1c76c3d2a76789d4dc3e5de57a875b7fa091db))
25+
* update CI script ([b359ebc](https://github.com/CASParser/cas-parser-node/commit/b359ebce43e80eead9d0ff40b45a13e6af4c82b1))
26+
327
## 1.2.0 (2025-08-18)
428

529
Full Changelog: [v1.1.0...v1.2.0](https://github.com/CASParser/cas-parser-node/compare/v1.1.0...v1.2.0)

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cas-parser-node",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"description": "The official TypeScript library for the Cas Parser API",
55
"author": "Cas Parser <[email protected]>",
66
"types": "dist/index.d.ts",
@@ -44,8 +44,9 @@
4444
"publint": "^0.2.12",
4545
"ts-jest": "^29.1.0",
4646
"ts-node": "^10.5.0",
47-
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz",
47+
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz",
4848
"tsconfig-paths": "^4.0.0",
49+
"tslib": "^2.8.1",
4950
"typescript": "5.8.3",
5051
"typescript-eslint": "8.31.1"
5152
},

packages/mcp-server/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,19 @@ A configuration JSON for this server might look like this, assuming the server i
150150
}
151151
```
152152

153+
The command-line arguments for filtering tools and specifying clients can also be used as query parameters in the URL.
154+
For example, to exclude specific tools while including others, use the URL:
155+
156+
```
157+
http://localhost:3000?resource=cards&resource=accounts&no_tool=create_cards
158+
```
159+
160+
Or, to configure for the Cursor client, with a custom max tool name length, use the URL:
161+
162+
```
163+
http://localhost:3000?client=cursor&capability=tool-name-length%3D40
164+
```
165+
153166
## Importing the tools and server individually
154167

155168
```js

packages/mcp-server/package.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cas-parser-node-mcp",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"description": "The official MCP Server for the Cas Parser API",
55
"author": "Cas Parser <[email protected]>",
66
"types": "dist/index.d.ts",
@@ -15,6 +15,9 @@
1515
"license": "Apache-2.0",
1616
"packageManager": "[email protected]",
1717
"private": false,
18+
"publishConfig": {
19+
"access": "public"
20+
},
1821
"scripts": {
1922
"test": "jest",
2023
"build": "bash ./build",
@@ -28,20 +31,26 @@
2831
},
2932
"dependencies": {
3033
"cas-parser-node": "file:../../dist/",
34+
"@cloudflare/cabidela": "^0.2.4",
3135
"@modelcontextprotocol/sdk": "^1.11.5",
36+
"@valtown/deno-http-worker": "^0.0.21",
37+
"cors": "^2.8.5",
3238
"express": "^5.1.0",
3339
"jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz",
40+
"qs": "^6.14.0",
3441
"yargs": "^17.7.2",
35-
"@cloudflare/cabidela": "^0.2.4",
3642
"zod": "^3.25.20",
37-
"zod-to-json-schema": "^3.24.5"
43+
"zod-to-json-schema": "^3.24.5",
44+
"zod-validation-error": "^4.0.1"
3845
},
3946
"bin": {
4047
"mcp-server": "dist/index.js"
4148
},
4249
"devDependencies": {
43-
"@types/jest": "^29.4.0",
50+
"@types/cors": "^2.8.19",
4451
"@types/express": "^5.0.3",
52+
"@types/jest": "^29.4.0",
53+
"@types/qs": "^6.14.0",
4554
"@types/yargs": "^17.0.8",
4655
"@typescript-eslint/eslint-plugin": "8.31.1",
4756
"@typescript-eslint/parser": "8.31.1",
@@ -53,7 +62,7 @@
5362
"ts-jest": "^29.1.0",
5463
"ts-morph": "^19.0.0",
5564
"ts-node": "^10.5.0",
56-
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz",
65+
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz",
5766
"tsconfig-paths": "^4.0.0",
5867
"typescript": "5.8.3"
5968
},
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
export const workerPath = require.resolve('./code-tool-worker.mjs');
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
import { ClientOptions } from 'cas-parser-node';
4+
5+
export type WorkerInput = {
6+
opts: ClientOptions;
7+
code: string;
8+
};
9+
export type WorkerSuccess = {
10+
result: unknown | null;
11+
logLines: string[];
12+
errLines: string[];
13+
};
14+
export type WorkerError = { message: string | undefined };
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
import util from 'node:util';
4+
import { WorkerInput, WorkerSuccess, WorkerError } from './code-tool-types';
5+
import { CasParser } from 'cas-parser-node';
6+
7+
const fetch = async (req: Request): Promise<Response> => {
8+
const { opts, code } = (await req.json()) as WorkerInput;
9+
const client = new CasParser({
10+
...opts,
11+
});
12+
13+
const logLines: string[] = [];
14+
const errLines: string[] = [];
15+
const console = {
16+
log: (...args: unknown[]) => {
17+
logLines.push(util.format(...args));
18+
},
19+
error: (...args: unknown[]) => {
20+
errLines.push(util.format(...args));
21+
},
22+
};
23+
try {
24+
let run_ = async (client: any) => {};
25+
eval(`
26+
${code}
27+
run_ = run;
28+
`);
29+
const result = await run_(client);
30+
return Response.json({
31+
result,
32+
logLines,
33+
errLines,
34+
} satisfies WorkerSuccess);
35+
} catch (e) {
36+
const message = e instanceof Error ? e.message : undefined;
37+
return Response.json(
38+
{
39+
message,
40+
} satisfies WorkerError,
41+
{ status: 400, statusText: 'Code execution error' },
42+
);
43+
}
44+
};
45+
46+
export default { fetch };

0 commit comments

Comments
 (0)