You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* chore(internal): remove .eslintcache
* chore(jsdoc): fix @link annotations to refer only to parts of the package‘s public interface
* chore(internal): use npm pack for build uploads
* chore: extract some types in mcp docs
* fix(client): incorrect offset pagination check
* fix(mcpb): pin @anthropic-ai/mcpb version
* chore(internal): grammar fix (it's -> its)
* chore: use structured error when code execution tool errors
* chore: mcp code tool explicit error message when missing a run function
* feat(mcp): enable optional code execution tool on http mcp servers
* chore(mcp): add friendlier MCP code tool errors on incorrect method invocations
* chore(mcp): add line numbers to code tool errors
* docs(mcp): add a README button for one-click add to Cursor
* chore(internal): codegen related update
* docs(mcp): add a README link to add server to VS Code or Claude Code
* chore(internal): codegen related update
* chore(mcp): clarify http auth error
* feat(api): Improve MCP tool descriptions
* fix(mcp): use raw responses for binary content
* fix(mcp): return tool execution error on jq failure
* chore(mcp): upgrade jq-web
* feat(mcp): add detail field to docs search tool
* docs(api): updates to API spec
* chore(client): fix logger property type
* fix: Fix linting errors. (#238)
* release: 2.3.3-rc.1
---------
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: Sarah Deaton <sarah.deaton@writer.com>
***internal:** use npm pack for build uploads ([38c37a1](https://github.com/writer/writer-node/commit/38c37a1cfc2af919b9833344716ff5172a5076b3))
32
+
***jsdoc:** fix [@link](https://github.com/link) annotations to refer only to parts of the package‘s public interface ([d227de6](https://github.com/writer/writer-node/commit/d227de61034910da49481c6ff488436fcfed61fd))
33
+
* mcp code tool explicit error message when missing a run function ([16c1a44](https://github.com/writer/writer-node/commit/16c1a446e5f1cf853582afe76bbc21739855ca70))
* use structured error when code execution tool errors ([e140047](https://github.com/writer/writer-node/commit/e140047e470588b4c18bccbdb752078f198d8374))
39
+
40
+
41
+
### Documentation
42
+
43
+
***api:** updates to API spec ([69b36c9](https://github.com/writer/writer-node/commit/69b36c97a708452f05522c9b81f0855fea0daadb))
44
+
***mcp:** add a README button for one-click add to Cursor ([062b7d7](https://github.com/writer/writer-node/commit/062b7d73c91530ea083872b67036a77265db9a8d))
45
+
***mcp:** add a README link to add server to VS Code or Claude Code ([bb1991a](https://github.com/writer/writer-node/commit/bb1991af52bb810f9b69ec7d9d761d8b79aa6b15))
46
+
3
47
## 2.3.2 (2025-10-03)
4
48
5
49
Full Changelog: [v2.3.2-rc.2...v2.3.2](https://github.com/writer/writer-node/compare/v2.3.2-rc.2...v2.3.2)
Copy file name to clipboardExpand all lines: packages/mcp-server/README.md
+50-14Lines changed: 50 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,12 +34,36 @@ For clients with a configuration JSON, it might look something like this:
34
34
}
35
35
```
36
36
37
+
### Cursor
38
+
39
+
If you use Cursor, you can install the MCP server by using the button below. You will need to set your environment variables
40
+
in Cursor's `mcp.json`, which can be found in Cursor Settings > Tools & MCP > New MCP Server.
41
+
42
+
[](https://cursor.com/en-US/install-mcp?name=writer-sdk-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIndyaXRlci1zZGstbWNwIl0sImVudiI6eyJXUklURVJfQVBJX0tFWSI6IlNldCB5b3VyIFdSSVRFUl9BUElfS0VZIGhlcmUuIn19)
43
+
44
+
### VS Code
45
+
46
+
If you use MCP, you can install the MCP server by clicking the link below. You will need to set your environment variables
47
+
in VS Code's `mcp.json`, which can be found via Command Palette > MCP: Open User Configuration.
48
+
49
+
[Open VS Code](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22writer-sdk-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22writer-sdk-mcp%22%5D%2C%22env%22%3A%7B%22WRITER_API_KEY%22%3A%22Set%20your%20WRITER_API_KEY%20here.%22%7D%7D)
50
+
51
+
### Claude Code
52
+
53
+
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
54
+
environment variables in Claude Code's `.claude.json`, which can be found in your home directory.
There are two ways to expose endpoints as tools in the MCP server:
62
+
There are three ways to expose endpoints as tools in the MCP server:
40
63
41
64
1. Exposing one tool per endpoint, and filtering as necessary
42
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
43
67
44
68
### Filtering endpoints and tools
45
69
@@ -74,6 +98,18 @@ All of these command-line options can be repeated, combined together, and have c
74
98
75
99
Use `--list` to see the list of available tools, or see below.
76
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
+
77
113
### Specifying the MCP Client
78
114
79
115
Different clients have varying abilities to handle arbitrary tools and schemas.
@@ -207,8 +243,8 @@ The following tools are available in this MCP server.
207
243
### Resource `applications`:
208
244
209
245
-`retrieve_applications` (`read`): Retrieves detailed information for a specific no-code agent (formerly called no-code applications), including its configuration and current status.
210
-
-`list_applications` (`read`): Retrieves a paginated list of no-code agents (formerly called no-code applications) with optional filtering and sorting capabilities.
211
-
-`generate_content_applications` (`write`): Generate content from an existing no-code agent (formerly called no-code applications) with inputs.
246
+
-`list_applications` (`read`): Get all available no-code agents (applications) in your account. No-code agents are pre-configured AI workflows built in Writer's AI Studio. Use this to discover which agents are available before generating content from them.
247
+
-`generate_content_applications` (`write`): Generate content using a pre-configured no-code agent. No-code agents are custom AI workflows you've built in AI Studio with specific prompts, models, and settings. Provide the application ID and required inputs to get tailored content. Useful for consistent, repeatable AI tasks like content generation, data extraction, or custom workflows.
212
248
213
249
### Resource `applications.jobs`:
214
250
@@ -224,35 +260,35 @@ The following tools are available in this MCP server.
224
260
225
261
### Resource `chat`:
226
262
227
-
-`chat_chat` (`write`): Generate a chat completion based on the provided messages. The response shown below is for non-streaming. To learn about streaming responses, see the [chat completion guide](https://dev.writer.com/home/chat-completion).
263
+
-`chat_chat` (`write`): Generate AI responses for conversational interactions. Use this for chat-based tasks, Q&A, content generation, and any natural language processing. Supports tools like Knowledge Graphs, web search, translation, and vision. Choose from models like palmyra-x5, palmyra-x4, palmyra-creative, palmyra-med, or palmyra-fin depending on the task.
228
264
229
265
### Resource `completions`:
230
266
231
-
-`create_completions` (`write`): Generate text completions using the specified model and prompt. This endpoint is useful for text generation tasks that don't require conversational context.
267
+
-`create_completions` (`write`): Generate text completions from a single prompt without conversational context. Best for straightforward text generation tasks like article writing, summaries, or creative content. For interactive conversations or multi-turn dialogues, use generate-chat-completion instead.
232
268
233
269
### Resource `models`:
234
270
235
271
-`list_models` (`read`): Retrieve a list of available models that can be used for text generation, chat completions, and other AI tasks.
236
272
237
273
### Resource `graphs`:
238
274
239
-
-`create_graphs` (`write`): Create a new Knowledge Graph.
240
-
-`retrieve_graphs` (`read`): Retrieve a Knowledge Graph.
275
+
-`create_graphs` (`write`): Create a new Knowledge Graph to organize and query documents. Knowledge Graphs are containers for files that enable AI-powered search and question answering. After creation, add files to the graph using add-file-to-graph, then query it using query-knowledge-graph.
276
+
-`retrieve_graphs` (`read`): Get detailed information about a specific Knowledge Graph by its ID. Returns the graph name, description, creation date, file processing status, and associated URLs (for web-based graphs). Use this to check processing status or get graph metadata.
241
277
-`update_graphs` (`write`): Update the name and description of a Knowledge Graph.
242
-
-`list_graphs` (`read`): Retrieve a list of Knowledge Graphs.
278
+
-`list_graphs` (`read`): Get all available Knowledge Graphs in your account. Knowledge Graphs are collections of documents and files that can be queried using AI. Use this to discover which knowledge bases are available before querying them.
243
279
-`delete_graphs` (`write`): Delete a Knowledge Graph.
244
-
-`add_file_to_graph_graphs` (`write`): Add a file to a Knowledge Graph.
245
-
-`question_graphs` (`write`): Ask a question to specified Knowledge Graphs.
280
+
-`add_file_to_graph_graphs` (`write`): Add an uploaded file to a Knowledge Graph to make it queryable. The file must already be uploaded using upload-file. Once added, the file's content becomes searchable when querying the Knowledge Graph. Files are processed asynchronously - check status using get-file-info.
281
+
-`question_graphs` (`write`): Ask questions and get AI-generated answers based on your Knowledge Graph content. Queries your uploaded documents, PDFs, and files to retrieve accurate, source-cited information. Returns answers with supporting snippets and file references. Ideal for RAG (Retrieval-Augmented Generation) applications and knowledge base queries.
246
282
-`remove_file_from_graph_graphs` (`write`): Remove a file from a Knowledge Graph.
247
283
248
284
### Resource `files`:
249
285
250
-
-`retrieve_files` (`read`): Retrieve detailed information about a specific file, including its metadata, status, and associated graphs.
251
-
-`list_files` (`read`): Retrieve a paginated list of files with optional filtering by status, graph association, and file type.
286
+
-`retrieve_files` (`read`): Get metadata and status information for a specific file by its ID. Returns file name, creation date, processing status, and associated Knowledge Graph IDs. Use this to check if a file has finished processing or to find which Knowledge Graphs contain a specific file.
287
+
-`list_files` (`read`): Get a paginated list of all uploaded files. Filter by processing status (in_progress, completed, failed), Knowledge Graph association, or file type. Use this to discover available files, monitor processing status, or find files to add to Knowledge Graphs.
252
288
-`delete_files` (`write`): Permanently delete a file from the system. This action cannot be undone.
253
289
-`download_files` (`read`): Download the binary content of a file. The response will contain the file data in the appropriate MIME type.
254
290
-`retry_files` (`write`): Retry processing of files that previously failed to process. This will re-attempt the processing of the specified files.
255
-
-`upload_files` (`write`): Upload a new file to the system. Supports various file formats including PDF, DOC, DOCX, PPT, PPTX, JPG, PNG, EML, HTML, SRT, CSV, XLS, and XLSX.
291
+
-`upload_files` (`write`): Upload documents and files to Writer. Supports PDF, DOC, DOCX, PPT, PPTX, JPG, PNG, EML, HTML, SRT, CSV, XLS, XLSX, MP3, and MP4 formats. Once uploaded, files can be added to Knowledge Graphs for querying or used with Vision API for image analysis. Returns a file ID for subsequent operations.
256
292
257
293
### Resource `tools`:
258
294
@@ -271,4 +307,4 @@ The following tools are available in this MCP server.
271
307
272
308
### Resource `vision`:
273
309
274
-
-`analyze_vision` (`write`): Submit images and a prompt to generate an analysis of the images.
310
+
-`analyze_vision` (`write`): Submit images and documents with a prompt to generate an analysis. Supports JPG, PNG, PDF, and TXT files up to 7MB each.
0 commit comments