Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
70396fe
Update Dockerfile
meorphis Sep 30, 2025
41fd015
Update Dockerfile
meorphis Sep 30, 2025
20bdadc
Update Dockerfile
meorphis Sep 30, 2025
641907d
Revert "Update Dockerfile"
Sep 30, 2025
a8620b9
chore: fix dockerfile
Sep 30, 2025
5906dba
chore(internal): fix incremental formatting in some cases
stainless-app[bot] Sep 27, 2025
b8df387
chore(mcp): allow pointing `docs_search` tool at other URLs
stainless-app[bot] Sep 27, 2025
4aab75e
chore(internal): codegen related update
stainless-app[bot] Sep 27, 2025
c1fe619
chore(internal): ignore .eslintcache
stainless-app[bot] Sep 27, 2025
a4f392b
chore(internal): codegen related update
stainless-app[bot] Sep 30, 2025
6f51296
fix(mcp): fix cli argument parsing logic
stainless-app[bot] Sep 30, 2025
3695b9c
fix(mcp): resolve a linting issue in server code
stainless-app[bot] Sep 30, 2025
3972fce
chore: update lockfile
stainless-app[bot] Sep 30, 2025
80c9762
chore(internal): remove .eslintcache
stainless-app[bot] Oct 1, 2025
0f35c17
chore(internal): codegen related update
stainless-app[bot] Oct 1, 2025
d531f3f
chore: update mcp dockerfile
stainless-app[bot] Oct 3, 2025
d443db2
chore(jsdoc): fix @link annotations to refer only to parts of the pac…
stainless-app[bot] Oct 4, 2025
64381d5
chore(internal): use npm pack for build uploads
stainless-app[bot] Oct 7, 2025
f5bf0d1
feat: Expose connection-specific decorated OAS
stainless-app[bot] Oct 7, 2025
8be59d8
chore(internal): codegen related update
stainless-app[bot] Oct 8, 2025
6953e19
chore: extract some types in mcp docs
stainless-app[bot] Oct 9, 2025
c4f88d9
chore: update docstrings
stainless-app[bot] Oct 10, 2025
bac0df5
release: 0.1.0-alpha.17
stainless-bot Oct 10, 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
1 change: 1 addition & 0 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.STAINLESS_NPM_TOKEN || secrets.NPM_TOKEN }}
DOCKERHUB_TOKEN: ${{ secrets.STAINLESS_DOCKERHUB_TOKEN || secrets.DOCKERHUB_TOKEN }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +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 @@
{
".": "0.1.0-alpha.16"
".": "0.1.0-alpha.17"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 19
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stainless%2Fstainless-v0-5c1008fd27f64bcde1a146a4158f1c3113b4e13437a4d880bd6811fb063cfcd6.yml
openapi_spec_hash: 9583f62164b5dc15b10051dad6a7fca4
config_hash: e895f7992a607a15865ed026cbe5470d
configured_endpoints: 20
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stainless%2Fstainless-v0-030e47a1bfd79a657974f5beddd685940ec04b1aa1786c3b2cb0f4610ad2b42c.yml
openapi_spec_hash: 33b337af28bcc1c9aa1a5218acf2a7fe
config_hash: ebaca4741c1a2caf1372aa5bba88d4c7
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Changelog

## 0.1.0-alpha.17 (2025-10-10)

Full Changelog: [v0.1.0-alpha.16...v0.1.0-alpha.17](https://github.com/stainless-api/stainless-api-typescript/compare/v0.1.0-alpha.16...v0.1.0-alpha.17)

### Features

* Expose connection-specific decorated OAS ([f5bf0d1](https://github.com/stainless-api/stainless-api-typescript/commit/f5bf0d19f2aa16e2725268f09723437707eaa398))


### Bug Fixes

* **mcp:** fix cli argument parsing logic ([6f51296](https://github.com/stainless-api/stainless-api-typescript/commit/6f5129610f26504aa48d94375dbff726406aef51))
* **mcp:** resolve a linting issue in server code ([3695b9c](https://github.com/stainless-api/stainless-api-typescript/commit/3695b9cf8da2c80a10e0164ea689cee3e8e05b4d))


### Chores

* extract some types in mcp docs ([6953e19](https://github.com/stainless-api/stainless-api-typescript/commit/6953e19081e6fd162450cb352745829803870036))
* fix dockerfile ([a8620b9](https://github.com/stainless-api/stainless-api-typescript/commit/a8620b9e901e80a509217c0afdcfde3ca7db2594))
* **internal:** codegen related update ([8be59d8](https://github.com/stainless-api/stainless-api-typescript/commit/8be59d8d750c483fcf89e09f8c115ce55b3c7e04))
* **internal:** codegen related update ([0f35c17](https://github.com/stainless-api/stainless-api-typescript/commit/0f35c1778e16bc0f8c6542624d6325f34305d758))
* **internal:** codegen related update ([a4f392b](https://github.com/stainless-api/stainless-api-typescript/commit/a4f392b24af3b8edd027a2519cbc79ac362669b0))
* **internal:** codegen related update ([4aab75e](https://github.com/stainless-api/stainless-api-typescript/commit/4aab75e95c6be99f8340a16d0e415615db4bded8))
* **internal:** fix incremental formatting in some cases ([5906dba](https://github.com/stainless-api/stainless-api-typescript/commit/5906dba834a1abec5399fd3cd27459b213a5d301))
* **internal:** ignore .eslintcache ([c1fe619](https://github.com/stainless-api/stainless-api-typescript/commit/c1fe61994b503fbd898b01feda816845436045a6))
* **internal:** remove .eslintcache ([80c9762](https://github.com/stainless-api/stainless-api-typescript/commit/80c9762d8834f3fd1ad9ec8a4f8639a6732c8c43))
* **internal:** use npm pack for build uploads ([64381d5](https://github.com/stainless-api/stainless-api-typescript/commit/64381d5bda0c0469711d936b76bf728965b6c5de))
* **jsdoc:** fix [@link](https://github.com/link) annotations to refer only to parts of the package‘s public interface ([d443db2](https://github.com/stainless-api/stainless-api-typescript/commit/d443db20c8a895993c651a0d8681f526f970e028))
* **mcp:** allow pointing `docs_search` tool at other URLs ([b8df387](https://github.com/stainless-api/stainless-api-typescript/commit/b8df387d55a125f19cc419605b349c910c8373fe))
* update docstrings ([c4f88d9](https://github.com/stainless-api/stainless-api-typescript/commit/c4f88d941696d5f25dd449c33ffe71a46f9a2b2a))
* update lockfile ([3972fce](https://github.com/stainless-api/stainless-api-typescript/commit/3972fce8d4d77f2cc734c3bc6e8812d1941d41ce))
* update mcp dockerfile ([d531f3f](https://github.com/stainless-api/stainless-api-typescript/commit/d531f3f03874c84bba354b3a1a2a210946b0658c))

## 0.1.0-alpha.16 (2025-09-26)

Full Changelog: [v0.1.0-alpha.15...v0.1.0-alpha.16](https://github.com/stainless-api/stainless-api-typescript/compare/v0.1.0-alpha.15...v0.1.0-alpha.16)
Expand Down
10 changes: 10 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,13 @@ Methods:

- <code title="get /v0/orgs/{org}">client.orgs.<a href="./src/resources/orgs.ts">retrieve</a>(org) -> Org</code>
- <code title="get /v0/orgs">client.orgs.<a href="./src/resources/orgs.ts">list</a>() -> OrgListResponse</code>

# Spec

Types:

- <code><a href="./src/resources/spec.ts">SpecRetrieveDecoratedSpecResponse</a></code>

Methods:

- <code title="get /v0/spec/application/{clientId}/{projectName}">client.spec.<a href="./src/resources/spec.ts">retrieveDecoratedSpec</a>(projectName, { ...params }) -> unknown</code>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stainless-api/sdk",
"version": "0.1.0-alpha.16",
"version": "0.1.0-alpha.17",
"description": "The official TypeScript library for the Stainless API",
"author": "Stainless <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
22 changes: 16 additions & 6 deletions packages/mcp-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Build stage
FROM node:20-alpine AS builder

# Enable corepack to use pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate

# Install bash for build script
RUN apk add --no-cache bash openssl

Expand All @@ -15,19 +18,22 @@ RUN pnpm install --frozen-lockfile && \
pnpm build

# Production stage
FROM node:20-alpine

FROM denoland/deno:alpine
RUN apk add --no-cache npm

# Add non-root user
RUN addgroup -g 1001 -S nodejs && adduser -S nodejs -u 1001

# Set working directory
WORKDIR /app

# Copy the built mcp-server dist directory
COPY --from=builder /build/packages/mcp-server/dist ./
# Copy the built mcp-server preserving directory structure
COPY --from=builder /build/packages/mcp-server/dist ./packages/mcp-server/dist
COPY --from=builder /build/packages/mcp-server/node_modules ./packages/mcp-server/node_modules

# Copy node_modules from mcp-server (includes all production deps)
COPY --from=builder /build/packages/mcp-server/node_modules ./node_modules
# Copy node_modules from root (pnpm hoists dependencies here)
COPY --from=builder /build/node_modules ./node_modules

# Copy the built @stainless-api/sdk into node_modules
COPY --from=builder /build/dist ./node_modules/@stainless-api/sdk
Expand All @@ -41,8 +47,12 @@ USER nodejs
# The MCP server uses stdio transport by default
# No exposed ports needed for stdio communication

# This is needed for node to run on the deno:alpine image.
# See <https://github.com/denoland/deno_docker/issues/373>.
ENV LD_LIBRARY_PATH=/usr/lib:/usr/local/lib

# Set the entrypoint to the MCP server
ENTRYPOINT ["node", "index.js"]
ENTRYPOINT ["node", "packages/mcp-server/dist/index.js"]

# Allow passing arguments to the MCP server
CMD []
5 changes: 5 additions & 0 deletions packages/mcp-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,3 +285,8 @@ The following tools are available in this MCP server.

- `retrieve_orgs` (`read`): Retrieve an organization by name.
- `list_orgs` (`read`): List organizations accessible to the current authentication method.

### Resource `spec`:

- `retrieve_decorated_spec_spec` (`read`):
Retrieve the decorated spec for a given application and project.
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": "@stainless-api/sdk-mcp",
"version": "0.1.0-alpha.16",
"version": "0.1.0-alpha.17",
"description": "The official MCP Server for the Stainless API",
"author": "Stainless <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/mcp-server/src/docs-search-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ export const tool: Tool = {
},
};

const docsSearchURL =
process.env['DOCS_SEARCH_URL'] || 'https://api.stainless.com/api/projects/stainless-v0/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('https://api.stainless.com/api/projects/stainless-v0/docs/search?' + query);
const result = await fetch(`${docsSearchURL}?${query}`);
return asTextContentResult(await result.json());
};

Expand Down
5 changes: 3 additions & 2 deletions packages/mcp-server/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,10 @@ export function parseCLIOptions(): CLIOptions {
}

const shouldIncludeToolType = (toolType: 'dynamic' | 'all' | 'code' | 'docs') =>
explicitTools ? argv.tools?.includes(toolType) && !argv.noTools?.includes(toolType) : undefined;
argv.noTools?.includes(toolType) ? false
: argv.tools?.includes(toolType) ? true
: undefined;

const explicitTools = Boolean(argv.tools || argv.noTools);
const includeDynamicTools = shouldIncludeToolType('dynamic');
const includeAllTools = shouldIncludeToolType('all');
const includeCodeTools = shouldIncludeToolType('code');
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 @@ -34,7 +34,7 @@ export const newMcpServer = () =>
new McpServer(
{
name: 'stainless_api_sdk_api',
version: '0.1.0-alpha.16',
version: '0.1.0-alpha.17',
},
{ capabilities: { tools: {}, logging: {} } },
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const metadata: Metadata = {
export const tool: Tool = {
name: 'retrieve_builds_target_outputs',
description:
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve a method to download an output for a given build target.\n\nIf the requested type of output is `source`, and the requested output\nmethod is `url`, a download link to a tarball of the source files is\nreturned. If the requested output method is `git`, a Git remote, ref,\nand access token (if necessary) is returned.\n\nOtherwise, the possible types of outputs are specific to the requested\ntarget, and the output method _must_ be `url`. See the documentation for\n`type` for more information.\n\n# Response Schema\n```json\n{\n anyOf: [ {\n type: 'object',\n properties: {\n output: {\n type: 'string',\n enum: [ 'url'\n ]\n },\n target: {\n $ref: '#/$defs/target'\n },\n type: {\n type: 'string',\n enum: [ 'source',\n 'dist',\n 'wheel'\n ]\n },\n url: {\n type: 'string',\n description: 'URL for direct download'\n }\n },\n required: [ 'output',\n 'target',\n 'type',\n 'url'\n ]\n },\n {\n type: 'object',\n properties: {\n token: {\n type: 'string',\n description: 'Temporary GitHub access token'\n },\n output: {\n type: 'string',\n enum: [ 'git'\n ]\n },\n ref: {\n type: 'string',\n description: 'Git reference (commit SHA, branch, or tag)'\n },\n target: {\n $ref: '#/$defs/target'\n },\n type: {\n type: 'string',\n enum: [ 'source',\n 'dist',\n 'wheel'\n ]\n },\n url: {\n type: 'string',\n description: 'URL to git remote'\n }\n },\n required: [ 'token',\n 'output',\n 'ref',\n 'target',\n 'type',\n 'url'\n ]\n }\n ],\n $defs: {\n target: {\n type: 'string',\n enum: [ 'node',\n 'typescript',\n 'python',\n 'go',\n 'java',\n 'kotlin',\n 'ruby',\n 'terraform',\n 'cli',\n 'php',\n 'csharp'\n ]\n }\n }\n}\n```",
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve a method to download an output for a given build target.\n\nIf the requested type of output is `source`, and the requested output\nmethod is `url`, a download link to a tarball of the source files is\nreturned. If the requested output method is `git`, a Git remote, ref,\nand access token (if necessary) is returned.\n\nOtherwise, the possible types of outputs are specific to the requested\ntarget, and the output method _must_ be `url`. See the documentation for\n`type` for more information.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/target_output_retrieve_response',\n $defs: {\n target_output_retrieve_response: {\n anyOf: [ {\n type: 'object',\n properties: {\n output: {\n type: 'string',\n enum: [ 'url'\n ]\n },\n target: {\n $ref: '#/$defs/target'\n },\n type: {\n type: 'string',\n enum: [ 'source',\n 'dist',\n 'wheel'\n ]\n },\n url: {\n type: 'string',\n description: 'URL for direct download'\n }\n },\n required: [ 'output',\n 'target',\n 'type',\n 'url'\n ]\n },\n {\n type: 'object',\n properties: {\n token: {\n type: 'string',\n description: 'Temporary GitHub access token'\n },\n output: {\n type: 'string',\n enum: [ 'git'\n ]\n },\n ref: {\n type: 'string',\n description: 'Git reference (commit SHA, branch, or tag)'\n },\n target: {\n $ref: '#/$defs/target'\n },\n type: {\n type: 'string',\n enum: [ 'source',\n 'dist',\n 'wheel'\n ]\n },\n url: {\n type: 'string',\n description: 'URL to git remote'\n }\n },\n required: [ 'token',\n 'output',\n 'ref',\n 'target',\n 'type',\n 'url'\n ]\n }\n ]\n },\n target: {\n type: 'string',\n enum: [ 'node',\n 'typescript',\n 'python',\n 'go',\n 'java',\n 'kotlin',\n 'ruby',\n 'terraform',\n 'cli',\n 'php',\n 'csharp'\n ]\n }\n }\n}\n```",
inputSchema: {
type: 'object',
properties: {
Expand Down
2 changes: 2 additions & 0 deletions packages/mcp-server/src/tools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import list_builds_diagnostics from './builds/diagnostics/list-builds-diagnostic
import retrieve_builds_target_outputs from './builds/target-outputs/retrieve-builds-target-outputs';
import retrieve_orgs from './orgs/retrieve-orgs';
import list_orgs from './orgs/list-orgs';
import retrieve_decorated_spec_spec from './spec/retrieve-decorated-spec-spec';

export const endpoints: Endpoint[] = [];

Expand All @@ -47,6 +48,7 @@ addEndpoint(list_builds_diagnostics);
addEndpoint(retrieve_builds_target_outputs);
addEndpoint(retrieve_orgs);
addEndpoint(list_orgs);
addEndpoint(retrieve_decorated_spec_spec);

export type Filter = {
type: 'resource' | 'operation' | 'tag' | 'tool';
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/src/tools/orgs/list-orgs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const metadata: Metadata = {
export const tool: Tool = {
name: 'list_orgs',
description:
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList organizations accessible to the current authentication method.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/org'\n }\n },\n has_more: {\n type: 'boolean'\n },\n next_cursor: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'has_more'\n ],\n $defs: {\n org: {\n type: 'object',\n properties: {\n display_name: {\n type: 'string'\n },\n object: {\n type: 'string',\n enum: [ 'org'\n ]\n },\n slug: {\n type: 'string'\n }\n },\n required: [ 'display_name',\n 'object',\n 'slug'\n ]\n }\n }\n}\n```",
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList organizations accessible to the current authentication method.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/org_list_response',\n $defs: {\n org_list_response: {\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/org'\n }\n },\n has_more: {\n type: 'boolean'\n },\n next_cursor: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'has_more'\n ]\n },\n org: {\n type: 'object',\n properties: {\n display_name: {\n type: 'string'\n },\n object: {\n type: 'string',\n enum: [ 'org'\n ]\n },\n slug: {\n type: 'string'\n }\n },\n required: [ 'display_name',\n 'object',\n 'slug'\n ]\n }\n }\n}\n```",
inputSchema: {
type: 'object',
properties: {
Expand Down
Loading
Loading