Skip to content

Commit bb779d9

Browse files
authored
Merge pull request #33 from isaacus-dev/release-please--branches--main--changes--next--components--isaacus
release: 0.5.0
2 parents fe46e2f + 1eeda59 commit bb779d9

File tree

18 files changed

+640
-62
lines changed

18 files changed

+640
-62
lines changed

.release-please-manifest.json

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

CHANGELOG.md

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

3+
## 0.5.0 (2025-04-05)
4+
5+
Full Changelog: [v0.4.0...v0.5.0](https://github.com/isaacus-dev/isaacus-typescript/compare/v0.4.0...v0.5.0)
6+
7+
### Features
8+
9+
* **mcp:** support end-user filtering of tools, resources, and tags ([#35](https://github.com/isaacus-dev/isaacus-typescript/issues/35)) ([c3c597f](https://github.com/isaacus-dev/isaacus-typescript/commit/c3c597f21cebbb6e14e9b87fa87d543697afeb7f))
10+
11+
12+
### Bug Fixes
13+
14+
* **api:** improve type resolution when importing as a package ([#37](https://github.com/isaacus-dev/isaacus-typescript/issues/37)) ([db9ceca](https://github.com/isaacus-dev/isaacus-typescript/commit/db9ceca29582d073446736def120d22a2d75a9c9))
15+
* **client:** send `X-Stainless-Timeout` in seconds ([#34](https://github.com/isaacus-dev/isaacus-typescript/issues/34)) ([979c453](https://github.com/isaacus-dev/isaacus-typescript/commit/979c453293006d0f841901df8f3383f5785b00a6))
16+
* **mcp:** remove debug logging ([#39](https://github.com/isaacus-dev/isaacus-typescript/issues/39)) ([91f4483](https://github.com/isaacus-dev/isaacus-typescript/commit/91f4483b3fef0e215ec59dfb10f557efce6fc3fe))
17+
18+
19+
### Chores
20+
21+
* **internal:** add aliases for Record and Array ([#36](https://github.com/isaacus-dev/isaacus-typescript/issues/36)) ([f2f08fa](https://github.com/isaacus-dev/isaacus-typescript/commit/f2f08fa2f6fcec5979d6c575dbd0347b8af77123))
22+
* **internal:** version bump ([#32](https://github.com/isaacus-dev/isaacus-typescript/issues/32)) ([e1992ce](https://github.com/isaacus-dev/isaacus-typescript/commit/e1992ce3ade04471fdd437d753af418ed80836f4))
23+
24+
25+
### Documentation
26+
27+
* **mcp:** improve MCP readme docs ([#38](https://github.com/isaacus-dev/isaacus-typescript/issues/38)) ([2bb3f29](https://github.com/isaacus-dev/isaacus-typescript/commit/2bb3f29e9a41b834f17783cd26cce1bfb3e5c5ed))
28+
* **mcp:** update env vars in README ([#40](https://github.com/isaacus-dev/isaacus-typescript/issues/40)) ([5cc72f4](https://github.com/isaacus-dev/isaacus-typescript/commit/5cc72f48910c6721213b17eb569d075b4d584b14))
29+
330
## 0.4.0 (2025-04-01)
431

532
Full Changelog: [v0.3.1...v0.4.0](https://github.com/isaacus-dev/isaacus-typescript/compare/v0.3.1...v0.4.0)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "isaacus",
3-
"version": "0.4.0",
3+
"version": "0.5.0",
44
"description": "The official TypeScript library for the Isaacus API",
55
"author": "Isaacus <[email protected]>",
66
"types": "dist/index.d.ts",

packages/mcp-server/README.md

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

55
## Installation
66

7-
### Via Claude Desktop
7+
### Direct invocation
88

9-
See [the user guide](https://modelcontextprotocol.io/quickstart/user) for setup.
9+
You can run the MCP Server directly via `npx`:
1010

11-
Once it's set up, add your MCP server to your `claude_desktop_config.json` file to enable it.
11+
```sh
12+
export ISAACUS_API_KEY="My API Key"
13+
npx -y isaacus-mcp
14+
```
1215

13-
The configuration file should be at:
16+
### Via MCP Client
1417

15-
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
16-
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
18+
There is a partial list of existing clients at [modelcontextprotocol.io](https://modelcontextprotocol.io/clients). If you already
19+
have a client, consult their documentation to install the MCP server.
1720

18-
Add the following value to your `mcpServers` section. Make sure to provide any necessary environment variables (like API keys) as well.
21+
For clients with a configuration JSON, it might look something like this:
1922

2023
```json
2124
{
@@ -30,3 +33,68 @@ Add the following value to your `mcpServers` section. Make sure to provide any n
3033
}
3134
}
3235
```
36+
37+
## Filtering tools
38+
39+
You can run the package on the command line to discover and filter the set of tools that are exposed by the
40+
MCP Server. This can be helpful for large APIs where including all endpoints at once is too much for your AI's
41+
context window.
42+
43+
You can filter by multiple aspects:
44+
45+
- `--tool` includes a specific tool by name
46+
- `--resource` includes all tools under a specific resource, and can have wildcards, e.g. `my.resource*`
47+
- `--operation` includes just read (get/list) or just write operations
48+
49+
See more information with `--help`.
50+
51+
All of these command-line options can be repeated, combined together, and have corresponding exclusion versions (e.g. `--no-tool`).
52+
53+
Use `--list` to see the list of available tools, or see below.
54+
55+
## Importing the tools and server individually
56+
57+
```js
58+
// Import the server, generated endpoints, or the init function
59+
import { server, endpoints, init } from "isaacus-mcp/server";
60+
61+
// import a specific tool
62+
import createClassificationsUniversal from "isaacus-mcp/tools/classifications/universal/create-classifications-universal";
63+
64+
// initialize the server and all endpoints
65+
init({ server, endpoints });
66+
67+
// manually start server
68+
const transport = new StdioServerTransport();
69+
await server.connect(transport);
70+
71+
// or initialize your own server with specific tools
72+
const myServer = new McpServer(...);
73+
74+
// define your own endpoint
75+
const myCustomEndpoint = {
76+
tool: {
77+
name: 'my_custom_tool',
78+
description: 'My custom tool',
79+
inputSchema: zodToJsonSchema(z.object({ a_property: z.string() })),
80+
},
81+
handler: async (client: client, args: any) => {
82+
return { myResponse: 'Hello world!' };
83+
})
84+
};
85+
86+
// initialize the server with your custom endpoints
87+
init({ server: myServer, endpoints: [createClassificationsUniversal, myCustomEndpoint] });
88+
```
89+
90+
## Available Tools
91+
92+
The following tools are available in this MCP server.
93+
94+
### Resource `classifications.universal`:
95+
96+
- `create_classifications_universal` (`write`): Classify the relevance of a legal document to a query with an Isaacus universal legal AI classifier.
97+
98+
### Resource `rerankings`:
99+
100+
- `create_rerankings` (`write`): Rerank legal documents by their relevance to a query with an Isaacus legal AI reranker.

packages/mcp-server/build

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,7 @@ node scripts/postprocess-dist-package-json.cjs
2424

2525
# build to .js/.mjs/.d.ts files
2626
npm exec tsc-multi
27-
# we need to add exports = module.exports = Anthropic TypeScript to index.js;
28-
# No way to get that from index.ts because it would cause compile errors
29-
# when building .mjs
30-
DIST_PATH=./dist node ../../scripts/utils/fix-index-exports.cjs
31-
32-
# with "moduleResolution": "nodenext", if ESM resolves to index.d.ts,
33-
# it'll have TS errors on the default import. But if it resolves to
34-
# index.d.mts the default import will work (even though both files have
35-
# the same export default statement)
36-
cp dist/index.d.ts dist/index.d.mts
27+
3728
cp tsconfig.dist-src.json dist/src/tsconfig.json
3829

3930
# Add proper Node.js shebang to the top of the file

packages/mcp-server/jest.config.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import type { JestConfigWithTsJest } from 'ts-jest';
2+
3+
const config: JestConfigWithTsJest = {
4+
preset: 'ts-jest/presets/default-esm',
5+
testEnvironment: 'node',
6+
transform: {
7+
'^.+\\.(t|j)sx?$': ['@swc/jest', { sourceMaps: 'inline' }],
8+
},
9+
moduleNameMapper: {
10+
'^isaacus-mcp$': '<rootDir>/src/index.ts',
11+
'^isaacus-mcp/(.*)$': '<rootDir>/src/$1',
12+
},
13+
modulePathIgnorePatterns: ['<rootDir>/dist/'],
14+
testPathIgnorePatterns: ['scripts'],
15+
};
16+
17+
export default config;

packages/mcp-server/package.json

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "isaacus-mcp",
3-
"version": "0.4.0",
3+
"version": "0.5.0",
44
"description": "The official MCP Server for the Isaacus API",
55
"author": "Isaacus <[email protected]>",
66
"types": "dist/index.d.ts",
@@ -11,7 +11,7 @@
1111
"packageManager": "[email protected]",
1212
"private": false,
1313
"scripts": {
14-
"test": "echo 'no tests defined yet' && exit 1",
14+
"test": "jest",
1515
"build": "bash ./build",
1616
"prepack": "echo 'to pack, run yarn build && (cd dist; yarn pack)' && exit 1",
1717
"prepublishOnly": "echo 'to publish, run yarn build && (cd dist; yarn publish)' && exit 1",
@@ -23,7 +23,8 @@
2323
},
2424
"dependencies": {
2525
"isaacus": "file:../../dist/",
26-
"@modelcontextprotocol/sdk": "^1.6.1"
26+
"@modelcontextprotocol/sdk": "^1.6.1",
27+
"yargs": "^17.7.2"
2728
},
2829
"bin": {
2930
"mcp-server": "dist/index.js"
@@ -40,7 +41,7 @@
4041
"ts-jest": "^29.1.0",
4142
"ts-morph": "^19.0.0",
4243
"ts-node": "^10.5.0",
43-
"tsc-multi": "^1.1.0",
44+
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.3/tsc-multi.tgz",
4445
"tsconfig-paths": "^4.0.0",
4546
"typescript": "^4.8.2"
4647
},
@@ -50,23 +51,12 @@
5051
},
5152
"exports": {
5253
".": {
53-
"require": {
54-
"types": "./dist/index.d.ts",
55-
"default": "./dist/index.js"
56-
},
57-
"types": "./dist/index.d.mts",
54+
"require": "./dist/index.js",
5855
"default": "./dist/index.mjs"
5956
},
60-
"./*.mjs": {
61-
"types": "./dist/*.d.ts",
62-
"default": "./dist/*.mjs"
63-
},
64-
"./*.js": {
65-
"types": "./dist/*.d.ts",
66-
"default": "./dist/*.js"
67-
},
57+
"./*.mjs": "./dist/*.mjs",
58+
"./*.js": "./dist/*.js",
6859
"./*": {
69-
"types": "./dist/*.d.ts",
7060
"require": "./dist/*.js",
7161
"default": "./dist/*.mjs"
7262
}

0 commit comments

Comments
 (0)