Install and configure the MCP server
Set up your Writer API key
The MCP server requires your Writer API key as an environment variable. If you don’t have an API key, you can create one. Store your API key in a.env file with the name WRITER_API_KEY. For example:
The MCP server will show a fatal error if the
WRITER_API_KEY environment variable is missing or empty. Make sure to set this environment variable before running the MCP server.Install and run the MCP server
You can install and run the Writer MCP server usingnpx. Set the WRITER_API_KEY environment variable before running the MCP server.
The following command installs and runs the latest version of the Writer MCP server:
You can also install the MCP server globally and run it anytime.
Configure your MCP client
Add the Writer MCP server to your MCP client configuration, such asclaude_desktop_config.json for Claude Desktop or mcp.json for Cursor. For example, here’s how to configure the MCP server for Claude Desktop:
- Claude Desktop
- Cursor
Add to your
claude_desktop_config.json:claude_desktop_config.json
Interact with the MCP server in an AI client
After you’ve added your MCP server to your client configuration, you can interact with it by sending requests to the MCP server. Each client has a different way to interact with the MCP server. For conversational AI assistants like Claude Desktop and Cursor, you can interact with the MCP server by sending messages to the assistant. For example, to upload a file to Writer, you can send a message like “Upload this image to Writer” and the assistant can use the MCP server to accomplish the task.Build custom MCP clients
You can also create your own MCP client using any MCP-compatible package like Strands, LangChain, or other MCP libraries. The Writer MCP server follows the standard MCP protocol, so you can integrate it with any client that implements the protocol. The following example shows how to create a custom MCP client using the Strands SDK.Set up the Strands SDK
First, install the Strands SDK, the Writer dependency, and the Strands Agent Tools package:Create a custom MCP client
Next, create a custom MCP client that uses the Writer MCP server to respond to user requests. The example first creates anMCPClient using Strands Tools to connect to the Writer MCP server, then sets up the Writer model to be used by the agent for handling requests.
The writer_mcp_client.list_tools_sync() method retrieves the list of available tools from the Writer MCP server. The agent then uses these tools to respond to user requests related to content workflow automation.
content_workflow_client.py
Troubleshoot common issues
MCP server shows fatal error about missing API key: verify your API key is set correctly:Next steps
Now that you’ve set up the MCP server, you can use it to build complex workflows without writing custom integration code. Next, you can explore the following resources to help you get the most out of the MCP server:- Explore Writer’s API reference to understand all available endpoints
- Learn about tool calling for more advanced integrations
- Check out Knowledge Graphs for building intelligent content systems
- Review vision analysis for image processing workflows