Skip to content

Commit 2e12258

Browse files
release: 8.1.0 (#638)
* codegen metadata * chore(internal): codegen related update * feat(api): api update * docs: prominently feature MCP server setup in root SDK readmes * fix(mcp): correct code tool api output types * chore: break long lines in snippets into multiline * release: 8.1.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent b5c17ec commit 2e12258

File tree

23 files changed

+237
-56
lines changed

23 files changed

+237
-56
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-
".": "8.0.0"
2+
".": "8.1.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 46
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-f81c5824a9002c980fc0d66c4d52e6cbd8baf7678f5e0f2215909357cff6f82c.yml
3-
openapi_spec_hash: 7714062cac3bb5597b8571172775bc92
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-ded87cb73affcaff9cf779d9cfd119a4026cfc1757b39be95d933edea48a0328.yml
3+
openapi_spec_hash: 0e6394b222fc68d7607114e70b72d23e
44
config_hash: 0892e2e0eeb0343a022afa62e9080dd1

CHANGELOG.md

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

3+
## 8.1.0 (2026-01-06)
4+
5+
Full Changelog: [v8.0.0...v8.1.0](https://github.com/Finch-API/finch-api-node/compare/v8.0.0...v8.1.0)
6+
7+
### Features
8+
9+
* **api:** api update ([8e97806](https://github.com/Finch-API/finch-api-node/commit/8e97806ff9a9dc8abf9d96c6334f716375764249))
10+
11+
12+
### Bug Fixes
13+
14+
* **mcp:** correct code tool api output types ([1a412ec](https://github.com/Finch-API/finch-api-node/commit/1a412ec1f585e4be7252c9d15d119a519986c8c1))
15+
16+
17+
### Chores
18+
19+
* break long lines in snippets into multiline ([166f620](https://github.com/Finch-API/finch-api-node/commit/166f6206c0b0b7ee088314dd8351d69b78f87a28))
20+
* **internal:** codegen related update ([d9eeb4b](https://github.com/Finch-API/finch-api-node/commit/d9eeb4b1d9388efcfcefd05ce2c27b4752f374d1))
21+
22+
23+
### Documentation
24+
25+
* prominently feature MCP server setup in root SDK readmes ([72c2bdd](https://github.com/Finch-API/finch-api-node/commit/72c2bdd4467301c754ec1c3393308468edb8fb29))
26+
327
## 8.0.0 (2025-12-18)
428

529
Full Changelog: [v7.0.0...v8.0.0](https://github.com/Finch-API/finch-api-node/compare/v7.0.0...v8.0.0)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2025 Finch
189+
Copyright 2026 Finch
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ The REST API documentation can be found on [developer.tryfinch.com](https://deve
88

99
It is generated with [Stainless](https://www.stainless.com/).
1010

11+
## MCP Server
12+
13+
Use the Finch MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
14+
15+
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40tryfinch%2Ffinch-api-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB0cnlmaW5jaC9maW5jaC1hcGktbWNwIl19)
16+
[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40tryfinch%2Ffinch-api-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40tryfinch%2Ffinch-api-mcp%22%5D%7D)
17+
18+
> Note: You may need to set environment variables in your MCP client.
19+
1120
## Installation
1221

1322
```sh
@@ -44,7 +53,8 @@ const client = new Finch({
4453
accessToken: 'My Access Token',
4554
});
4655

47-
const [individualInDirectory]: [Finch.HRIS.IndividualInDirectory] = await client.hris.directory.list();
56+
const [individualInDirectory]: [Finch.HRIS.IndividualInDirectory] =
57+
await client.hris.directory.list();
4858
```
4959

5060
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
@@ -167,7 +177,9 @@ import Finch from '@tryfinch/finch-api';
167177

168178
const client = new Finch();
169179

170-
const page = await client.hris.directory.list({ headers: { 'Finch-API-Version': 'My-Custom-Value' } });
180+
const page = await client.hris.directory.list({
181+
headers: { 'Finch-API-Version': 'My-Custom-Value' },
182+
});
171183
const individualInDirectory = page.individuals[0];
172184
```
173185

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tryfinch/finch-api",
3-
"version": "8.0.0",
3+
"version": "8.1.0",
44
"description": "The official TypeScript library for the Finch API",
55
"author": "Finch <founders@tryfinch.com>",
66
"types": "dist/index.d.ts",

packages/mcp-server/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ For clients with a configuration JSON, it might look something like this:
4545
If you use Cursor, you can install the MCP server by using the button below. You will need to set your environment variables
4646
in Cursor's `mcp.json`, which can be found in Cursor Settings > Tools & MCP > New MCP Server.
4747

48-
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=@tryfinch/finch-api-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB0cnlmaW5jaC9maW5jaC1hcGktbWNwIl0sImVudiI6eyJGSU5DSF9BQ0NFU1NfVE9LRU4iOiJTZXQgeW91ciBGSU5DSF9BQ0NFU1NfVE9LRU4gaGVyZS4iLCJGSU5DSF9DTElFTlRfSUQiOiJTZXQgeW91ciBGSU5DSF9DTElFTlRfSUQgaGVyZS4iLCJGSU5DSF9DTElFTlRfU0VDUkVUIjoiU2V0IHlvdXIgRklOQ0hfQ0xJRU5UX1NFQ1JFVCBoZXJlLiIsIkZJTkNIX1dFQkhPT0tfU0VDUkVUIjoiU2V0IHlvdXIgRklOQ0hfV0VCSE9PS19TRUNSRVQgaGVyZS4ifX0)
48+
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40tryfinch%2Ffinch-api-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB0cnlmaW5jaC9maW5jaC1hcGktbWNwIl0sImVudiI6eyJGSU5DSF9BQ0NFU1NfVE9LRU4iOiJTZXQgeW91ciBGSU5DSF9BQ0NFU1NfVE9LRU4gaGVyZS4iLCJGSU5DSF9DTElFTlRfSUQiOiJTZXQgeW91ciBGSU5DSF9DTElFTlRfSUQgaGVyZS4iLCJGSU5DSF9DTElFTlRfU0VDUkVUIjoiU2V0IHlvdXIgRklOQ0hfQ0xJRU5UX1NFQ1JFVCBoZXJlLiIsIkZJTkNIX1dFQkhPT0tfU0VDUkVUIjoiU2V0IHlvdXIgRklOQ0hfV0VCSE9PS19TRUNSRVQgaGVyZS4ifX0)
4949

5050
### VS Code
5151

@@ -60,7 +60,7 @@ If you use Claude Code, you can install the MCP server by running the command be
6060
environment variables in Claude Code's `.claude.json`, which can be found in your home directory.
6161

6262
```
63-
claude mcp add --transport stdio tryfinch_finch_api_api --env FINCH_ACCESS_TOKEN="Your FINCH_ACCESS_TOKEN here." FINCH_CLIENT_ID="Your FINCH_CLIENT_ID here." FINCH_CLIENT_SECRET="Your FINCH_CLIENT_SECRET here." FINCH_WEBHOOK_SECRET="Your FINCH_WEBHOOK_SECRET here." -- npx -y @tryfinch/finch-api-mcp
63+
claude mcp add tryfinch_finch_api_mcp_api --env FINCH_ACCESS_TOKEN="Your FINCH_ACCESS_TOKEN here." FINCH_CLIENT_ID="Your FINCH_CLIENT_ID here." FINCH_CLIENT_SECRET="Your FINCH_CLIENT_SECRET here." FINCH_WEBHOOK_SECRET="Your FINCH_WEBHOOK_SECRET here." -- npx -y @tryfinch/finch-api-mcp
6464
```
6565

6666
## Code Mode

packages/mcp-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tryfinch/finch-api-mcp",
3-
"version": "8.0.0",
3+
"version": "8.1.0",
44
"description": "The official MCP Server for the Finch API",
55
"author": "Finch <founders@tryfinch.com>",
66
"types": "dist/index.d.ts",

packages/mcp-server/src/code-tool-types.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@
33
import { ClientOptions } from '@tryfinch/finch-api';
44

55
export type WorkerInput = {
6-
opts: ClientOptions;
6+
project_name: string;
77
code: string;
8+
client_opts: ClientOptions;
89
};
9-
export type WorkerSuccess = {
10+
export type WorkerOutput = {
11+
is_error: boolean;
1012
result: unknown | null;
11-
logLines: string[];
12-
errLines: string[];
13-
};
14-
export type WorkerError = {
15-
message: string | undefined;
16-
logLines: string[];
17-
errLines: string[];
13+
log_lines: string[];
14+
err_lines: string[];
1815
};

packages/mcp-server/src/code-tool.ts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
import { McpTool, Metadata, ToolCallResult, asTextContentResult } from './types';
3+
import { McpTool, Metadata, ToolCallResult, asErrorResult, asTextContentResult } from './types';
44
import { Tool } from '@modelcontextprotocol/sdk/types.js';
55
import { readEnv } from './server';
6-
import { WorkerSuccess } from './code-tool-types';
6+
import { WorkerInput, WorkerOutput } from './code-tool-types';
77
/**
88
* A tool that runs code against a copy of the SDK.
99
*
@@ -45,9 +45,9 @@ export function codeTool(): McpTool {
4545
},
4646
body: JSON.stringify({
4747
project_name: 'finch',
48-
client_opts: { accessToken: readEnv('FINCH_ACCESS_TOKEN') },
4948
code,
50-
}),
49+
client_opts: { accessToken: readEnv('FINCH_ACCESS_TOKEN') },
50+
} satisfies WorkerInput),
5151
});
5252

5353
if (!res.ok) {
@@ -58,7 +58,17 @@ export function codeTool(): McpTool {
5858
);
5959
}
6060

61-
return asTextContentResult((await res.json()) as WorkerSuccess);
61+
const { is_error, result, log_lines, err_lines } = (await res.json()) as WorkerOutput;
62+
const hasLogs = log_lines.length > 0 || err_lines.length > 0;
63+
const output = {
64+
result,
65+
...(log_lines.length > 0 && { log_lines }),
66+
...(err_lines.length > 0 && { err_lines }),
67+
};
68+
if (is_error) {
69+
return asErrorResult(typeof result === 'string' && !hasLogs ? result : JSON.stringify(output, null, 2));
70+
}
71+
return asTextContentResult(output);
6272
};
6373

6474
return { metadata, tool, handler };

0 commit comments

Comments
 (0)