Skip to content

Commit 8d5c4c8

Browse files
chore(internal): codegen related update
1 parent 266a273 commit 8d5c4c8

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

packages/mcp-server/README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,18 @@ For clients with a configuration JSON, it might look something like this:
5151

5252
### Cursor
5353

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

57-
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=@stainless-api/sdk-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBzdGFpbmxlc3MtYXBpL3Nkay1tY3AiXSwiZW52Ijp7IlNUQUlOTEVTU19BUElfS0VZIjoiU2V0IHlvdXIgU1RBSU5MRVNTX0FQSV9LRVkgaGVyZS4iLCJTVEFJTkxFU1NfUFJPSkVDVCI6IlNldCB5b3VyIFNUQUlOTEVTU19QUk9KRUNUIGhlcmUuIn19)
57+
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=@stainless-api/sdk-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBzdGFpbmxlc3MtYXBpL3Nkay1tY3AiXSwiZW52Ijp7IlNUQUlOTEVTU19BUElfS0VZIjoiU2V0IHlvdXIgU1RBSU5MRVNTX0FQSV9LRVkgaGVyZS4iLCJTVEFJTkxFU1NfUFJPSkVDVCI6IlNldCB5b3VyIFNUQUlOTEVTU19QUk9KRUNUIGhlcmUuIn19)
5858

5959
## Exposing endpoints to your MCP Client
6060

61-
There are two ways to expose endpoints as tools in the MCP server:
61+
There are three ways to expose endpoints as tools in the MCP server:
6262

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

6667
### Filtering endpoints and tools
6768

@@ -96,6 +97,18 @@ All of these command-line options can be repeated, combined together, and have c
9697

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

100+
### Code execution
101+
102+
If you specify `--tools=code` to the MCP server, it will expose just two tools:
103+
104+
- `search_docs` - Searches the API documentation and returns a list of markdown results
105+
- `execute` - Runs code against the TypeScript client
106+
107+
This allows the LLM to implement more complex logic by chaining together many API calls without loading
108+
intermediary results into its context window.
109+
110+
The code execution itself happens in a Deno sandbox that has network access only to the base URL for the API.
111+
99112
### Specifying the MCP Client
100113

101114
Different clients have varying abilities to handle arbitrary tools and schemas.

0 commit comments

Comments
 (0)