brand.dev-mcp 0.19.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/README.md +13 -169
  2. package/code-tool.d.mts +2 -44
  3. package/code-tool.d.mts.map +1 -1
  4. package/code-tool.d.ts +2 -44
  5. package/code-tool.d.ts.map +1 -1
  6. package/code-tool.js +6 -3
  7. package/code-tool.js.map +1 -1
  8. package/code-tool.mjs +6 -3
  9. package/code-tool.mjs.map +1 -1
  10. package/docs-search-tool.d.mts +3 -3
  11. package/docs-search-tool.d.mts.map +1 -1
  12. package/docs-search-tool.d.ts +3 -3
  13. package/docs-search-tool.d.ts.map +1 -1
  14. package/docs-search-tool.js +1 -1
  15. package/docs-search-tool.js.map +1 -1
  16. package/docs-search-tool.mjs +1 -1
  17. package/http.d.mts.map +1 -1
  18. package/http.d.ts.map +1 -1
  19. package/http.js +1 -18
  20. package/http.js.map +1 -1
  21. package/http.mjs +1 -18
  22. package/http.mjs.map +1 -1
  23. package/index.js +4 -40
  24. package/index.js.map +1 -1
  25. package/index.mjs +4 -40
  26. package/index.mjs.map +1 -1
  27. package/options.d.mts +0 -9
  28. package/options.d.mts.map +1 -1
  29. package/options.d.ts +0 -9
  30. package/options.d.ts.map +1 -1
  31. package/options.js +4 -359
  32. package/options.js.map +1 -1
  33. package/options.mjs +4 -359
  34. package/options.mjs.map +1 -1
  35. package/package.json +9 -49
  36. package/server.d.mts +3 -8
  37. package/server.d.mts.map +1 -1
  38. package/server.d.ts +3 -8
  39. package/server.d.ts.map +1 -1
  40. package/server.js +12 -65
  41. package/server.js.map +1 -1
  42. package/server.mjs +11 -62
  43. package/server.mjs.map +1 -1
  44. package/src/code-tool.ts +6 -3
  45. package/src/docs-search-tool.ts +1 -1
  46. package/src/http.ts +1 -19
  47. package/src/index.ts +5 -52
  48. package/src/options.ts +5 -386
  49. package/src/server.ts +12 -72
  50. package/src/stdio.ts +2 -3
  51. package/src/{tools/types.ts → types.ts} +1 -1
  52. package/stdio.d.mts +1 -2
  53. package/stdio.d.mts.map +1 -1
  54. package/stdio.d.ts +1 -2
  55. package/stdio.d.ts.map +1 -1
  56. package/stdio.js +2 -2
  57. package/stdio.js.map +1 -1
  58. package/stdio.mjs +2 -2
  59. package/stdio.mjs.map +1 -1
  60. package/{tools/types.d.mts → types.d.mts} +1 -1
  61. package/types.d.mts.map +1 -0
  62. package/{tools/types.d.ts → types.d.ts} +1 -1
  63. package/types.d.ts.map +1 -0
  64. package/types.js.map +1 -0
  65. package/types.mjs.map +1 -0
  66. package/compat.d.mts +0 -58
  67. package/compat.d.mts.map +0 -1
  68. package/compat.d.ts +0 -58
  69. package/compat.d.ts.map +0 -1
  70. package/compat.js +0 -387
  71. package/compat.js.map +0 -1
  72. package/compat.mjs +0 -378
  73. package/compat.mjs.map +0 -1
  74. package/dynamic-tools.d.mts +0 -12
  75. package/dynamic-tools.d.mts.map +0 -1
  76. package/dynamic-tools.d.ts +0 -12
  77. package/dynamic-tools.d.ts.map +0 -1
  78. package/dynamic-tools.js +0 -135
  79. package/dynamic-tools.js.map +0 -1
  80. package/dynamic-tools.mjs +0 -132
  81. package/dynamic-tools.mjs.map +0 -1
  82. package/filtering.d.mts +0 -3
  83. package/filtering.d.mts.map +0 -1
  84. package/filtering.d.ts +0 -3
  85. package/filtering.d.ts.map +0 -1
  86. package/filtering.js +0 -24
  87. package/filtering.js.map +0 -1
  88. package/filtering.mjs +0 -16
  89. package/filtering.mjs.map +0 -1
  90. package/src/compat.ts +0 -483
  91. package/src/dynamic-tools.ts +0 -153
  92. package/src/filtering.ts +0 -18
  93. package/src/tools/brand/ai-query-brand.ts +0 -138
  94. package/src/tools/brand/fonts-brand.ts +0 -60
  95. package/src/tools/brand/identify-from-transaction-brand.ts +0 -374
  96. package/src/tools/brand/prefetch-brand.ts +0 -57
  97. package/src/tools/brand/retrieve-brand.ts +0 -116
  98. package/src/tools/brand/retrieve-by-email-brand.ts +0 -116
  99. package/src/tools/brand/retrieve-by-isin-brand.ts +0 -116
  100. package/src/tools/brand/retrieve-by-name-brand.ts +0 -116
  101. package/src/tools/brand/retrieve-by-ticker-brand.ts +0 -194
  102. package/src/tools/brand/retrieve-naics-brand.ts +0 -68
  103. package/src/tools/brand/retrieve-simplified-brand.ts +0 -59
  104. package/src/tools/brand/screenshot-brand.ts +0 -73
  105. package/src/tools/brand/styleguide-brand.ts +0 -59
  106. package/src/tools/index.ts +0 -95
  107. package/src/tools.ts +0 -1
  108. package/tools/brand/ai-query-brand.d.mts +0 -51
  109. package/tools/brand/ai-query-brand.d.mts.map +0 -1
  110. package/tools/brand/ai-query-brand.d.ts +0 -51
  111. package/tools/brand/ai-query-brand.d.ts.map +0 -1
  112. package/tools/brand/ai-query-brand.js +0 -135
  113. package/tools/brand/ai-query-brand.js.map +0 -1
  114. package/tools/brand/ai-query-brand.mjs +0 -128
  115. package/tools/brand/ai-query-brand.mjs.map +0 -1
  116. package/tools/brand/fonts-brand.d.mts +0 -51
  117. package/tools/brand/fonts-brand.d.mts.map +0 -1
  118. package/tools/brand/fonts-brand.d.ts +0 -51
  119. package/tools/brand/fonts-brand.d.ts.map +0 -1
  120. package/tools/brand/fonts-brand.js +0 -58
  121. package/tools/brand/fonts-brand.js.map +0 -1
  122. package/tools/brand/fonts-brand.mjs +0 -51
  123. package/tools/brand/fonts-brand.mjs.map +0 -1
  124. package/tools/brand/identify-from-transaction-brand.d.mts +0 -51
  125. package/tools/brand/identify-from-transaction-brand.d.mts.map +0 -1
  126. package/tools/brand/identify-from-transaction-brand.d.ts +0 -51
  127. package/tools/brand/identify-from-transaction-brand.d.ts.map +0 -1
  128. package/tools/brand/identify-from-transaction-brand.js +0 -371
  129. package/tools/brand/identify-from-transaction-brand.js.map +0 -1
  130. package/tools/brand/identify-from-transaction-brand.mjs +0 -364
  131. package/tools/brand/identify-from-transaction-brand.mjs.map +0 -1
  132. package/tools/brand/prefetch-brand.d.mts +0 -51
  133. package/tools/brand/prefetch-brand.d.mts.map +0 -1
  134. package/tools/brand/prefetch-brand.d.ts +0 -51
  135. package/tools/brand/prefetch-brand.d.ts.map +0 -1
  136. package/tools/brand/prefetch-brand.js +0 -56
  137. package/tools/brand/prefetch-brand.js.map +0 -1
  138. package/tools/brand/prefetch-brand.mjs +0 -49
  139. package/tools/brand/prefetch-brand.mjs.map +0 -1
  140. package/tools/brand/retrieve-brand.d.mts +0 -51
  141. package/tools/brand/retrieve-brand.d.mts.map +0 -1
  142. package/tools/brand/retrieve-brand.d.ts +0 -51
  143. package/tools/brand/retrieve-brand.d.ts.map +0 -1
  144. package/tools/brand/retrieve-brand.js +0 -114
  145. package/tools/brand/retrieve-brand.js.map +0 -1
  146. package/tools/brand/retrieve-brand.mjs +0 -107
  147. package/tools/brand/retrieve-brand.mjs.map +0 -1
  148. package/tools/brand/retrieve-by-email-brand.d.mts +0 -51
  149. package/tools/brand/retrieve-by-email-brand.d.mts.map +0 -1
  150. package/tools/brand/retrieve-by-email-brand.d.ts +0 -51
  151. package/tools/brand/retrieve-by-email-brand.d.ts.map +0 -1
  152. package/tools/brand/retrieve-by-email-brand.js +0 -114
  153. package/tools/brand/retrieve-by-email-brand.js.map +0 -1
  154. package/tools/brand/retrieve-by-email-brand.mjs +0 -107
  155. package/tools/brand/retrieve-by-email-brand.mjs.map +0 -1
  156. package/tools/brand/retrieve-by-isin-brand.d.mts +0 -51
  157. package/tools/brand/retrieve-by-isin-brand.d.mts.map +0 -1
  158. package/tools/brand/retrieve-by-isin-brand.d.ts +0 -51
  159. package/tools/brand/retrieve-by-isin-brand.d.ts.map +0 -1
  160. package/tools/brand/retrieve-by-isin-brand.js +0 -114
  161. package/tools/brand/retrieve-by-isin-brand.js.map +0 -1
  162. package/tools/brand/retrieve-by-isin-brand.mjs +0 -107
  163. package/tools/brand/retrieve-by-isin-brand.mjs.map +0 -1
  164. package/tools/brand/retrieve-by-name-brand.d.mts +0 -51
  165. package/tools/brand/retrieve-by-name-brand.d.mts.map +0 -1
  166. package/tools/brand/retrieve-by-name-brand.d.ts +0 -51
  167. package/tools/brand/retrieve-by-name-brand.d.ts.map +0 -1
  168. package/tools/brand/retrieve-by-name-brand.js +0 -114
  169. package/tools/brand/retrieve-by-name-brand.js.map +0 -1
  170. package/tools/brand/retrieve-by-name-brand.mjs +0 -107
  171. package/tools/brand/retrieve-by-name-brand.mjs.map +0 -1
  172. package/tools/brand/retrieve-by-ticker-brand.d.mts +0 -51
  173. package/tools/brand/retrieve-by-ticker-brand.d.mts.map +0 -1
  174. package/tools/brand/retrieve-by-ticker-brand.d.ts +0 -51
  175. package/tools/brand/retrieve-by-ticker-brand.d.ts.map +0 -1
  176. package/tools/brand/retrieve-by-ticker-brand.js +0 -192
  177. package/tools/brand/retrieve-by-ticker-brand.js.map +0 -1
  178. package/tools/brand/retrieve-by-ticker-brand.mjs +0 -185
  179. package/tools/brand/retrieve-by-ticker-brand.mjs.map +0 -1
  180. package/tools/brand/retrieve-naics-brand.d.mts +0 -51
  181. package/tools/brand/retrieve-naics-brand.d.mts.map +0 -1
  182. package/tools/brand/retrieve-naics-brand.d.ts +0 -51
  183. package/tools/brand/retrieve-naics-brand.d.ts.map +0 -1
  184. package/tools/brand/retrieve-naics-brand.js +0 -66
  185. package/tools/brand/retrieve-naics-brand.js.map +0 -1
  186. package/tools/brand/retrieve-naics-brand.mjs +0 -59
  187. package/tools/brand/retrieve-naics-brand.mjs.map +0 -1
  188. package/tools/brand/retrieve-simplified-brand.d.mts +0 -51
  189. package/tools/brand/retrieve-simplified-brand.d.mts.map +0 -1
  190. package/tools/brand/retrieve-simplified-brand.d.ts +0 -51
  191. package/tools/brand/retrieve-simplified-brand.d.ts.map +0 -1
  192. package/tools/brand/retrieve-simplified-brand.js +0 -58
  193. package/tools/brand/retrieve-simplified-brand.js.map +0 -1
  194. package/tools/brand/retrieve-simplified-brand.mjs +0 -51
  195. package/tools/brand/retrieve-simplified-brand.mjs.map +0 -1
  196. package/tools/brand/screenshot-brand.d.mts +0 -51
  197. package/tools/brand/screenshot-brand.d.mts.map +0 -1
  198. package/tools/brand/screenshot-brand.d.ts +0 -51
  199. package/tools/brand/screenshot-brand.d.ts.map +0 -1
  200. package/tools/brand/screenshot-brand.js +0 -69
  201. package/tools/brand/screenshot-brand.js.map +0 -1
  202. package/tools/brand/screenshot-brand.mjs +0 -62
  203. package/tools/brand/screenshot-brand.mjs.map +0 -1
  204. package/tools/brand/styleguide-brand.d.mts +0 -51
  205. package/tools/brand/styleguide-brand.d.mts.map +0 -1
  206. package/tools/brand/styleguide-brand.d.ts +0 -51
  207. package/tools/brand/styleguide-brand.d.ts.map +0 -1
  208. package/tools/brand/styleguide-brand.js +0 -57
  209. package/tools/brand/styleguide-brand.js.map +0 -1
  210. package/tools/brand/styleguide-brand.mjs +0 -50
  211. package/tools/brand/styleguide-brand.mjs.map +0 -1
  212. package/tools/index.d.mts +0 -10
  213. package/tools/index.d.mts.map +0 -1
  214. package/tools/index.d.ts +0 -10
  215. package/tools/index.d.ts.map +0 -1
  216. package/tools/index.js +0 -79
  217. package/tools/index.js.map +0 -1
  218. package/tools/index.mjs +0 -72
  219. package/tools/index.mjs.map +0 -1
  220. package/tools/types.d.mts.map +0 -1
  221. package/tools/types.d.ts.map +0 -1
  222. package/tools/types.js.map +0 -1
  223. package/tools/types.mjs.map +0 -1
  224. package/tools.d.mts +0 -2
  225. package/tools.d.mts.map +0 -1
  226. package/tools.d.ts +0 -2
  227. package/tools.d.ts.map +0 -1
  228. package/tools.js +0 -18
  229. package/tools.js.map +0 -1
  230. package/tools.mjs +0 -2
  231. package/tools.mjs.map +0 -1
  232. /package/{tools/types.js → types.js} +0 -0
  233. /package/{tools/types.mjs → types.mjs} +0 -0
package/README.md CHANGED
@@ -25,7 +25,7 @@ For clients with a configuration JSON, it might look something like this:
25
25
  "mcpServers": {
26
26
  "brand_dev_api": {
27
27
  "command": "npx",
28
- "args": ["-y", "brand.dev-mcp", "--client=claude", "--tools=all"],
28
+ "args": ["-y", "brand.dev-mcp"],
29
29
  "env": {
30
30
  "BRAND_DEV_API_KEY": "My API Key"
31
31
  }
@@ -57,110 +57,22 @@ environment variables in Claude Code's `.claude.json`, which can be found in you
57
57
  claude mcp add --transport stdio brand_dev_api --env BRAND_DEV_API_KEY="Your BRAND_DEV_API_KEY here." -- npx -y brand.dev-mcp
58
58
  ```
59
59
 
60
- ## Exposing endpoints to your MCP Client
60
+ ## Code Mode
61
61
 
62
- There are three ways to expose endpoints as tools in the MCP server:
62
+ This MCP server is built on the "Code Mode" tool scheme. In this MCP Server,
63
+ your agent will write code against the TypeScript SDK, which will then be executed in an
64
+ isolated sandbox. To accomplish this, the server will expose two tools to your agent:
63
65
 
64
- 1. Exposing one tool per endpoint, and filtering as necessary
65
- 2. Exposing a set of tools to dynamically discover and invoke endpoints from the API
66
- 3. Exposing a docs search tool and a code execution tool, allowing the client to write code to be executed against the TypeScript client
66
+ - The first tool is a docs search tool, which can be used to generically query for
67
+ documentation about your API/SDK.
67
68
 
68
- ### Filtering endpoints and tools
69
+ - The second tool is a code tool, where the agent can write code against the TypeScript SDK.
70
+ The code will be executed in a sandbox environment without web or filesystem access. Then,
71
+ anything the code returns or prints will be returned to the agent as the result of the
72
+ tool call.
69
73
 
70
- You can run the package on the command line to discover and filter the set of tools that are exposed by the
71
- MCP Server. This can be helpful for large APIs where including all endpoints at once is too much for your AI's
72
- context window.
73
-
74
- You can filter by multiple aspects:
75
-
76
- - `--tool` includes a specific tool by name
77
- - `--resource` includes all tools under a specific resource, and can have wildcards, e.g. `my.resource*`
78
- - `--operation` includes just read (get/list) or just write operations
79
-
80
- ### Dynamic tools
81
-
82
- If you specify `--tools=dynamic` to the MCP server, instead of exposing one tool per endpoint in the API, it will
83
- expose the following tools:
84
-
85
- 1. `list_api_endpoints` - Discovers available endpoints, with optional filtering by search query
86
- 2. `get_api_endpoint_schema` - Gets detailed schema information for a specific endpoint
87
- 3. `invoke_api_endpoint` - Executes any endpoint with the appropriate parameters
88
-
89
- This allows you to have the full set of API endpoints available to your MCP Client, while not requiring that all
90
- of their schemas be loaded into context at once. Instead, the LLM will automatically use these tools together to
91
- search for, look up, and invoke endpoints dynamically. However, due to the indirect nature of the schemas, it
92
- can struggle to provide the correct properties a bit more than when tools are imported explicitly. Therefore,
93
- you can opt-in to explicit tools, the dynamic tools, or both.
94
-
95
- See more information with `--help`.
96
-
97
- All of these command-line options can be repeated, combined together, and have corresponding exclusion versions (e.g. `--no-tool`).
98
-
99
- Use `--list` to see the list of available tools, or see below.
100
-
101
- ### Code execution
102
-
103
- If you specify `--tools=code` to the MCP server, it will expose just two tools:
104
-
105
- - `search_docs` - Searches the API documentation and returns a list of markdown results
106
- - `execute` - Runs code against the TypeScript client
107
-
108
- This allows the LLM to implement more complex logic by chaining together many API calls without loading
109
- intermediary results into its context window.
110
-
111
- The code execution itself happens in a Deno sandbox that has network access only to the base URL for the API.
112
-
113
- ### Specifying the MCP Client
114
-
115
- Different clients have varying abilities to handle arbitrary tools and schemas.
116
-
117
- You can specify the client you are using with the `--client` argument, and the MCP server will automatically
118
- serve tools and schemas that are more compatible with that client.
119
-
120
- - `--client=<type>`: Set all capabilities based on a known MCP client
121
-
122
- - Valid values: `openai-agents`, `claude`, `claude-code`, `cursor`
123
- - Example: `--client=cursor`
124
-
125
- Additionally, if you have a client not on the above list, or the client has gotten better
126
- over time, you can manually enable or disable certain capabilities:
127
-
128
- - `--capability=<name>`: Specify individual client capabilities
129
- - Available capabilities:
130
- - `top-level-unions`: Enable support for top-level unions in tool schemas
131
- - `valid-json`: Enable JSON string parsing for arguments
132
- - `refs`: Enable support for $ref pointers in schemas
133
- - `unions`: Enable support for union types (anyOf) in schemas
134
- - `formats`: Enable support for format validations in schemas (e.g. date-time, email)
135
- - `tool-name-length=N`: Set maximum tool name length to N characters
136
- - Example: `--capability=top-level-unions --capability=tool-name-length=40`
137
- - Example: `--capability=top-level-unions,tool-name-length=40`
138
-
139
- ### Examples
140
-
141
- 1. Filter for read operations on cards:
142
-
143
- ```bash
144
- --resource=cards --operation=read
145
- ```
146
-
147
- 2. Exclude specific tools while including others:
148
-
149
- ```bash
150
- --resource=cards --no-tool=create_cards
151
- ```
152
-
153
- 3. Configure for Cursor client with custom max tool name length:
154
-
155
- ```bash
156
- --client=cursor --capability=tool-name-length=40
157
- ```
158
-
159
- 4. Complex filtering with multiple criteria:
160
-
161
- ```bash
162
- --resource=cards,accounts --operation=read --tag=kyc --no-tool=create_cards
163
- ```
74
+ Using this scheme, agents are capable of performing very complex tasks deterministically
75
+ and repeatably.
164
76
 
165
77
  ## Running remotely
166
78
 
@@ -187,71 +99,3 @@ A configuration JSON for this server might look like this, assuming the server i
187
99
  }
188
100
  }
189
101
  ```
190
-
191
- The command-line arguments for filtering tools and specifying clients can also be used as query parameters in the URL.
192
- For example, to exclude specific tools while including others, use the URL:
193
-
194
- ```
195
- http://localhost:3000?resource=cards&resource=accounts&no_tool=create_cards
196
- ```
197
-
198
- Or, to configure for the Cursor client, with a custom max tool name length, use the URL:
199
-
200
- ```
201
- http://localhost:3000?client=cursor&capability=tool-name-length%3D40
202
- ```
203
-
204
- ## Importing the tools and server individually
205
-
206
- ```js
207
- // Import the server, generated endpoints, or the init function
208
- import { server, endpoints, init } from "brand.dev-mcp/server";
209
-
210
- // import a specific tool
211
- import retrieveBrand from "brand.dev-mcp/tools/brand/retrieve-brand";
212
-
213
- // initialize the server and all endpoints
214
- init({ server, endpoints });
215
-
216
- // manually start server
217
- const transport = new StdioServerTransport();
218
- await server.connect(transport);
219
-
220
- // or initialize your own server with specific tools
221
- const myServer = new McpServer(...);
222
-
223
- // define your own endpoint
224
- const myCustomEndpoint = {
225
- tool: {
226
- name: 'my_custom_tool',
227
- description: 'My custom tool',
228
- inputSchema: zodToJsonSchema(z.object({ a_property: z.string() })),
229
- },
230
- handler: async (client: client, args: any) => {
231
- return { myResponse: 'Hello world!' };
232
- })
233
- };
234
-
235
- // initialize the server with your custom endpoints
236
- init({ server: myServer, endpoints: [retrieveBrand, myCustomEndpoint] });
237
- ```
238
-
239
- ## Available Tools
240
-
241
- The following tools are available in this MCP server.
242
-
243
- ### Resource `brand`:
244
-
245
- - `retrieve_brand` (`read`): Retrieve logos, backdrops, colors, industry, description, and more from any domain
246
- - `ai_query_brand` (`write`): Beta feature: Use AI to extract specific data points from a brand's website. The AI will crawl the website and extract the requested information based on the provided data points.
247
- - `fonts_brand` (`read`): Beta feature: Extract font information from a brand's website including font families, usage statistics, fallbacks, and element/word counts.
248
- - `identify_from_transaction_brand` (`read`): Endpoint specially designed for platforms that want to identify transaction data by the transaction title.
249
- - `prefetch_brand` (`write`): Signal that you may fetch brand data for a particular domain soon to improve latency. This endpoint does not charge credits and is available for paid customers to optimize future requests. [You must be on a paid plan to use this endpoint]
250
- - `retrieve_by_email_brand` (`read`): Retrieve brand information using an email address while detecting disposable and free email addresses. This endpoint extracts the domain from the email address and returns brand data for that domain. Disposable and free email addresses (like gmail.com, yahoo.com) will throw a 422 error.
251
- - `retrieve_by_isin_brand` (`read`): Retrieve brand information using an ISIN (International Securities Identification Number). This endpoint looks up the company associated with the ISIN and returns its brand data.
252
- - `retrieve_by_name_brand` (`read`): Retrieve brand information using a company name. This endpoint searches for the company by name and returns its brand data.
253
- - `retrieve_by_ticker_brand` (`read`): Retrieve brand information using a stock ticker symbol. This endpoint looks up the company associated with the ticker and returns its brand data.
254
- - `retrieve_naics_brand` (`read`): Endpoint to classify any brand into a 2022 NAICS code.
255
- - `retrieve_simplified_brand` (`read`): Returns a simplified version of brand data containing only essential information: domain, title, colors, logos, and backdrops. This endpoint is optimized for faster responses and reduced data transfer.
256
- - `screenshot_brand` (`read`): Beta feature: Capture a screenshot of a website. Supports both viewport (standard browser view) and full-page screenshots. Can also screenshot specific page types (login, pricing, etc.) by using heuristics to find the appropriate URL. Returns a URL to the uploaded screenshot image hosted on our CDN.
257
- - `styleguide_brand` (`read`): Beta feature: Automatically extract comprehensive design system information from a brand's website including colors, typography, spacing, shadows, and UI components.
package/code-tool.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { Metadata, ToolCallResult } from "./tools/types.mjs";
1
+ import { McpTool } from "./types.mjs";
2
2
  /**
3
3
  * A tool that runs code against a copy of the SDK.
4
4
  *
@@ -8,47 +8,5 @@ import { Metadata, ToolCallResult } from "./tools/types.mjs";
8
8
  *
9
9
  * @param endpoints - The endpoints to include in the list.
10
10
  */
11
- export declare function codeTool(): Promise<{
12
- metadata: Metadata;
13
- tool: {
14
- inputSchema: {
15
- [x: string]: unknown;
16
- type: "object";
17
- properties?: {
18
- [x: string]: object;
19
- } | undefined;
20
- required?: string[] | undefined;
21
- };
22
- name: string;
23
- description?: string | undefined;
24
- outputSchema?: {
25
- [x: string]: unknown;
26
- type: "object";
27
- properties?: {
28
- [x: string]: object;
29
- } | undefined;
30
- required?: string[] | undefined;
31
- } | undefined;
32
- annotations?: {
33
- title?: string | undefined;
34
- readOnlyHint?: boolean | undefined;
35
- destructiveHint?: boolean | undefined;
36
- idempotentHint?: boolean | undefined;
37
- openWorldHint?: boolean | undefined;
38
- } | undefined;
39
- execution?: {
40
- taskSupport?: "optional" | "required" | "forbidden" | undefined;
41
- } | undefined;
42
- _meta?: {
43
- [x: string]: unknown;
44
- } | undefined;
45
- icons?: {
46
- src: string;
47
- mimeType?: string | undefined;
48
- sizes?: string[] | undefined;
49
- }[] | undefined;
50
- title?: string | undefined;
51
- };
52
- handler: (_: unknown, args: any) => Promise<ToolCallResult>;
53
- }>;
11
+ export declare function codeTool(): McpTool;
54
12
  //# sourceMappingURL=code-tool.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool.d.mts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAE,cAAc,EAAuB;AAIxD;;;;;;;;GAQG;AACH,wBAAsB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQF,OAAO,QAAQ,GAAG,KAAG,OAAO,CAAC,cAAc,CAAC;GAmCvE"}
1
+ {"version":3,"file":"code-tool.d.mts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAEO,EAAE,OAAO,EAAiD;AAIjE;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CA8ClC"}
package/code-tool.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Metadata, ToolCallResult } from "./tools/types.js";
1
+ import { McpTool } from "./types.js";
2
2
  /**
3
3
  * A tool that runs code against a copy of the SDK.
4
4
  *
@@ -8,47 +8,5 @@ import { Metadata, ToolCallResult } from "./tools/types.js";
8
8
  *
9
9
  * @param endpoints - The endpoints to include in the list.
10
10
  */
11
- export declare function codeTool(): Promise<{
12
- metadata: Metadata;
13
- tool: {
14
- inputSchema: {
15
- [x: string]: unknown;
16
- type: "object";
17
- properties?: {
18
- [x: string]: object;
19
- } | undefined;
20
- required?: string[] | undefined;
21
- };
22
- name: string;
23
- description?: string | undefined;
24
- outputSchema?: {
25
- [x: string]: unknown;
26
- type: "object";
27
- properties?: {
28
- [x: string]: object;
29
- } | undefined;
30
- required?: string[] | undefined;
31
- } | undefined;
32
- annotations?: {
33
- title?: string | undefined;
34
- readOnlyHint?: boolean | undefined;
35
- destructiveHint?: boolean | undefined;
36
- idempotentHint?: boolean | undefined;
37
- openWorldHint?: boolean | undefined;
38
- } | undefined;
39
- execution?: {
40
- taskSupport?: "optional" | "required" | "forbidden" | undefined;
41
- } | undefined;
42
- _meta?: {
43
- [x: string]: unknown;
44
- } | undefined;
45
- icons?: {
46
- src: string;
47
- mimeType?: string | undefined;
48
- sizes?: string[] | undefined;
49
- }[] | undefined;
50
- title?: string | undefined;
51
- };
52
- handler: (_: unknown, args: any) => Promise<ToolCallResult>;
53
- }>;
11
+ export declare function codeTool(): McpTool;
54
12
  //# sourceMappingURL=code-tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool.d.ts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAE,cAAc,EAAuB;AAIxD;;;;;;;;GAQG;AACH,wBAAsB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQF,OAAO,QAAQ,GAAG,KAAG,OAAO,CAAC,cAAc,CAAC;GAmCvE"}
1
+ {"version":3,"file":"code-tool.d.ts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAEO,EAAE,OAAO,EAAiD;AAIjE;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CA8ClC"}
package/code-tool.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.codeTool = codeTool;
5
- const types_1 = require("./tools/types.js");
5
+ const types_1 = require("./types.js");
6
6
  const server_1 = require("./server.js");
7
7
  /**
8
8
  * A tool that runs code against a copy of the SDK.
@@ -13,7 +13,7 @@ const server_1 = require("./server.js");
13
13
  *
14
14
  * @param endpoints - The endpoints to include in the list.
15
15
  */
16
- async function codeTool() {
16
+ function codeTool() {
17
17
  const metadata = { resource: 'all', operation: 'write', tags: [] };
18
18
  const tool = {
19
19
  name: 'execute',
@@ -31,7 +31,10 @@ async function codeTool() {
31
31
  headers: {
32
32
  ...(stainlessAPIKey && { Authorization: stainlessAPIKey }),
33
33
  'Content-Type': 'application/json',
34
- client_envs: JSON.stringify({ BRAND_DEV_API_KEY: (0, server_1.readEnv)('BRAND_DEV_API_KEY') }),
34
+ client_envs: JSON.stringify({
35
+ BRAND_DEV_API_KEY: (0, server_1.readEnv)('BRAND_DEV_API_KEY'),
36
+ BRAND_DEV_BASE_URL: (0, server_1.readEnv)('BRAND_DEV_BASE_URL'),
37
+ }),
35
38
  },
36
39
  body: JSON.stringify({
37
40
  project_name: 'brand.dev',
package/code-tool.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool.js","sourceRoot":"","sources":["src/code-t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AAE,aAAa,EAAE,eAAe,EAAE,CAAC;gBAC1D,cAAc,EAAE,kBAAkB;gBAClC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC;oBAC1B,iBAAiB,EAAE,IAAA,gBAAO,EAAC,mBAAmB,CAAC;oBAC/C,kBAAkB,EAAE,IAAA,gBAAO,EAAC,oBAAoB,CAAC;iBAClD,CAAC;aACH;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACnB,YAAY,EAAE,WAAW;gBACzB,WAAW,EAAE,EAAE;gBACf,IAAI;aACL,CAAC;SACH,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CACb,GAAG,GAAG,CAAC,MAAM,KACX,GAAG,CAAC,UACN,4DAA4D,MAAM,GAAG,CAAC,IAAI,EAAE,EAAE,CAC/E,CAAC;QACJ,CAAC;QAED,OAAO,IAAA,2BAAmB,EAAC,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAkB,CAAC,CAAC;IAClE,CAAC,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC"}
package/code-tool.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { asTextContentResult } from "./tools/types.mjs";
2
+ import { asTextContentResult } from "./types.mjs";
3
3
  import { readEnv } from "./server.mjs";
4
4
  /**
5
5
  * A tool that runs code against a copy of the SDK.
@@ -10,7 +10,7 @@ import { readEnv } from "./server.mjs";
10
10
  *
11
11
  * @param endpoints - The endpoints to include in the list.
12
12
  */
13
- export async function codeTool() {
13
+ export function codeTool() {
14
14
  const metadata = { resource: 'all', operation: 'write', tags: [] };
15
15
  const tool = {
16
16
  name: 'execute',
@@ -28,7 +28,10 @@ export async function codeTool() {
28
28
  headers: {
29
29
  ...(stainlessAPIKey && { Authorization: stainlessAPIKey }),
30
30
  'Content-Type': 'application/json',
31
- client_envs: JSON.stringify({ BRAND_DEV_API_KEY: readEnv('BRAND_DEV_API_KEY') }),
31
+ client_envs: JSON.stringify({
32
+ BRAND_DEV_API_KEY: readEnv('BRAND_DEV_API_KEY'),
33
+ BRAND_DEV_BASE_URL: readEnv('BRAND_DEV_BASE_URL'),
34
+ }),
32
35
  },
33
36
  body: JSON.stringify({
34
37
  project_name: 'brand.dev',
package/code-tool.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool.mjs","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAA4B,mBAAmB,EAAE;OAEjD,EAAE,OAAO,EAAE;AAElB;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ;IAC5B,MAAM,QAAQ,GAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IAC7E,MAAM,IAAI,GAAS;QACjB,IAAI,EAAE,SAAS;QACf,WAAW,EACT,iiCAAiiC;QACniC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;KAC1E,CAAC;IACF,MAAM,OAAO,GAAG,KAAK,EAAE,CAAU,EAAE,IAAS,EAA2B,EAAE;QACvE,MAAM,IAAI,GAAG,IAAI,CAAC,IAAc,CAAC;QAEjC,sFAAsF;QACtF,sFAAsF;QACtF,MAAM,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;QACrD,MAAM,gBAAgB,GACpB,OAAO,CAAC,wBAAwB,CAAC,IAAI,4CAA4C,CAAC;QAEpF,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,gBAAgB,EAAE;YACxC,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,GAAG,CAAC,eAAe,IAAI,EAAE,aAAa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QACvE,MAAM,IAAI,GAAG,IAAI,CAAC,IAAc,CAAC;QAEjC,sFAAsF;QACtF,sFAAsF;QACtF,MAAM,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;QACrD,MAAM,gBAAgB,GACpB,OAAO,CAAC,wBAAwB,CAAC,IAAI,4CAA4C,CAAC;QAEpF,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,gBAAgB,EAAE;YACxC,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,GAAG,CAAC,eAAe,IAAI,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;gBAC1D,cAAc,EAAE,kBAAkB;gBAClC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC;oBAC1B,iBAAiB,EAAE,OAAO,CAAC,mBAAmB,CAAC;oBAC/C,kBAAkB,EAAE,OAAO,CAAC,oBAAoB,CAAC;iBAClD,CAAC;aACH;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACnB,YAAY,EAAE,WAAW;gBACzB,WAAW,EAAE,EAAE;gBACf,IAAI;aACL,CAAC;SACH,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CACb,GAAG,GAAG,CAAC,MAAM,KACX,GAAG,CAAC,UACN,4DAA4D,MAAM,GAAG,CAAC,IAAI,EAAE,EAAE,CAC/E,CAAC;QACJ,CAAC;QAED,OAAO,mBAAmB,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAkB,CAAC,CAAC;IAClE,CAAC,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC"}
@@ -1,8 +1,8 @@
1
- import { Metadata } from "./tools/types.mjs";
1
+ import { Metadata } from "./types.mjs";
2
2
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
3
3
  export declare const metadata: Metadata;
4
4
  export declare const tool: Tool;
5
- export declare const handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./tools/types").ToolCallResult>;
5
+ export declare const handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./types").ToolCallResult>;
6
6
  declare const _default: {
7
7
  metadata: Metadata;
8
8
  tool: {
@@ -44,7 +44,7 @@ declare const _default: {
44
44
  }[] | undefined;
45
45
  title?: string | undefined;
46
46
  };
47
- handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./tools/types").ToolCallResult>;
47
+ handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./types").ToolCallResult>;
48
48
  };
49
49
  export default _default;
50
50
  //# sourceMappingURL=docs-search-tool.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"docs-search-tool.d.mts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB;OAEjC,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA0BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,GAAG,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,oDAYlF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAZ+B,OAAO,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAcnF,wBAA2C"}
1
+ {"version":3,"file":"docs-search-tool.d.mts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB;OAEjC,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA0BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,GAAG,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,8CAYlF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAZ+B,OAAO,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAcnF,wBAA2C"}
@@ -1,8 +1,8 @@
1
- import { Metadata } from "./tools/types.js";
1
+ import { Metadata } from "./types.js";
2
2
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
3
3
  export declare const metadata: Metadata;
4
4
  export declare const tool: Tool;
5
- export declare const handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./tools/types").ToolCallResult>;
5
+ export declare const handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./types").ToolCallResult>;
6
6
  declare const _default: {
7
7
  metadata: Metadata;
8
8
  tool: {
@@ -44,7 +44,7 @@ declare const _default: {
44
44
  }[] | undefined;
45
45
  title?: string | undefined;
46
46
  };
47
- handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./tools/types").ToolCallResult>;
47
+ handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./types").ToolCallResult>;
48
48
  };
49
49
  export default _default;
50
50
  //# sourceMappingURL=docs-search-tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"docs-search-tool.d.ts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB;OAEjC,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA0BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,GAAG,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,oDAYlF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAZ+B,OAAO,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAcnF,wBAA2C"}
1
+ {"version":3,"file":"docs-search-tool.d.ts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB;OAEjC,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA0BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,GAAG,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,8CAYlF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAZ+B,OAAO,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAcnF,wBAA2C"}
@@ -2,7 +2,7 @@
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.handler = exports.tool = exports.metadata = void 0;
5
- const types_1 = require("./tools/types.js");
5
+ const types_1 = require("./types.js");
6
6
  exports.metadata = {
7
7
  resource: 'all',
8
8
  operation: 'read',
@@ -1 +1 @@
1
- {"version":3,"file":"docs-search-tool.js","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4CAA8D;AAIjD,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;CAClB,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,8EAA8E;IAC3F,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0BAA0B;aACxC;YACD,QAAQ,E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D,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,GAAG,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC,UAAU,yCAAyC,MAAM,MAAM,CAAC,IAAI,EAAE,EAAE,CACrG,CAAC;IACJ,CAAC;IAED,OAAO,IAAA,2BAAmB,EAAC,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;AAClD,CAAC,CAAC;AAZW,QAAA,OAAO,WAYlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { asTextContentResult } from "./tools/types.mjs";
2
+ import { asTextContentResult } from "./types.mjs";
3
3
  export const metadata = {
4
4
  resource: 'all',
5
5
  operation: 'read',
package/http.d.mts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.mts","sourceRoot":"","sources":["src/http.ts"],"names":[],"mappings":"OAKO,OAAO,MAAM,SAAS;OAEtB,EAAE,UAAU,EAAqB;OACjC,EAAE,aAAa,EAA+B;AAwFrD,eAAO,MAAM,iBAAiB,GAAI,gCAG/B;IACD,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,KAAG,OAAO,CAAC,OAUX,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAU,SAAS,UAAU,EAAE,MAAM,MAAM,GAAG,MAAM,GAAG,SAAS,kBAYtG,CAAC"}
1
+ {"version":3,"file":"http.d.mts","sourceRoot":"","sources":["src/http.ts"],"names":[],"mappings":"OAKO,OAAO,MAAM,SAAS;OACtB,EAAE,UAAU,EAAE;OACd,EAAE,aAAa,EAA+B;AAuErD,eAAO,MAAM,iBAAiB,GAAI,gCAG/B;IACD,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,KAAG,OAAO,CAAC,OAUX,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAU,SAAS,UAAU,EAAE,MAAM,MAAM,GAAG,MAAM,GAAG,SAAS,kBAYtG,CAAC"}
package/http.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["src/http.ts"],"names":[],"mappings":"OAKO,OAAO,MAAM,SAAS;OAEtB,EAAE,UAAU,EAAqB;OACjC,EAAE,aAAa,EAA+B;AAwFrD,eAAO,MAAM,iBAAiB,GAAI,gCAG/B;IACD,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,KAAG,OAAO,CAAC,OAUX,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAU,SAAS,UAAU,EAAE,MAAM,MAAM,GAAG,MAAM,GAAG,SAAS,kBAYtG,CAAC"}
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["src/http.ts"],"names":[],"mappings":"OAKO,OAAO,MAAM,SAAS;OACtB,EAAE,UAAU,EAAE;OACd,EAAE,aAAa,EAA+B;AAuErD,eAAO,MAAM,iBAAiB,GAAI,gCAG/B;IACD,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,KAAG,OAAO,CAAC,OAUX,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAU,SAAS,UAAU,EAAE,MAAM,MAAM,GAAG,MAAM,GAAG,SAAS,kBAYtG,CAAC"}
package/http.js CHANGED
@@ -7,26 +7,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.launchStreamableHTTPServer = exports.streamableHTTPApp = void 0;
8
8
  const streamableHttp_js_1 = require("@modelcontextprotocol/sdk/server/streamableHttp.js");
9
9
  const express_1 = __importDefault(require("express"));
10
- const v3_1 = require("zod-validation-error/v3");
11
- const options_1 = require("./options.js");
12
10
  const server_1 = require("./server.js");
13
11
  const headers_1 = require("./headers.js");
14
- const newServer = ({ clientOptions, mcpOptions: defaultMcpOptions, req, res, }) => {
12
+ const newServer = ({ clientOptions, req, res, }) => {
15
13
  const server = (0, server_1.newMcpServer)();
16
- let mcpOptions;
17
- try {
18
- mcpOptions = (0, options_1.parseQueryOptions)(defaultMcpOptions, req.query);
19
- }
20
- catch (error) {
21
- res.status(400).json({
22
- jsonrpc: '2.0',
23
- error: {
24
- code: -32000,
25
- message: `Invalid request: ${(0, v3_1.fromError)(error)}`,
26
- },
27
- });
28
- return null;
29
- }
30
14
  try {
31
15
  const authOptions = (0, headers_1.parseAuthHeaders)(req);
32
16
  (0, server_1.initMcpServer)({
@@ -35,7 +19,6 @@ const newServer = ({ clientOptions, mcpOptions: defaultMcpOptions, req, res, })
35
19
  ...clientOptions,
36
20
  ...authOptions,
37
21
  },
38
- mcpOptions,
39
22
  });
40
23
  }
41
24
  catch (error) {
package/http.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"http.js","sourceRoot":"","sources":["src/http.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;AAGtF,0FAAmG;AAEnG,sDAA8B;AAC9B,gDAAoD;AACpD,0CAA0D;AAC1D,wCAAsE;AACtE,0CAA6C;AAE7C,MAAM,SAAS,GAAG,CAAC,EACjB,aAAa,EACb,UAAU,EAAE,iBAAiB,EAC7B,GAAG,EACH,GAAG,GAMJ,EAAoB,EAAE;IACrB,MAAM,MAAM,GAAG,IAAA,qBAAY,GAAE,CAAC;IAE9B,IAAI,UAAsB,CAAC;IAC3B,IAAI,CAAC;QACH,UAAU,GAAG,IAAA,2BAAiB,EAAC,iBAAiB,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;IAC/D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;YACnB,OAAO,EAAE,KAAK;YACd,KAAK,EAAE;gBACL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,QAAA,0BAA0B,8BAYrC"}
package/http.mjs CHANGED
@@ -1,26 +1,10 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
3
3
  import express from 'express';
4
- import { fromError } from 'zod-validation-error/v3';
5
- import { parseQueryOptions } from "./options.mjs";
6
4
  import { initMcpServer, newMcpServer } from "./server.mjs";
7
5
  import { parseAuthHeaders } from "./headers.mjs";
8
- const newServer = ({ clientOptions, mcpOptions: defaultMcpOptions, req, res, }) => {
6
+ const newServer = ({ clientOptions, req, res, }) => {
9
7
  const server = newMcpServer();
10
- let mcpOptions;
11
- try {
12
- mcpOptions = parseQueryOptions(defaultMcpOptions, req.query);
13
- }
14
- catch (error) {
15
- res.status(400).json({
16
- jsonrpc: '2.0',
17
- error: {
18
- code: -32000,
19
- message: `Invalid request: ${fromError(error)}`,
20
- },
21
- });
22
- return null;
23
- }
24
8
  try {
25
9
  const authOptions = parseAuthHeaders(req);
26
10
  initMcpServer({
@@ -29,7 +13,6 @@ const newServer = ({ clientOptions, mcpOptions: defaultMcpOptions, req, res, })
29
13
  ...clientOptions,
30
14
  ...authOptions,
31
15
  },
32
- mcpOptions,
33
16
  });
34
17
  }
35
18
  catch (error) {
package/http.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"http.mjs","sourceRoot":"","sources":["src/http.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,6BAA6B,EAAE,MAAM,oDAAoD;OAE3F,OAAO,MAAM,SAAS;OACtB,EAAE,SAAS,EAAE,MAAM,yBAAyB;OAC5C,EAAc,iBAAiB,EAAE;OACjC,EAAiB,aAAa,EAAE,YAAY,EAAE;OAC9C,EAAE,gBAAgB,EAAE;AAE3B,MAAM,SAAS,GAAG,CAAC,EACjB,aAAa,EACb,UAAU,EAAE,iBAAiB,EAC7B,GAAG,EACH,GAAG,GAMJ,EAAoB,EAAE;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