Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "9.4.1"
".": "9.5.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 46
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-63947213d9359808abc05e4c3cb53389325ca23c58d06bf293626f7d5d4fc2b8.yml
openapi_spec_hash: 50e4669590de9a411915a612615017d0
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-a1778dd040aadddb53b90df5959043d17a5c9899f82c9c7188cd0be810426dc3.yml
openapi_spec_hash: fe60fcf302d80a604a49ec1bf5068881
config_hash: d21a244fc073152c8dbecb8ece970209
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 9.5.0 (2026-04-10)

Full Changelog: [v9.4.1...v9.5.0](https://github.com/Finch-API/finch-api-node/compare/v9.4.1...v9.5.0)

### Features

* **api:** api update ([c7b1cbd](https://github.com/Finch-API/finch-api-node/commit/c7b1cbdd3b9ac244868c5c607cecfe6cae131563))


### Chores

* **internal:** codegen related update ([f00da2e](https://github.com/Finch-API/finch-api-node/commit/f00da2ec14ce454259e2a9040873be59896a8334))
* **internal:** show error causes in MCP servers when running in local mode ([81a144e](https://github.com/Finch-API/finch-api-node/commit/81a144ea0a2f27f76e3879fbb809c56d8838fba7))
* **mcp-server:** increase local docs search result count from 5 to 10 ([0a41abc](https://github.com/Finch-API/finch-api-node/commit/0a41abcf925d5568ee6705a1b724645e4fa60575))

## 9.4.1 (2026-04-06)

Full Changelog: [v9.4.0...v9.4.1](https://github.com/Finch-API/finch-api-node/compare/v9.4.0...v9.4.1)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tryfinch/finch-api",
"version": "9.4.1",
"version": "9.5.0",
"description": "The official TypeScript library for the Finch API",
"author": "Finch <founders@tryfinch.com>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dxt_version": "0.2",
"name": "@tryfinch/finch-api-mcp",
"version": "9.4.1",
"version": "9.5.0",
"description": "The official MCP Server for the Finch API",
"author": {
"name": "Finch",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tryfinch/finch-api-mcp",
"version": "9.4.1",
"version": "9.5.0",
"description": "The official MCP Server for the Finch API",
"author": "Finch <founders@tryfinch.com>",
"types": "dist/index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/mcp-server/src/code-tool-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ function makeSdkProxy<T extends object>(obj: T, { path, isBelievedBad = false }:

function parseError(code: string, error: unknown): string | undefined {
if (!(error instanceof Error)) return;
const message = error.name ? `${error.name}: ${error.message}` : error.message;
const cause = error.cause instanceof Error ? `: ${error.cause.message}` : '';
const message = error.name ? `${error.name}: ${error.message}${cause}` : `${error.message}${cause}`;
try {
// Deno uses V8; the first "<anonymous>:LINE:COLUMN" is the top of stack.
const lineNumber = error.stack?.match(/<anonymous>:([0-9]+):[0-9]+/)?.[1];
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/src/docs-search-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async function searchLocal(args: Record<string, unknown>): Promise<unknown> {
query,
language,
detail,
maxResults: 5,
maxResults: 10,
}).results;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/mcp-server/src/local-docs-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2400,7 +2400,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
],
response: '{ connect_url: string; session_id: string; }',
markdown:
"## new\n\n`client.connect.sessions.new(customer_id: string, customer_name: string, products: string[], customer_email?: string, integration?: { provider: string; auth_method?: 'assisted' | 'credential' | 'oauth' | 'api_token'; }, manual?: boolean, minutes_to_expire?: number, redirect_uri?: string, sandbox?: 'finch' | 'provider'): { connect_url: string; session_id: string; }`\n\n**post** `/connect/sessions`\n\nCreate a new connect session for an employer\n\n### Parameters\n\n- `customer_id: string`\n Unique identifier for the customer\n\n- `customer_name: string`\n Name of the customer\n\n- `products: string[]`\n The Finch products to request access to\n\n- `customer_email?: string`\n Email address of the customer\n\n- `integration?: { provider: string; auth_method?: 'assisted' | 'credential' | 'oauth' | 'api_token'; }`\n Integration configuration for the connect session\n - `provider: string`\n The provider to integrate with\n - `auth_method?: 'assisted' | 'credential' | 'oauth' | 'api_token'`\n The authentication method to use\n\n- `manual?: boolean`\n Enable manual authentication mode\n\n- `minutes_to_expire?: number`\n The number of minutes until the session expires (defaults to 129,600, which is 90 days)\n\n- `redirect_uri?: string`\n The URI to redirect to after the Connect flow is completed\n\n- `sandbox?: 'finch' | 'provider'`\n Sandbox mode for testing\n\n### Returns\n\n- `{ connect_url: string; session_id: string; }`\n\n - `connect_url: string`\n - `session_id: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\nconst response = await client.connect.sessions.new({\n customer_id: 'x',\n customer_name: 'x',\n products: ['benefits'],\n});\n\nconsole.log(response);\n```",
"## new\n\n`client.connect.sessions.new(customer_id: string, customer_name: string, products: string[], customer_email?: string, integration?: { provider: string; auth_method?: 'assisted' | 'credential' | 'oauth' | 'api_token'; }, manual?: boolean, minutes_to_expire?: number, redirect_uri?: string, sandbox?: 'finch' | 'provider'): { connect_url: string; session_id: string; }`\n\n**post** `/connect/sessions`\n\nCreate a new connect session for an employer\n\n### Parameters\n\n- `customer_id: string`\n Unique identifier for the customer\n\n- `customer_name: string`\n Name of the customer\n\n- `products: string[]`\n The Finch products to request access to. Use `benefits` to access deductions endpoints — `deduction` is a deprecated alias that is still accepted but should not be combined with `benefits`.\n\n- `customer_email?: string`\n Email address of the customer\n\n- `integration?: { provider: string; auth_method?: 'assisted' | 'credential' | 'oauth' | 'api_token'; }`\n Integration configuration for the connect session\n - `provider: string`\n The provider to integrate with\n - `auth_method?: 'assisted' | 'credential' | 'oauth' | 'api_token'`\n The authentication method to use\n\n- `manual?: boolean`\n Enable manual authentication mode\n\n- `minutes_to_expire?: number`\n The number of minutes until the session expires (defaults to 129,600, which is 90 days)\n\n- `redirect_uri?: string`\n The URI to redirect to after the Connect flow is completed\n\n- `sandbox?: 'finch' | 'provider'`\n Sandbox mode for testing\n\n### Returns\n\n- `{ connect_url: string; session_id: string; }`\n\n - `connect_url: string`\n - `session_id: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\nconst response = await client.connect.sessions.new({\n customer_id: 'x',\n customer_name: 'x',\n products: ['benefits'],\n});\n\nconsole.log(response);\n```",
perLanguage: {
go: {
method: 'client.Connect.Sessions.New',
Expand Down Expand Up @@ -2454,7 +2454,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
],
response: '{ connect_url: string; session_id: string; }',
markdown:
"## reauthenticate\n\n`client.connect.sessions.reauthenticate(connection_id: string, minutes_to_expire?: number, products?: string[], redirect_uri?: string): { connect_url: string; session_id: string; }`\n\n**post** `/connect/sessions/reauthenticate`\n\nCreate a new Connect session for reauthenticating an existing connection\n\n### Parameters\n\n- `connection_id: string`\n The ID of the existing connection to reauthenticate\n\n- `minutes_to_expire?: number`\n The number of minutes until the session expires (defaults to 43,200, which is 30 days)\n\n- `products?: string[]`\n The products to request access to (optional for reauthentication)\n\n- `redirect_uri?: string`\n The URI to redirect to after the Connect flow is completed\n\n### Returns\n\n- `{ connect_url: string; session_id: string; }`\n\n - `connect_url: string`\n - `session_id: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\nconst response = await client.connect.sessions.reauthenticate({ connection_id: 'connection_id' });\n\nconsole.log(response);\n```",
"## reauthenticate\n\n`client.connect.sessions.reauthenticate(connection_id: string, minutes_to_expire?: number, products?: string[], redirect_uri?: string): { connect_url: string; session_id: string; }`\n\n**post** `/connect/sessions/reauthenticate`\n\nCreate a new Connect session for reauthenticating an existing connection\n\n### Parameters\n\n- `connection_id: string`\n The ID of the existing connection to reauthenticate\n\n- `minutes_to_expire?: number`\n The number of minutes until the session expires (defaults to 43,200, which is 30 days)\n\n- `products?: string[]`\n The products to request access to (optional for reauthentication). Use `benefits` to access deductions endpoints — `deduction` is a deprecated alias that is still accepted but should not be combined with `benefits`.\n\n- `redirect_uri?: string`\n The URI to redirect to after the Connect flow is completed\n\n### Returns\n\n- `{ connect_url: string; session_id: string; }`\n\n - `connect_url: string`\n - `session_id: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\nconst response = await client.connect.sessions.reauthenticate({ connection_id: 'connection_id' });\n\nconsole.log(response);\n```",
perLanguage: {
go: {
method: 'client.Connect.Sessions.Reauthenticate',
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const newMcpServer = async ({
new McpServer(
{
name: 'tryfinch_finch_api_api',
version: '9.4.1',
version: '9.5.0',
},
{
instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),
Expand Down
4 changes: 2 additions & 2 deletions packages/mcp-server/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

export const readEnv = (env: string): string | undefined => {
if (typeof (globalThis as any).process !== 'undefined') {
return (globalThis as any).process.env?.[env]?.trim();
return (globalThis as any).process.env?.[env]?.trim() || undefined;
} else if (typeof (globalThis as any).Deno !== 'undefined') {
return (globalThis as any).Deno.env?.get?.(env)?.trim();
return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined;
}
return;
};
Expand Down
4 changes: 2 additions & 2 deletions src/internal/utils/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
*/
export const readEnv = (env: string): string | undefined => {
if (typeof (globalThis as any).process !== 'undefined') {
return (globalThis as any).process.env?.[env]?.trim() ?? undefined;
return (globalThis as any).process.env?.[env]?.trim() || undefined;
}
if (typeof (globalThis as any).Deno !== 'undefined') {
return (globalThis as any).Deno.env?.get?.(env)?.trim();
return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined;
}
return undefined;
};
8 changes: 6 additions & 2 deletions src/resources/connect/sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export interface SessionNewParams {
customer_name: string;

/**
* The Finch products to request access to
* The Finch products to request access to. Use `benefits` to access deductions
* endpoints — `deduction` is a deprecated alias that is still accepted but should
* not be combined with `benefits`.
*/
products: Array<
| 'benefits'
Expand Down Expand Up @@ -140,7 +142,9 @@ export interface SessionReauthenticateParams {
minutes_to_expire?: number;

/**
* The products to request access to (optional for reauthentication)
* The products to request access to (optional for reauthentication). Use
* `benefits` to access deductions endpoints — `deduction` is a deprecated alias
* that is still accepted but should not be combined with `benefits`.
*/
products?: Array<
| 'benefits'
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '9.4.1'; // x-release-please-version
export const VERSION = '9.5.0'; // x-release-please-version
Loading