Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c8bf746
fix(mcpb): pin @anthropic-ai/mcpb version
stainless-app[bot] Oct 31, 2025
ceea4b0
chore(internal): grammar fix (it's -> its)
stainless-app[bot] Nov 4, 2025
20cc664
chore: use structured error when code execution tool errors
stainless-app[bot] Nov 4, 2025
9f95cba
chore: mcp code tool explicit error message when missing a run function
stainless-app[bot] Nov 5, 2025
090ca8f
feat(mcp): enable optional code execution tool on http mcp servers
stainless-app[bot] Nov 5, 2025
69bd7b0
chore(mcp): add friendlier MCP code tool errors on incorrect method i…
stainless-app[bot] Nov 6, 2025
48cfd3a
chore(mcp): add line numbers to code tool errors
stainless-app[bot] Nov 6, 2025
d0679c8
docs(mcp): add a README button for one-click add to Cursor
stainless-app[bot] Nov 6, 2025
d8c690d
chore(internal): codegen related update
stainless-app[bot] Nov 6, 2025
5526204
docs(mcp): add a README link to add server to VS Code or Claude Code
stainless-app[bot] Nov 7, 2025
f45deec
chore(internal): codegen related update
stainless-app[bot] Nov 8, 2025
8a6a2cb
chore(mcp): clarify http auth error
stainless-app[bot] Nov 11, 2025
047276b
fix(mcp): return tool execution error on jq failure
stainless-app[bot] Nov 13, 2025
51ca5f4
chore(mcp): upgrade jq-web
stainless-app[bot] Nov 13, 2025
539f4c4
feat(api): update via SDK Studio
stainless-app[bot] Nov 25, 2025
66b367a
Remove duplicate priceId from checkout session input interface
angihe93 Nov 25, 2025
810b586
Merge pull request #11 from stainless-sdks/angihe93/dev
angihe93 Nov 25, 2025
1a19816
feat(api): manual updates
stainless-app[bot] Nov 25, 2025
842a0ae
release: 0.23.0
stainless-app[bot] Nov 25, 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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.22.0"
".": "0.23.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: 45
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/flowglad%2Fflowglad-a1eeb4fac4d6f2e5a1bed0a6ef5abfc4172e8d989c24343860b8a07a389ea65b.yml
openapi_spec_hash: 1bd6007e37eeb62e1dc85da4f939ed1d
config_hash: b3cf56eeb5f18b49019b9be6e30263c0
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/flowglad%2Fflowglad-71d495f9b7d8f8c9d80340c0db0a71352f19b22a53688dbc268c7d9137390f2e.yml
openapi_spec_hash: c6293dd58700ec577dc2e10f8eb8f061
config_hash: 3f7672efb046f15f1ee86bcb480da1a2
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,39 @@
# Changelog
## 0.23.0 (2025-11-25)

Full Changelog: [v0.22.0...v0.23.0](https://github.com/flowglad/flowglad-node/compare/v0.22.0...v0.23.0)

### Features

* **api:** manual updates ([1a19816](https://github.com/flowglad/flowglad-node/commit/1a19816abcef63fe94de504d04586c5ceb3ed58e))
* **api:** update via SDK Studio ([539f4c4](https://github.com/flowglad/flowglad-node/commit/539f4c4518cb92b9d71ae7c890f55498cbf47d88))
* **mcp:** enable optional code execution tool on http mcp servers ([090ca8f](https://github.com/flowglad/flowglad-node/commit/090ca8fb6207a056c1f4dc41fbd3b457bcc7007d))


### Bug Fixes

* **mcpb:** pin @anthropic-ai/mcpb version ([c8bf746](https://github.com/flowglad/flowglad-node/commit/c8bf74639585d555710ec2a68d1a51224bd12d8f))
* **mcp:** return tool execution error on jq failure ([047276b](https://github.com/flowglad/flowglad-node/commit/047276bc4d3bd247613d349f63f1bdbdb60b1416))


### Chores

* **internal:** codegen related update ([f45deec](https://github.com/flowglad/flowglad-node/commit/f45deec19f15bc5e89faa32905fdf0b1ef03abe5))
* **internal:** codegen related update ([d8c690d](https://github.com/flowglad/flowglad-node/commit/d8c690d0b0b316915e3276cee1aa2c07099a6ddf))
* **internal:** grammar fix (it's -> its) ([ceea4b0](https://github.com/flowglad/flowglad-node/commit/ceea4b006184694f7fdd6c38a6b9efc8534270c0))
* mcp code tool explicit error message when missing a run function ([9f95cba](https://github.com/flowglad/flowglad-node/commit/9f95cba7b813396b26890f8ce60f895eb066a321))
* **mcp:** add friendlier MCP code tool errors on incorrect method invocations ([69bd7b0](https://github.com/flowglad/flowglad-node/commit/69bd7b061e2806e6843fab6ef5c7ef6c42dc230e))
* **mcp:** add line numbers to code tool errors ([48cfd3a](https://github.com/flowglad/flowglad-node/commit/48cfd3a78bd865fd461cacabc85b720e12cbedee))
* **mcp:** clarify http auth error ([8a6a2cb](https://github.com/flowglad/flowglad-node/commit/8a6a2cbd9cae370bcbf1bd8c24a2d2b70ca0f8b4))
* **mcp:** upgrade jq-web ([51ca5f4](https://github.com/flowglad/flowglad-node/commit/51ca5f4ac13ccf1b7d2c7d11d3996005c7362717))
* use structured error when code execution tool errors ([20cc664](https://github.com/flowglad/flowglad-node/commit/20cc6648e532399cbc3517e57badf36a61e6cd17))


### Documentation

* **mcp:** add a README button for one-click add to Cursor ([d0679c8](https://github.com/flowglad/flowglad-node/commit/d0679c80b534c7f4d853a494685333f2ef761c61))
* **mcp:** add a README link to add server to VS Code or Claude Code ([5526204](https://github.com/flowglad/flowglad-node/commit/55262048deb2efe9c80d17ca998fe10bf6dd48af))

## 0.22.0 (2025-10-18)

Full Changelog: [v0.21.0...v0.22.0](https://github.com/flowglad/flowglad-node/compare/v0.21.0...v0.22.0)
Expand Down
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Types:

- <code><a href="./src/resources/customers.ts">CustomerClientSelectSchema</a></code>
- <code><a href="./src/resources/customers.ts">ToggleSubscriptionItemFeatureRecord</a></code>
- <code><a href="./src/resources/customers.ts">UsageCreditGrantSubscriptionItemFeatureClientSelectSchema</a></code>
- <code><a href="./src/resources/customers.ts">UsageCreditGrantSubscriptionItemFeatureRecord</a></code>
- <code><a href="./src/resources/customers.ts">CustomerCreateResponse</a></code>
- <code><a href="./src/resources/customers.ts">CustomerRetrieveResponse</a></code>
- <code><a href="./src/resources/customers.ts">CustomerUpdateResponse</a></code>
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": "@flowglad/node",
"version": "0.22.0",
"version": "0.23.0",
"description": "The official TypeScript library for the Flowglad API",
"author": "Flowglad <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
40 changes: 38 additions & 2 deletions packages/mcp-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,36 @@ For clients with a configuration JSON, it might look something like this:
}
```

### Cursor

If you use Cursor, you can install the MCP server by using the button below. You will need to set your environment variables
in Cursor's `mcp.json`, which can be found in Cursor Settings > Tools & MCP > New MCP Server.

[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=@flowglad/node-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBmbG93Z2xhZC9ub2RlLW1jcCJdLCJlbnYiOnsiRkxPV0dMQURfU0VDUkVUX0tFWSI6IlNldCB5b3VyIEZMT1dHTEFEX1NFQ1JFVF9LRVkgaGVyZS4ifX0)

### VS Code

If you use MCP, you can install the MCP server by clicking the link below. You will need to set your environment variables
in VS Code's `mcp.json`, which can be found via Command Palette > MCP: Open User Configuration.

[Open VS Code](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40flowglad%2Fnode-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40flowglad%2Fnode-mcp%22%5D%2C%22env%22%3A%7B%22FLOWGLAD_SECRET_KEY%22%3A%22Set%20your%20FLOWGLAD_SECRET_KEY%20here.%22%7D%7D)

### Claude Code

If you use Claude Code, you can install the MCP server by running the command below in your terminal. You will need to set your
environment variables in Claude Code's `.claude.json`, which can be found in your home directory.

```
claude mcp add --transport stdio flowglad_node_api --env FLOWGLAD_SECRET_KEY="Your FLOWGLAD_SECRET_KEY here." -- npx -y @flowglad/node-mcp
```

## Exposing endpoints to your MCP Client

There are two ways to expose endpoints as tools in the MCP server:
There are three ways to expose endpoints as tools in the MCP server:

1. Exposing one tool per endpoint, and filtering as necessary
2. Exposing a set of tools to dynamically discover and invoke endpoints from the API
3. Exposing a docs search tool and a code execution tool, allowing the client to write code to be executed against the TypeScript client

### Filtering endpoints and tools

Expand Down Expand Up @@ -74,6 +98,18 @@ All of these command-line options can be repeated, combined together, and have c

Use `--list` to see the list of available tools, or see below.

### Code execution

If you specify `--tools=code` to the MCP server, it will expose just two tools:

- `search_docs` - Searches the API documentation and returns a list of markdown results
- `execute` - Runs code against the TypeScript client

This allows the LLM to implement more complex logic by chaining together many API calls without loading
intermediary results into its context window.

The code execution itself happens in a Deno sandbox that has network access only to the base URL for the API.

### Specifying the MCP Client

Different clients have varying abilities to handle arbitrary tools and schemas.
Expand Down Expand Up @@ -272,7 +308,7 @@ The following tools are available in this MCP server.
- `retrieve_subscriptions` (`read`): Get Subscription
- `list_subscriptions` (`read`): List Subscriptions
- `adjust_subscriptions` (`write`): Note: Immediate adjustments are in private preview (Please let us know you use this feature: https://github.com/flowglad/flowglad/issues/616). Adjustments at the end of the current billing period are generally available.
- `cancel_subscriptions` (`write`): Cancel a Subscription
- `cancel_subscriptions` (`write`): Cancel Subscription

### Resource `usage_events`:

Expand Down
11 changes: 6 additions & 5 deletions packages/mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@flowglad/node-mcp",
"version": "0.22.0",
"version": "0.23.0",
"description": "The official MCP Server for the Flowglad API",
"author": "Flowglad <[email protected]>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -36,8 +36,10 @@
"@valtown/deno-http-worker": "^0.0.21",
"cors": "^2.8.5",
"express": "^5.1.0",
"jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz",
"fuse.js": "^7.1.0",
"jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.8/jq-web.tar.gz",
"qs": "^6.14.0",
"typescript": "5.8.3",
"yargs": "^17.7.2",
"zod": "^3.25.20",
"zod-to-json-schema": "^3.24.5",
Expand All @@ -47,7 +49,7 @@
"mcp-server": "dist/index.js"
},
"devDependencies": {
"@anthropic-ai/mcpb": "^1.1.0",
"@anthropic-ai/mcpb": "1.1.0",
"@types/cors": "^2.8.19",
"@types/express": "^5.0.3",
"@types/jest": "^29.4.0",
Expand All @@ -64,8 +66,7 @@
"ts-morph": "^19.0.0",
"ts-node": "^10.5.0",
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz",
"tsconfig-paths": "^4.0.0",
"typescript": "5.8.3"
"tsconfig-paths": "^4.0.0"
},
"imports": {
"@flowglad/node-mcp": ".",
Expand Down
Loading