How to integrate Wrike MCP with Claude Agent SDK

Trusted by
AWS
Glean
Zoom
Airtable

30 min · no commitment · see it on your stack

Wrike logo
Claude Agent SDK logo
divider

Introduction

This guide walks you through connecting Wrike to the Claude Agent SDK using the Composio tool router. By the end, you'll have a working Wrike agent that can create a new task in marketing folder, add multiple users to project group, invite a teammate to the workspace through natural language commands.

This guide will help you understand how to give your Claude Agent SDK agent real control over a Wrike account through Composio's Wrike MCP server.

Before we dive in, let's take a quick look at the key ideas and tools involved.

Also integrate Wrike with

TL;DR

Here's what you'll learn:
  • Get and set up your Claude/Anthropic and Composio API keys
  • Install the necessary dependencies
  • Initialize Composio and create a Tool Router session for Wrike
  • Configure an AI agent that can use Wrike as a tool
  • Run a live chat session where you can ask the agent to perform Wrike operations

What is Claude Agent SDK?

The Claude Agent SDK is Anthropic's official framework for building AI agents powered by Claude. It provides a streamlined interface for creating agents with MCP tool support and conversation management.

Key features include:

  • Native MCP Support: Built-in support for Model Context Protocol servers
  • Permission Modes: Control tool execution permissions
  • Streaming Responses: Real-time response streaming for interactive applications
  • Context Manager: Clean async context management for sessions

What is the Wrike MCP server, and what's possible with it?

The Wrike MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Wrike account. It provides structured and secure access to your project spaces, so your agent can perform actions like creating tasks, managing folders, handling group memberships, sending workspace invitations, and automating project workflows on your behalf.

  • Automated task creation and management: Let your agent quickly create new tasks in specific folders, assign details, and keep your projects moving forward without manual input.
  • Dynamic folder and project organization: Have your agent generate new folders or subfolders to structure work, or clean up by deleting old folders and their contents when projects wrap up.
  • Efficient user and group management: Easily add, remove, or modify group memberships and create new user groups to keep team permissions organized and up-to-date.
  • Seamless workspace invitations: Direct your agent to invite teammates or collaborators to your Wrike workspace via email, including customizing invitation details for better onboarding.
  • Custom field and data cleanup: Empower your agent to delete custom fields, tasks, or groups when they're no longer needed, helping you maintain a clean and efficient workspace.

Supported Tools & Triggers

Tools
Bulk modify group membersAdds or removes members for multiple Wrike groups in a single request; all specified user IDs must correspond to existing Wrike users.
Copy folderCopies a Wrike folder synchronously to a specified parent location with customizable options.
Copy folder asyncDuplicate a folder asynchronously in Wrike, creating a copy in a specified parent location.
Create account webhooksCreates a webhook for the current account to receive notifications about changes.
Create equipment assetTool to create equipment/asset in Wrike.
Create custom fieldTool to create a new custom field in Wrike.
Create a folderCreates a new Wrike subfolder within the specified `folderId`, optionally as a project if `customItemTypeId` is given; the folder is auto-shared with its creator.
Create folder bookingTool to create a booking in a Wrike folder.
Create approval in folderTool to create a new approval in a Wrike folder.
Create folder commentCreates a new comment on a specified Wrike folder.
Create timelog lock period for folderCreates a timelog lock period for a specific folder.
Create a webhook on folderTool to create a webhook for a Wrike folder or project.
Create a groupCreates a new user group in Wrike with a specified title, optionally setting members, parent group, avatar, and custom metadata.
Create invitationInvites a user to a Wrike workspace by email, optionally with name, specifying EITHER `userTypeId` OR a combination of `role`/`external`; custom email subject/message available for paid accounts.
Create space timelog lock periodTool to create a timelog lock period for a space to prevent time entries from being edited.
Create space webhookTool to create a webhook on a Wrike space for receiving notifications about changes to tasks, folders, and projects.
Create task in folderCreates a new task in a specified Wrike folder; if setting priority with `priorityBefore` or `priorityAfter`, the referenced task must be in the same folder or project.
Create task attachmentTool to upload a file attachment to a Wrike task.
Create task commentTool to create a new comment on a Wrike task.
Create task approvalTool to create an approval on a specific task in Wrike.
Create task dependencyTool to create a new dependency relationship between Wrike tasks.
Create task timelogTool to create a timelog entry for a specific task in Wrike.
Create timesheetTool to create a timesheet for a user for a specified time period.
Create workflowsTool to create a new custom workflow in Wrike.
Delete approvalCancels/deletes an approval by its identifier.
Delete assetPermanently deletes a Wrike asset/equipment by assetId.
Delete attachmentTool to permanently delete a Wrike attachment by its ID.
Delete bookingPermanently removes a resource booking allocation by its ID; use when deallocating resources from projects or tasks.
Delete commentPermanently deletes a Wrike comment by its ID; this action is irreversible and the comment must exist.
Delete custom field by idPermanently deletes a custom field by its ID; this action is irreversible and requires a valid, existing custom field ID.
Delete dependenciesPermanently removes a task dependency relationship by its ID; use when unlinking predecessor/successor task relationships.
Delete folderPermanently deletes the folder specified by `folderId` and all its contents (e.
Delete timelog lock period for folderDeletes a timelog lock period for a specific folder.
Delete group by idPermanently deletes a group by its `groupId`; this action is irreversible and does not affect user accounts that were members of the group.
Delete invitationPermanently deletes an existing invitation, specified by its unique `invitationId`; this action cannot be undone.
Delete job rolePermanently deletes a job role by its identifier; deleted job roles are removed from all tasks and users and cannot be restored.
Delete spacePermanently deletes a Wrike space and all its contents by spaceId; this action is irreversible and should be used with caution.
Delete spaces timelog lock periodTool to unlock (delete) a timelog lock period for a specific space in Wrike.
Delete taskPermanently deletes a Wrike task and all its associated data by its ID; this action is irreversible and the task must exist.
Delete timelogPermanently deletes a Wrike timelog entry by its ID; use when removing an incorrect or obsolete time log entry.
Delete webhookTool to permanently delete a webhook by webhook_id.
Fetch all tasksFetches tasks from a Wrike account, allowing filtering by status, due date, and subfolder inclusion, with customizable response fields and pagination.
Get account informationRetrieves detailed Wrike account information, where the response content is influenced by selected fields, account subscription, and user permissions.
Get all custom fieldsRetrieves all custom field definitions (including ID, name, type, and settings) from the Wrike account; this returns the definitions themselves, not their specific values on Wrike items, and is useful for obtaining custom field IDs.
Get all webhooksTool to retrieve a list of all webhooks created using the same API token.
Get approvalsTool to retrieve all approvals accessible to the authenticated user.
Get approvals by IDsTool to retrieve specific Wrike approvals by their IDs (up to 100).
Get async job statusTool to retrieve status and details for an asynchronous job in Wrike.
Get attachments by IDsTool to retrieve multiple Wrike attachments by their IDs (up to 100).
Download attachmentTool to download a Wrike attachment file.
Get attachment previewTool to download a preview version of a Wrike attachment.
Get attachment URLTool to get a public access URL for a Wrike attachment.
Get bookingsRetrieves one or more Wrike bookings by their IDs.
Get colorsTool to query the list of available colors in Wrike.
Get commentsTool to retrieve all comments accessible to the authorized user.
Get comments by IDsTool to retrieve multiple Wrike comments by their IDs.
Get contact hourly ratesTool to retrieve hourly budget rates for up to 100 Wrike contacts.
Get contactsRetrieves a list of Wrike contacts (e.
Get contacts historyTool to access field modification history for Wrike contacts.
Get contact timelogsTool to retrieve all timelog records created by a specific contact in Wrike.
Get custom item typesTool to retrieve all custom item types from Wrike.
Get dependencies by IDsTool to retrieve one or more Wrike dependencies by their IDs (up to 100).
Get folder bookingsTool to query bookings for a specific folder in Wrike.
Get foldersRetrieves folders and/or projects from Wrike, with filters; when using `nextPageToken`, all other filter parameters must match the initial request.
Get folder approvalsTool to retrieve all approvals from a specific Wrike folder.
Get folder attachmentsTool to retrieve all attachments from a specific Wrike folder.
Get folders by IDsTool to retrieve multiple Wrike folders by their IDs.
Get folder commentsTool to retrieve comments from a specific Wrike folder.
Get folders historyTool to access field modification history for Wrike folders.
Get folder hourly ratesTool to retrieve hourly budget rates for a specific Wrike folder.
Get folder rollupsTool to query rollup settings for items in a folder.
Get folder tasksQuery tasks within a specific folder.
Get folder timelog lock periodsTool to query timelog lock periods for a specific folder.
Get folders timelogsTool to retrieve all timelog records for a specific folder.
Convert legacy v2 IDs to v4Tool to convert legacy Wrike API v2 IDs to current v4 format.
Get specific contact informationRetrieves detailed information for a specific Wrike contact using their unique `contactId`, optionally including `metadata` and `customFields` if specified in the `fields` parameter.
Get job roles by IDsTool to retrieve details for one or more Wrike job roles by job role IDs.
Get placeholder hourly ratesTool to retrieve hourly budget rates for one or more Wrike placeholders.
Get placeholders by IDsTool to retrieve details for one or more Wrike placeholders by their IDs.
Get space by IDTool to retrieve details for a single Wrike space by spaceId.
Get space custom item typesTool to retrieve all custom item types scoped to a specific Wrike space.
Get space foldersTool to retrieve the folder tree for a specific Wrike space.
Get space custom fieldsTool to retrieve all custom fields defined for a specific Wrike space.
Get spaces tasksTool to query tasks within a specific Wrike space.
Get space workflowsTool to query workflows for a specific Wrike space.
Get space timelog lock periodsTool to query timelog lock periods for a specific space.
Get specific userRetrieves detailed information about a specific user in Wrike using their unique user ID.
Get task by idRetrieves read-only detailed information for a specific Wrike task by its unique ID, optionally allowing specification of fields to include in the response.
Get task dependenciesRetrieves all dependency relationships for a specific task.
Get task approvalsRetrieves all approval records for a specific task.
Get task attachmentsTool to retrieve all attachments from a specific Wrike task.
Get task commentsTool to retrieve all comments from a specific Wrike task.
Get tasks historyQuery task field modification history for up to 100 tasks.
Get task rollupsTool to query rollup settings for a specific task.
Get task timelog lock periodsTool to query timelog lock periods for a specific task.
Get task timelogsRetrieves all timelog records for a specific task.
Get timelog categoriesTool to query the list of timelog categories in Wrike.
Get timelogsRetrieves timelog records from Wrike with optional filters for dates, users, and task scope.
Get timelogs by IDsRetrieves detailed information for one or more Wrike timelogs by their unique IDs (up to 100), optionally including export and lock status.
Get timesheetsTool to query timesheets from Wrike.
Get timesheet submission rulesTool to retrieve global timesheet submission rules across all work schedules.
Get API versionTool to retrieve current Wrike API version information.
Get webhook by IDTool to retrieve details for a specific webhook by webhook_id.
Get work schedule timesheet rulesTool to retrieve timesheet submission rules for a specific work schedule.
Launch folder blueprint asyncAsynchronously launches a new project or folder structure in Wrike from a specified Folder Blueprint.
Launch Task Blueprint AsyncAsynchronously launches a Wrike Task Blueprint to create tasks/projects, requiring either `super_task_id` (parent task) or `parent_id` (parent folder/project) for placement.
List all attachmentsTool to retrieve all attachments from the Wrike account.
List Folder BlueprintsRetrieves all account-level Folder Blueprints, which are templates for standardizing folder/project creation with predefined structures, custom fields, and workflows.
List all placeholdersRetrieves all placeholders accessible to the authenticated user; placeholders are templates used in Wrike for creating standardized tasks or projects.
List space folder blueprintsLists all folder blueprints (templates for new folders/projects) within a specified Wrike space, requiring a valid and accessible space ID.
List spacesTool to list spaces the authorized user can access.
List space task blueprintsLists task blueprints (templates for creating tasks with consistent structures) available in a specific, accessible Wrike space.
List subfolders by folder idLists subfolders (metadata only, not their contents) for an existing Wrike folder specified by `folderId`, supporting recursive descent, filtering, and pagination.
List Task BlueprintsRetrieves a list of defined Task Blueprints (predefined task templates) from the Wrike account, supporting pagination.
Update account metadataUpdates or adds custom key-value metadata to the Wrike account, useful for integrations, storing app-specific data, or mapping external system identifiers.
Modify folder attributesModifies an existing Wrike folder: updates title, description, parents (not root/recycle bin), sharing, metadata, custom fields/columns; restores, converts to project, or manages access roles.
Modify groupUpdates an existing Wrike user group's attributes like title, members, parent, avatar, or metadata, using its `groupId` and specifying only the fields to change.
Modify taskModifies an existing Wrike task by its ID, allowing updates to attributes such as title, status, dates, assignees, and custom fields; `priorityBefore` and `priorityAfter` are mutually exclusive, and parent folder IDs for `addParents`/`removeParents` cannot be the Recycle Bin.
Retrieve custom field by idRetrieves a Wrike custom field's detailed information (e.
Query invitationsRetrieves all active invitations in Wrike, useful for viewing and auditing pending invitations or managing user onboarding.
Query job rolesTool to retrieve all available job roles in the Wrike account.
Get group by idRetrieves detailed information for a specific Wrike group using its `groupId`, optionally including 'metadata'.
Query workflowsFetches a list of all workflows with their detailed information from the Wrike account; this is a read-only action and does not support pagination or filtering through its parameters.
Retrieve list of groupsRetrieves a list of user groups from the Wrike account, supporting metadata filtering, pagination, and inclusion of specific fields; this is a read-only operation.
Search eDiscoveryTool to perform eDiscovery search across Wrike items (folders, projects, tasks).
Update approvalUpdates an existing Wrike approval by its ID, allowing modifications to the title, description, and due date.
Update assetTool to update a Wrike asset/equipment by ID.
Update attachmentTool to update a Wrike attachment by uploading new file content.
Update bookingUpdates a Wrike booking's date range by ID.
Update commentTool to update an existing Wrike comment.
Update custom field by idUpdates properties of an existing Wrike custom field by its ID, such as its title, type, scope, or sharing settings.
Update dependencyTool to modify an existing Wrike dependency relationship between tasks.
Update folder rollup settingsTool to update rollup settings for a folder.
Update invitationUpdates a pending Wrike invitation (`invitationId`) to resend it or change user's role/type (use EITHER `userTypeId` OR `role`/`external`).
Update job roleUpdates an existing Wrike job role by its ID, allowing modifications to the title and short title.
Update metadata on a specific contactUpdates metadata, job role, or custom fields for an existing Wrike contact specified by `contactId`; if `jobRoleId` is provided, it must be a valid ID.
Update a specific userUpdates specified profile attributes (e.
Update task rollup settingsUpdates rollup settings for a task.
Update timelog entryTool to modify an existing timelog entry in Wrike.
Update timesheet rowUpdates a Wrike timesheet row by its ID, allowing modification of the timelog category.
Update timesheetTool to update a timesheet's approval status in Wrike.
Update webhook stateTool to update the state of a Wrike webhook.
Update workflowTool to modify an existing Wrike workflow.
Update work schedule timesheet rulesTool to update timesheet submission rules for a work schedule.

What is the Composio tool router, and how does it fit here?

What is Composio SDK?

Composio's Composio SDK helps agents find the right tools for a task at runtime. You can plug in multiple toolkits (like Gmail, HubSpot, and GitHub), and the agent will identify the relevant app and action to complete multi-step workflows. This can reduce token usage and improve the reliability of tool calls. Read more here: Getting started with Composio SDK

The tool router generates a secure MCP URL that your agents can access to perform actions.

How the Composio SDK works

The Composio SDK follows a three-phase workflow:

  1. Discovery: Searches for tools matching your task and returns relevant toolkits with their details.
  2. Authentication: Checks for active connections. If missing, creates an auth config and returns a connection URL via Auth Link.
  3. Execution: Executes the action using the authenticated connection.

Step-by-step Guide

Prerequisites

Before starting, make sure you have:
  • Composio API Key and Claude/Anthropic API Key
  • Primary know-how of Claude Agents SDK
  • A Wrike account
  • Some knowledge of Python

Getting API Keys for Claude/Anthropic and Composio

Claude/Anthropic API Key
  • Go to the Anthropic Console and create an API key. You'll need credits to use the models.
  • Keep the API key safe.
Composio API Key
  • Log in to the Composio dashboard.
  • Navigate to your API settings and generate a new API key.
  • Store this key securely as you'll need it for authentication.

Install dependencies

pip install composio-anthropic claude-agent-sdk python-dotenv

Install the Composio SDK and the Claude Agents SDK.

What's happening:

  • composio-anthropic provides Composio integration for Anthropic
  • claude-agent-sdk is the core agent framework
  • python-dotenv loads environment variables

Set up environment variables

bash
COMPOSIO_API_KEY=your_composio_api_key_here
USER_ID=your_user_id_here
ANTHROPIC_API_KEY=your_anthropic_api_key_here

Create a .env file in your project root.

What's happening:

  • COMPOSIO_API_KEY authenticates with Composio
  • USER_ID identifies the user for session management
  • ANTHROPIC_API_KEY authenticates with Anthropic/Claude

Import dependencies

import asyncio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions
import os
from composio import Composio
from dotenv import load_dotenv

load_dotenv()
What's happening:
  • We're importing all necessary libraries including the Claude Agent SDK and Composio
  • The load_dotenv() function loads environment variables from your .env file
  • This setup prepares the foundation for connecting Claude with Wrike functionality

Create a Composio instance and Tool Router session

async def chat_with_remote_mcp():
    api_key = os.getenv("COMPOSIO_API_KEY")
    if not api_key:
        raise RuntimeError("COMPOSIO_API_KEY is not set")

    composio = Composio(api_key=api_key)

    # Create Tool Router session for Wrike
    mcp_server = composio.create(
        user_id=os.getenv("USER_ID"),
        toolkits=["wrike"]
    )

    url = mcp_server.mcp.url

    if not url:
        raise ValueError("Session URL not found")
What's happening:
  • The function checks for the required COMPOSIO_API_KEY environment variable
  • We're creating a Composio instance using our API key
  • The create method creates a Tool Router session for Wrike
  • The returned url is the MCP server URL that your agent will use

Configure Claude Agent with MCP

# Configure remote MCP server for Claude
options = ClaudeAgentOptions(
    permission_mode="bypassPermissions",
    mcp_servers={
        "composio": {
            "type": "http",
            "url": url,
            "headers": {
                "x-api-key": os.getenv("COMPOSIO_API_KEY")
            }
        }
    },
    system_prompt="You are a helpful assistant with access to Wrike tools via Composio.",
    max_turns=10
)
What's happening:
  • We're configuring the Claude Agent options with the MCP server URL
  • permission_mode="bypassPermissions" allows the agent to execute operations without asking for permission each time
  • The system prompt instructs the agent that it has access to Wrike
  • max_turns=10 limits the conversation length to prevent excessive API usage

Create client and start chat loop

# Create client with context manager
async with ClaudeSDKClient(options=options) as client:
    print("\nChat started. Type 'exit' or 'quit' to end.\n")

    # Main chat loop
    while True:
        user_input = input("You: ").strip()
        if user_input.lower() in {"exit", "quit"}:
            print("Goodbye!")
            break

        # Send query
        await client.query(user_input)

        # Receive and print response
        print("Claude: ", end="", flush=True)
        async for message in client.receive_response():
            if hasattr(message, "content"):
                for block in message.content:
                    if hasattr(block, "text"):
                        print(block.text, end="", flush=True)
        print()
What's happening:
  • The Claude SDK client is created using the async context manager pattern
  • The agent processes each query and streams the response back in real-time
  • The chat loop continues until the user types 'exit' or 'quit'

Run the application

if __name__ == "__main__":
    asyncio.run(chat_with_remote_mcp())
What's happening:
  • This entry point runs the async chat_with_remote_mcp() function using asyncio.run()
  • The application will start, create the MCP connection, and begin the interactive chat session

Complete Code

Here's the complete code to get you started with Wrike and Claude Agent SDK:

import asyncio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions
import os
from composio import Composio
from dotenv import load_dotenv

load_dotenv()

async def chat_with_remote_mcp():
    api_key = os.getenv("COMPOSIO_API_KEY")
    if not api_key:
        raise RuntimeError("COMPOSIO_API_KEY is not set")

    composio = Composio(api_key=api_key)

    # Create Tool Router session for Wrike
    mcp_server = composio.create(
        user_id=os.getenv("USER_ID"),
        toolkits=["wrike"]
    )

    url = mcp_server.mcp.url

    if not url:
        raise ValueError("Session URL not found")

    # Configure remote MCP server for Claude
    options = ClaudeAgentOptions(
        permission_mode="bypassPermissions",
        mcp_servers={
            "composio": {
                "type": "http",
                "url": url,
                "headers": {
                    "x-api-key": os.getenv("COMPOSIO_API_KEY")
                }
            }
        },
        system_prompt="You are a helpful assistant with access to Wrike tools via Composio.",
        max_turns=10
    )

    # Create client with context manager
    async with ClaudeSDKClient(options=options) as client:
        print("\nChat started. Type 'exit' or 'quit' to end.\n")

        # Main chat loop
        while True:
            user_input = input("You: ").strip()
            if user_input.lower() in {"exit", "quit"}:
                print("Goodbye!")
                break

            # Send query
            await client.query(user_input)

            # Receive and print response
            print("Claude: ", end="", flush=True)
            async for message in client.receive_response():
                if hasattr(message, "content"):
                    for block in message.content:
                        if hasattr(block, "text"):
                            print(block.text, end="", flush=True)
            print()

if __name__ == "__main__":
    asyncio.run(chat_with_remote_mcp())

Conclusion

You've successfully built a Claude Agent SDK agent that can interact with Wrike through Composio's Tool Router.

Key features:

  • Native MCP support through Claude's agent framework
  • Streaming responses for real-time interaction
  • Permission bypass for smooth automated workflows
You can extend this by adding more toolkits, implementing custom business logic, or building a web interface around the agent.

How to build Wrike MCP Agent with another framework

FAQ

What are the differences in Tool Router MCP and Wrike MCP?

With a standalone Wrike MCP server, the agents and LLMs can only access a fixed set of Wrike tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Wrike and many other apps based on the task at hand, all through a single MCP endpoint.

Can I use Tool Router MCP with Claude Agent SDK?

Yes, you can. Claude Agent SDK fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Wrike tools.

Can I manage the permissions and scopes for Wrike while using Tool Router?

Yes, absolutely. You can configure which Wrike scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

How safe is my data with Composio Tool Router?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Wrike data and credentials are handled as safely as possible.

Used by agents from

Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai

Never worry about agent reliability

We handle tool reliability, observability, and security so you never have to second-guess an agent action.