Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
09d2e93
feat(api): api update
stainless-app[bot] Aug 21, 2025
47843c8
chore: update CI script
stainless-app[bot] Aug 22, 2025
13ef1bd
feat(mcp): change remote server query option parsing logic
stainless-app[bot] Aug 22, 2025
ac835bf
chore(internal): codegen related update
stainless-app[bot] Aug 28, 2025
39cdb76
feat(mcp): expose client options in `streamableHTTPApp`
stainless-app[bot] Sep 2, 2025
8c380a8
fix(mcp): avoid importing unsupported libraries on non-node environments
stainless-app[bot] Sep 2, 2025
4634f9a
feat(mcp): allow setting logging level
stainless-app[bot] Sep 3, 2025
45794fe
feat(mcp): add mcp bundles to build script
stainless-app[bot] Sep 4, 2025
697d211
chore(internal): codegen related update
stainless-app[bot] Sep 4, 2025
f0c3633
chore: ci build action
stainless-app[bot] Sep 5, 2025
9087760
fix(mcp): fix query options parsing
stainless-app[bot] Sep 5, 2025
aa135f5
fix: coerce nullable values to undefined
stainless-app[bot] Sep 8, 2025
9bc9a38
feat(api): api update
stainless-app[bot] Sep 8, 2025
d67f867
feat(api): make client id, client secret optional again
stainless-app[bot] Sep 8, 2025
256c717
chore(mcp): upload dxt as release asset
stainless-app[bot] Sep 9, 2025
70f9a36
fix(mcp): fix uploading dxt release assets
stainless-app[bot] Sep 11, 2025
6a6dd0a
fix(ci): set permissions for DXT publish action
stainless-app[bot] Sep 16, 2025
68a9c07
chore(mcp): rename dxt to mcpb
stainless-app[bot] Sep 18, 2025
73c778e
chore(internal): gitignore .mcpb files
stainless-app[bot] Sep 18, 2025
a9e8666
feat(mcp): add docs search tool
stainless-app[bot] Sep 18, 2025
27ec1f5
chore(codegen): internal codegen update
stainless-app[bot] Sep 18, 2025
1758c0d
chore: do not install brew dependencies in ./scripts/bootstrap by def…
stainless-app[bot] Sep 19, 2025
8ec38f6
feat(mcp): enable experimental docs search tool
stainless-app[bot] Sep 22, 2025
fef1f5b
feat(mcp): add option for including docs tools
stainless-app[bot] Sep 23, 2025
c1de3c2
codegen metadata
stainless-app[bot] Sep 23, 2025
163982a
perf: faster formatting
stainless-app[bot] Sep 25, 2025
5955e29
chore(internal): remove deprecated `compilerOptions.baseUrl` from tsc…
stainless-app[bot] Sep 25, 2025
40ecf6a
chore(internal): fix incremental formatting in some cases
stainless-app[bot] Sep 26, 2025
bb7f182
chore(mcp): allow pointing `docs_search` tool at other URLs
stainless-app[bot] Sep 26, 2025
9545088
codegen metadata
stainless-app[bot] Sep 26, 2025
d020050
chore(internal): codegen related update
stainless-app[bot] Sep 26, 2025
843b525
feat(api): api update
stainless-app[bot] Sep 26, 2025
4d90156
chore(internal): ignore .eslintcache
stainless-app[bot] Sep 26, 2025
277ba31
fix(mcp): fix cli argument parsing logic
stainless-app[bot] Sep 29, 2025
90b7ae2
fix(mcp): resolve a linting issue in server code
stainless-app[bot] Sep 29, 2025
0601d2a
chore: update lockfile
stainless-app[bot] Sep 29, 2025
53a4db1
codegen metadata
stainless-app[bot] Sep 30, 2025
feb0899
release: 6.38.0
stainless-app[bot] Sep 30, 2025
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
4 changes: 1 addition & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
"postCreateCommand": "yarn install",
"customizations": {
"vscode": {
"extensions": [
"esbenp.prettier-vscode"
]
"extensions": ["esbenp.prettier-vscode"]
}
}
}
1 change: 1 addition & 0 deletions .eslintcache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"/home/tempuser-y52ps0/run/codegen-output/finch/finch-node/packages/mcp-server/src/options.ts":"1"},{"size":17015,"mtime":1759164825169,"results":"2","hashOfConfig":"3"},{"filePath":"4","messages":"5","suppressedMessages":"6","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"br52zc","/home/tempuser-y52ps0/run/codegen-output/finch/finch-node/packages/mcp-server/src/options.ts",[],[]]
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ jobs:
AUTH: ${{ steps.github-oidc.outputs.github_token }}
SHA: ${{ github.sha }}
run: ./scripts/utils/upload-artifact.sh

- name: Upload MCP Server tarball
if: github.repository == 'stainless-sdks/finch-node'
env:
URL: https://pkg.stainless.com/s?subpackage=mcp-server
AUTH: ${{ steps.github-oidc.outputs.github_token }}
SHA: ${{ github.sha }}
BASE_PATH: packages/mcp-server
run: ./scripts/utils/upload-artifact.sh
test:
timeout-minutes: 10
name: test
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
publish:
name: publish
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4
Expand All @@ -39,3 +41,10 @@ jobs:
yarn tsn scripts/publish-packages.ts "{ \"paths_released\": \"$PATHS_RELEASED\" }"
env:
NPM_TOKEN: ${{ secrets.FINCH_NPM_TOKEN || secrets.NPM_TOKEN }}

- name: Upload MCP Server DXT GitHub release asset
run: |
gh release upload ${{ github.event.release.tag_name }} \
packages/mcp-server/tryfinch_finch_api_api.mcpb
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ dist
dist-deno
/*.tgz
.idea/

.eslintcache
dist-bundle
*.mcpb
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "6.37.0"
".": "6.38.0"
}
6 changes: 3 additions & 3 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-6d0c6a1feba5ccb895a6779cd98c2a0ae87d6394f5e98a9da51f17258c4eb297.yml
openapi_spec_hash: ac3be0c8a992103e5f467fe1bcb20a81
config_hash: 5146b12344dae76238940989dac1e8a0
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-f8783c7acb61970583e95ad6d75c8735d2ae5e4344f808957e0b9cc22f2b8c04.yml
openapi_spec_hash: 2baa7719b95befc1553083d5757bd99a
config_hash: 6d3585c0032e08d723d077d660fc8448
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,58 @@
# Changelog

## 6.38.0 (2025-09-30)

Full Changelog: [v6.37.0...v6.38.0](https://github.com/Finch-API/finch-api-node/compare/v6.37.0...v6.38.0)

### Features

* **api:** api update ([843b525](https://github.com/Finch-API/finch-api-node/commit/843b525f6a3f07edda04ca213a35dd3d2d37fdb3))
* **api:** api update ([9bc9a38](https://github.com/Finch-API/finch-api-node/commit/9bc9a38df44189e734248cf7ad06259f93e25b82))
* **api:** api update ([09d2e93](https://github.com/Finch-API/finch-api-node/commit/09d2e939a8c42d495d9207ad2d73841f6e9e8732))
* **api:** make client id, client secret optional again ([d67f867](https://github.com/Finch-API/finch-api-node/commit/d67f867f1b3c9e4886d21da21a1cccab5760aa9d))
* **mcp:** add docs search tool ([a9e8666](https://github.com/Finch-API/finch-api-node/commit/a9e866662d47e0f39a1988339101d46ba149fb9d))
* **mcp:** add mcp bundles to build script ([45794fe](https://github.com/Finch-API/finch-api-node/commit/45794fe7a8d09dd0160ac3d2a64941fff12837d5))
* **mcp:** add option for including docs tools ([fef1f5b](https://github.com/Finch-API/finch-api-node/commit/fef1f5b0cc05c737db89097378c88a38e8973089))
* **mcp:** allow setting logging level ([4634f9a](https://github.com/Finch-API/finch-api-node/commit/4634f9a04f0fd3a7daa781876a1d93e170f1941d))
* **mcp:** change remote server query option parsing logic ([13ef1bd](https://github.com/Finch-API/finch-api-node/commit/13ef1bd4400e1ae2b2197a35f33e79703af34e08))
* **mcp:** enable experimental docs search tool ([8ec38f6](https://github.com/Finch-API/finch-api-node/commit/8ec38f6536ca6a6e7324dd827db0dc9ee9234f61))
* **mcp:** expose client options in `streamableHTTPApp` ([39cdb76](https://github.com/Finch-API/finch-api-node/commit/39cdb7601c55b6d723132edeb320c3898e697fa2))


### Bug Fixes

* **ci:** set permissions for DXT publish action ([6a6dd0a](https://github.com/Finch-API/finch-api-node/commit/6a6dd0af7e290990c7773447615e3e5d99ff217b))
* coerce nullable values to undefined ([aa135f5](https://github.com/Finch-API/finch-api-node/commit/aa135f5fdfe89359b6ad8c49b1908e7faee4ebaa))
* **mcp:** avoid importing unsupported libraries on non-node environments ([8c380a8](https://github.com/Finch-API/finch-api-node/commit/8c380a8499435e8a92155664943e6fc631f7ba1a))
* **mcp:** fix cli argument parsing logic ([277ba31](https://github.com/Finch-API/finch-api-node/commit/277ba31b242825bd569a6566a8f2a136ec0b595d))
* **mcp:** fix query options parsing ([9087760](https://github.com/Finch-API/finch-api-node/commit/90877607933fa892f5d05c8931fa2de9d139e769))
* **mcp:** fix uploading dxt release assets ([70f9a36](https://github.com/Finch-API/finch-api-node/commit/70f9a36f47190f4b78de043e63d65e21df6ce116))
* **mcp:** resolve a linting issue in server code ([90b7ae2](https://github.com/Finch-API/finch-api-node/commit/90b7ae260d427cebb7bcd7f2d3e854a0efaccd19))


### Performance Improvements

* faster formatting ([163982a](https://github.com/Finch-API/finch-api-node/commit/163982a884bcf10684b5b3e242b0d52d547fc62b))


### Chores

* ci build action ([f0c3633](https://github.com/Finch-API/finch-api-node/commit/f0c3633571f7eea46803cb75ba244c41cac5a7b4))
* **codegen:** internal codegen update ([27ec1f5](https://github.com/Finch-API/finch-api-node/commit/27ec1f5a8d71f31a327021745f7dab0aeebc4b7b))
* do not install brew dependencies in ./scripts/bootstrap by default ([1758c0d](https://github.com/Finch-API/finch-api-node/commit/1758c0de64e97975332bb8a0c6b55a23ed82a036))
* **internal:** codegen related update ([d020050](https://github.com/Finch-API/finch-api-node/commit/d0200501b52ae4ac9e7c8de91d2f883e27db34c5))
* **internal:** codegen related update ([697d211](https://github.com/Finch-API/finch-api-node/commit/697d211b9600d388aa101879ac6c400e4eb4ac53))
* **internal:** codegen related update ([ac835bf](https://github.com/Finch-API/finch-api-node/commit/ac835bf6af93d53e551d73001d048baa95e1c334))
* **internal:** fix incremental formatting in some cases ([40ecf6a](https://github.com/Finch-API/finch-api-node/commit/40ecf6a887ea44d156672f155abf70ab2d146921))
* **internal:** gitignore .mcpb files ([73c778e](https://github.com/Finch-API/finch-api-node/commit/73c778e3b9d157f8296c43131cd0db764d5086bc))
* **internal:** ignore .eslintcache ([4d90156](https://github.com/Finch-API/finch-api-node/commit/4d901569e987fa9c93c12ae77844972b4655fa8f))
* **internal:** remove deprecated `compilerOptions.baseUrl` from tsconfig.json ([5955e29](https://github.com/Finch-API/finch-api-node/commit/5955e291311d6d8192a3e8c3eb87f4eac9bdbdbc))
* **mcp:** allow pointing `docs_search` tool at other URLs ([bb7f182](https://github.com/Finch-API/finch-api-node/commit/bb7f182ef3959a99a7728cdab685d972e4110756))
* **mcp:** rename dxt to mcpb ([68a9c07](https://github.com/Finch-API/finch-api-node/commit/68a9c079dfb35ab661f58780405036399fbaf31e))
* **mcp:** upload dxt as release asset ([256c717](https://github.com/Finch-API/finch-api-node/commit/256c717c7eb0bd947322b14d85fc15cd7f919724))
* update CI script ([47843c8](https://github.com/Finch-API/finch-api-node/commit/47843c85864215c19edd9826952bd625e79ca78c))
* update lockfile ([0601d2a](https://github.com/Finch-API/finch-api-node/commit/0601d2aca7eeb80b8967d3bc89dea5b5ab527565))

## 6.37.0 (2025-08-21)

Full Changelog: [v6.36.0...v6.37.0](https://github.com/Finch-API/finch-api-node/compare/v6.36.0...v6.37.0)
Expand Down
3 changes: 2 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,11 @@ Methods:
Types:

- <code><a href="./src/resources/providers.ts">Provider</a></code>
- <code><a href="./src/resources/providers.ts">ProviderListResponse</a></code>

Methods:

- <code title="get /providers">client.providers.<a href="./src/resources/providers.ts">list</a>() -> ProvidersSinglePage</code>
- <code title="get /providers">client.providers.<a href="./src/resources/providers.ts">list</a>() -> ProviderListResponsesSinglePage</code>

# Account

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": "6.37.0",
"version": "6.38.0",
"description": "The official TypeScript library for the Finch API",
"author": "Finch <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
1 change: 0 additions & 1 deletion packages/mcp-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ The following tools are available in this MCP server.
### Resource `hris.directory`:

- `list_hris_directory` (`read`): Read company directory and organization structure
- `list_individuals_hris_directory` (`read`): Read company directory and organization structure

### Resource `hris.individuals`:

Expand Down
24 changes: 24 additions & 0 deletions packages/mcp-server/build
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,27 @@ cp tsconfig.dist-src.json dist/src/tsconfig.json
chmod +x dist/index.js

DIST_PATH=./dist PKG_IMPORT_PATH=@tryfinch/finch-api-mcp/ node ../../scripts/utils/postprocess-files.cjs

# mcp bundle
rm -rf dist-bundle tryfinch_finch_api_api.mcpb; mkdir dist-bundle

# copy package.json
PKG_JSON_PATH=../../packages/mcp-server/package.json node ../../scripts/utils/make-dist-package-json.cjs > dist-bundle/package.json

# copy files
node scripts/copy-bundle-files.cjs

# install runtime deps
cd dist-bundle
npm install
cd ..

# pack bundle
cp manifest.json dist-bundle

npx mcpb pack dist-bundle tryfinch_finch_api_api.mcpb

npx mcpb sign tryfinch_finch_api_api.mcpb --self-signed

# clean up
rm -rf dist-bundle
64 changes: 64 additions & 0 deletions packages/mcp-server/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"dxt_version": "0.2",
"name": "@tryfinch/finch-api-mcp",
"version": "6.37.0",
"description": "The official MCP Server for the Finch API",
"author": {
"name": "Finch",
"email": "[email protected]"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Finch-API/finch-api-node.git"
},
"homepage": "https://github.com/Finch-API/finch-api-node/tree/main/packages/mcp-server#readme",
"documentation": "https://developer.tryfinch.com/",
"server": {
"type": "node",
"entry_point": "index.js",
"mcp_config": {
"command": "node",
"args": ["${__dirname}/index.js"],
"env": {
"FINCH_ACCESS_TOKEN": "${user_config.FINCH_ACCESS_TOKEN}",
"FINCH_CLIENT_ID": "${user_config.FINCH_CLIENT_ID}",
"FINCH_CLIENT_SECRET": "${user_config.FINCH_CLIENT_SECRET}",
"FINCH_WEBHOOK_SECRET": "${user_config.FINCH_WEBHOOK_SECRET}"
}
}
},
"user_config": {
"FINCH_ACCESS_TOKEN": {
"title": "access_token",
"description": "",
"required": false,
"type": "string"
},
"FINCH_CLIENT_ID": {
"title": "client_id",
"description": "",
"required": false,
"type": "string"
},
"FINCH_CLIENT_SECRET": {
"title": "client_secret",
"description": "",
"required": false,
"type": "string"
},
"FINCH_WEBHOOK_SECRET": {
"title": "webhook_secret",
"description": "",
"required": false,
"type": "string"
}
},
"tools": [],
"tools_generated": true,
"compatibility": {
"runtimes": {
"node": ">=18.0.0"
}
},
"keywords": ["api"]
}
3 changes: 2 additions & 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": "6.37.0",
"version": "6.38.0",
"description": "The official MCP Server for the Finch API",
"author": "Finch <[email protected]>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -47,6 +47,7 @@
"mcp-server": "dist/index.js"
},
"devDependencies": {
"@anthropic-ai/mcpb": "^1.1.0",
"@types/cors": "^2.8.19",
"@types/express": "^5.0.3",
"@types/jest": "^29.4.0",
Expand Down
36 changes: 36 additions & 0 deletions packages/mcp-server/scripts/copy-bundle-files.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
const fs = require('fs');
const path = require('path');
const pkgJson = require('../dist-bundle/package.json');

const distDir = path.resolve(__dirname, '..', 'dist');
const distBundleDir = path.resolve(__dirname, '..', 'dist-bundle');
const distBundlePkgJson = path.join(distBundleDir, 'package.json');

async function* walk(dir) {
for await (const d of await fs.promises.opendir(dir)) {
const entry = path.join(dir, d.name);
if (d.isDirectory()) yield* walk(entry);
else if (d.isFile()) yield entry;
}
}

async function copyFiles() {
// copy runtime files
for await (const file of walk(distDir)) {
if (!/[cm]?js$/.test(file)) continue;
const dest = path.join(distBundleDir, path.relative(distDir, file));
await fs.promises.mkdir(path.dirname(dest), { recursive: true });
await fs.promises.copyFile(file, dest);
}

// replace package.json reference with local reference
for (const dep in pkgJson.dependencies) {
if (dep === '@tryfinch/finch-api') {
pkgJson.dependencies[dep] = 'file:../../../dist/';
}
}

await fs.promises.writeFile(distBundlePkgJson, JSON.stringify(pkgJson, null, 2));
}

copyFiles();
2 changes: 1 addition & 1 deletion packages/mcp-server/src/code-tool-paths.cts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export const workerPath = require.resolve('./code-tool-worker.mjs')
export const workerPath = require.resolve('./code-tool-worker.mjs');
8 changes: 5 additions & 3 deletions packages/mcp-server/src/code-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ import { Endpoint, ContentBlock, Metadata } from './tools/types';

import { Tool } from '@modelcontextprotocol/sdk/types.js';

import { newDenoHTTPWorker } from '@valtown/deno-http-worker';
import { WorkerInput, WorkerError, WorkerSuccess } from './code-tool-types';
import { workerPath } from './code-tool-paths.cjs';

/**
* A tool that runs code against a copy of the SDK.
Expand All @@ -20,7 +18,7 @@ import { workerPath } from './code-tool-paths.cjs';
*
* @param endpoints - The endpoints to include in the list.
*/
export function codeTool(): Endpoint {
export async function codeTool(): Promise<Endpoint> {
const metadata: Metadata = { resource: 'all', operation: 'write', tags: [] };
const tool: Tool = {
name: 'execute',
Expand All @@ -29,6 +27,10 @@ export function codeTool(): Endpoint {
inputSchema: { type: 'object', properties: { code: { type: 'string' } } },
};

// Import dynamically to avoid failing at import time in cases where the environment is not well-supported.
const { newDenoHTTPWorker } = await import('@valtown/deno-http-worker');
const { workerPath } = await import('./code-tool-paths.cjs');

const handler = async (client: Finch, args: unknown) => {
const baseURLHostname = new URL(client.baseURL).hostname;
const { code } = args as { code: string };
Expand Down
48 changes: 48 additions & 0 deletions packages/mcp-server/src/docs-search-tool.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import { Metadata, asTextContentResult } from './tools/types';

import { Tool } from '@modelcontextprotocol/sdk/types.js';

export const metadata: Metadata = {
resource: 'all',
operation: 'read',
tags: [],
httpMethod: 'get',
};

export const tool: Tool = {
name: 'search_docs',
description:
'Search for documentation for how to use the client to interact with the API.\nThe tool will return an array of Markdown-formatted documentation pages.',
inputSchema: {
type: 'object',
properties: {
query: {
type: 'string',
description: 'The query to search for.',
},
language: {
type: 'string',
description: 'The language for the SDK to search for.',
enum: ['http', 'python', 'go', 'typescript', 'terraform', 'ruby', 'java', 'kotlin'],
},
},
required: ['query', 'language'],
},
annotations: {
readOnlyHint: true,
},
};

const docsSearchURL =
process.env['DOCS_SEARCH_URL'] || 'https://api.stainless.com/api/projects/finch/docs/search';

export const handler = async (_: unknown, args: Record<string, unknown> | undefined) => {
const body = args as any;
const query = new URLSearchParams(body).toString();
const result = await fetch(`${docsSearchURL}?${query}`);
return asTextContentResult(await result.json());
};

export default { metadata, tool, handler };
Loading