# How to integrate Mem0 MCP with Vercel AI SDK v6

```json
{
  "title": "How to integrate Mem0 MCP with Vercel AI SDK v6",
  "toolkit": "Mem0",
  "toolkit_slug": "mem0",
  "framework": "Vercel AI SDK",
  "framework_slug": "ai-sdk",
  "url": "https://composio.dev/toolkits/mem0/framework/ai-sdk",
  "markdown_url": "https://composio.dev/toolkits/mem0/framework/ai-sdk.md",
  "updated_at": "2026-05-12T10:18:40.534Z"
}
```

## Introduction

This guide walks you through connecting Mem0 to Vercel AI SDK v6 using the Composio tool router. By the end, you'll have a working Mem0 agent that can store meeting notes from today's call, export all project memories as csv, add new user to our team space through natural language commands.
This guide will help you understand how to give your Vercel AI SDK agent real control over a Mem0 account through Composio's Mem0 MCP server.
Before we dive in, let's take a quick look at the key ideas and tools involved.

## Also integrate Mem0 with

- [ChatGPT](https://composio.dev/toolkits/mem0/framework/chatgpt)
- [Antigravity](https://composio.dev/toolkits/mem0/framework/antigravity)
- [OpenAI Agents SDK](https://composio.dev/toolkits/mem0/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/mem0/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/mem0/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/mem0/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/mem0/framework/codex)
- [Cursor](https://composio.dev/toolkits/mem0/framework/cursor)
- [VS Code](https://composio.dev/toolkits/mem0/framework/vscode)
- [OpenCode](https://composio.dev/toolkits/mem0/framework/opencode)
- [OpenClaw](https://composio.dev/toolkits/mem0/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/mem0/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/mem0/framework/cli)
- [Google ADK](https://composio.dev/toolkits/mem0/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/mem0/framework/langchain)
- [Mastra AI](https://composio.dev/toolkits/mem0/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/mem0/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/mem0/framework/crew-ai)

## TL;DR

Here's what you'll learn:
- How to set up and configure a Vercel AI SDK agent with Mem0 integration
- Using Composio's Tool Router to dynamically load and access Mem0 tools
- Creating an MCP client connection using HTTP transport
- Building an interactive CLI chat interface with conversation history management
- Handling tool calls and results within the Vercel AI SDK framework

## What is Vercel AI SDK?

The Vercel AI SDK is a TypeScript library for building AI-powered applications. It provides tools for creating agents that can use external services and maintain conversation state.
Key features include:
- streamText: Core function for streaming responses with real-time tool support
- MCP Client: Built-in support for Model Context Protocol via @ai-sdk/mcp
- Step Counting: Control multi-step tool execution with stopWhen: stepCountIs()
- OpenAI Provider: Native integration with OpenAI models

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

The Mem0 MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Mem0 account. It provides structured and secure access to your notes, projects, and organizational knowledge, so your agent can perform actions like searching memories, managing users, adding content, and orchestrating agent runs on your behalf.
- AI-powered memory search and recall: Let your agent search and retrieve existing memory entries using advanced filters and pagination to surface just the right note or piece of information.
- Automated content and note creation: Have your agent store new memory records from conversations, meetings, or tasks—ensuring nothing slips through the cracks.
- Collaboration and organization management: Direct your agent to add members to projects or organizations, assign roles, and keep team structures up to date.
- Agent and application orchestration: Enable your agent to create new AI agents, initiate agent runs, and manage applications for custom workflows and automation.
- Structured knowledge export and reporting: Ask your agent to initiate export jobs with specific schemas and filters, so you can back up or analyze your stored knowledge on demand.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `MEM0_ADD_MEMBER_TO_PROJECT` | Add member to project | Adds an existing user to a project (identified by `project_id` within organization `org_id`), assigning a valid system role. |
| `MEM0_ADD_NEW_MEMORY_RECORDS` | Add new memory records | Stores new memory records from a list of messages, optionally inferring structured content; requires association via `agent_id`, `user_id`, `app_id`, or `run_id`. |
| `MEM0_ADD_ORGANIZATION_MEMBER` | Add organization member | Adds a new member, who must be a registered user, to an organization, assigning them a specific role. |
| `MEM0_CREATE_A_NEW_AGENT` | Create a new agent | Creates a new agent with a unique `agent_id` and an optional `name`; additional metadata may be assigned by the system. |
| `MEM0_CREATE_A_NEW_AGENT_RUN` | Create a new agent run | Creates a new agent run in the mem0.ai system. |
| `MEM0_CREATE_A_NEW_APPLICATION` | Create a new application | Creates a new application, allowing metadata to be passed in the request body (not an explicit field in this action's request model); ensure `app_id` is unique to avoid potential errors or unintended updates. |
| `MEM0_CREATE_A_NEW_ORGANIZATION_ENTRY` | Create a new organization entry | Creates a new organization entry using the provided name and returns its details. |
| `MEM0_CREATE_A_NEW_USER` | Create a new user | Creates a new user with the specified unique `user_id` and supports associating `metadata` (not part of the request schema fields). |
| `MEM0_CREATE_MEMORY_ENTRY` | Create memory entry | Lists/searches existing memory entries with filtering and pagination; critically, this action retrieves memories and does *not* create new ones, despite its name. |
| `MEM0_CREATE_PROJECT` | Create project | Creates a new project with a given name within an organization that must already exist. |
| `MEM0_CREATE_WEBHOOK` | Create webhook | Creates a new webhook for a specific project to receive real-time notifications. Use when you need to set up event-driven integrations that trigger on memory operations. |
| `MEM0_DELETE_AN_ORGANIZATION` | Delete an organization | Permanently deletes an existing organization identified by its unique ID. |
| `MEM0_DELETE_A_SPECIFIC_MEMORY_BY_ID` | Delete memory by id | Permanently deletes a specific memory by its unique ID; ensure the `memory_id` exists as this operation is irreversible. |
| `MEM0_DELETE_ENTITY_BY_TYPE_AND_ID` | Delete entity by type and id | Call to permanently and irreversibly hard-delete an existing entity (user, agent, app, or run) and all its associated data, using its type and ID. |
| `MEM0_DELETE_MEMORIES_ENDPOINT` | Delete memories | Deletes all memories matching specified filter criteria. IMPORTANT: At least one filter (agent_id, user_id, app_id, or run_id) must be provided to prevent accidental deletion of all memories. Requires delete permissions on the organization/project. |
| `MEM0_DELETE_MEMORY_BATCH_WITH_UUIDS` | Delete memory batch with uuids | Deletes a batch of up to 1000 existing memories, identified by their UUIDs, in a single API call. |
| `MEM0_DELETE_PROJECT` | Delete project | Permanently deletes a specific project and all its associated data from an organization; this action cannot be undone and requires the project to exist within the specified organization. |
| `MEM0_DELETE_PROJECT_MEMBER` | Delete project member | Removes an existing member, specified by email address, from a project, immediately revoking their project-specific access; the user is not removed from the organization. |
| `MEM0_DELETE_WEBHOOK` | Delete webhook | Deletes a webhook and stops receiving notifications for the specified webhook ID. Use this when you no longer need webhook notifications or want to remove a specific webhook configuration. |
| `MEM0_EXPORT_DATA_BASED_ON_FILTERS` | Export data based on filters | Creates a new memory export job with optional entity filters (user_id, agent_id, app_id, run_id). Returns export job ID and confirmation message. Requires org_id and project_id. Uses default schema for memory structure if not specified. |
| `MEM0_FETCH_DETAILED_LIST_OF_ORGANIZATIONS` | List organizations | Retrieves a summary list of organizations for administrative oversight; returns summary data (names, IDs), not exhaustive details, despite 'detailed' in the name. |
| `MEM0_FETCH_DETAILS_OF_A_SPECIFIC_ORGANIZATION` | Fetch details of a specific organization | Fetches comprehensive details for an organization using its `org_id`; the `org_id` must be valid and for an existing organization. |
| `MEM0_FETCH_LIST_OF_ENTITY_FILTERS` | Get list of entity filters | Retrieves predefined filter definitions for entities (e.g., by type, creation/modification date); returns definitions only, not filtered entity data. |
| `MEM0_FETCH_SPECIFIC_ENTITY_DETAILS_WITH_OPTIONAL_FILTERS` | Get entity by id | Fetches detailed information for an existing entity (user, agent, app, or run) identified by its type and unique ID. |
| `MEM0_GET_EVENT_STATUS_BY_EVENT_ID` | Get event status by event ID | Retrieves a single async event by ID to check its current status and results. Use this after operations that return event IDs (e.g., add_new_memory_records) to poll for completion before proceeding with dependent operations. |
| `MEM0_GET_MEMORIES_BY_ENTITY` | Get memories by entity | Tool to retrieve all memories associated with a specific entity (user, agent, app, or run). Use when you need to fetch memories for a known entity type and ID combination. |
| `MEM0_GET_MEMORY_EXPORT` | Get memory export | Retrieves the status and results of a memory export job by its ID. Use this after creating an export job to fetch the processed memory data. The response structure matches the schema defined during export creation. |
| `MEM0_GET_ORGANIZATION_MEMBERS` | Get organization members | Fetches a list of members for a specified, existing organization. |
| `MEM0_GET_PROJECT_DETAILS` | Get project details | Fetches comprehensive details for a specified project within an organization. |
| `MEM0_GET_PROJECT_MEMBERS` | Get project members | Retrieves all members for a specified project within an organization. |
| `MEM0_GET_PROJECTS` | Get projects | Retrieves all projects for a given organization `org_id` to which the caller has access. |
| `MEM0_GET_PROJECT_WEBHOOKS` | Get project webhooks | Retrieves all webhooks configured for a specific project. Use this to list webhook configurations including their event types, URLs, and active status. |
| `MEM0_GET_USER_MEMORY_STATS` | Get user memory stats | Retrieves a summary of the authenticated user's memory activity, including total memories created, search events, and add events. Note: This endpoint is undocumented in the official mem0 API specification but is functional. |
| `MEM0_LIST_ENTITIES_WITH_OPTIONAL_ORG_AND_PROJECT_FILTERS` | List entities | Retrieves a list of entities, optionally filtered by organization or project (prefer `org_id`/`project_id` over deprecated `org_name`/`project_name`), noting results may be summaries and subject to limits. |
| `MEM0_PERFORM_SEMANTIC_SEARCH_ON_MEMORIES` | Perform semantic search on memories | Searches memories semantically using a natural language query and metadata filters. IMPORTANT: - At least one of 'user_id', 'agent_id', or 'run_id' MUST be provided - A non-empty 'query' string is REQUIRED for semantic search - To retrieve memories without a search query, use 'retrieve_memory_list' action instead |
| `MEM0_REMOVE_A_MEMBER_FROM_THE_ORGANIZATION` | Remove a member from the organization | Removes a member, specified by their username, from an existing organization of which they are currently a member. |
| `MEM0_RETRIEVE_ALL_EVENTS_FOR_THE_CURRENTLY_LOGGED_IN_USER` | Retrieve all events for the currently logged in user | Retrieves a paginated list of events for the authenticated user, filterable and paginable via URL query parameters. This is a read-only operation that does not modify data. Supported Query Parameters (applied directly to the request URL): - `event_type` (str, optional): Filters events by their type (e.g., 'ADD', 'SEARCH'). - `start_date` (str, optional): Filters events on or after this date (format: YYYY-MM-DD). - `end_date` (str, optional): Filters events on or before this date (format: YYYY-MM-DD). - `page` (int, optional): Specifies the page number for paginated results. - `page_size` (int, optional): Number of events per page (default: 50, max: 100). |
| `MEM0_RETRIEVE_LIST_OF_MEMORY_EVENTS` | Retrieve list of memory events | Retrieves a chronological list of all memory events (e.g., user inputs, AI responses) from the Mem0 platform, providing interaction history and context for AI assistants. |
| `MEM0_RETRIEVE_MEMORY_BY_UNIQUE_IDENTIFIER` | Retrieve memory by id | Retrieves a complete memory entry by its unique identifier; `memory_id` must be valid and for an existing memory. |
| `MEM0_RETRIEVE_MEMORY_HISTORY_BY_ID` | Retrieve memory history by id | Retrieves the complete version history for an existing memory, using its unique `memory_id`, to inspect its evolution or audit changes. |
| `MEM0_RETRIEVE_MEMORY_LIST` | Retrieve memory list | Retrieves a list of memories, supporting pagination and diverse filtering (e.g., by IDs, metadata, keywords, date ranges); ensure dates are ISO 8601 and `page`/`page_size` (if used) are positive integers. REQUIRED: At least one of agent_id, user_id, app_id, or run_id must be provided. |
| `MEM0_SEARCH_MEMORIES_WITH_QUERY_FILTERS` | Search memories with filters | Semantically searches memories using structured filters with an optional natural language query. If query is omitted, defaults to '*' (wildcard) for filter-only searches. Offers options to rerank results, select specific fields, and adjust similarity threshold; any provided `org_id` or `project_id` must reference a valid existing entity. |
| `MEM0_UPDATE_MEMORY_BATCH_WITH_UUID` | Update memory batch with uuid | Updates text for up to 1000 memories in a single batch, using their UUIDs. |
| `MEM0_UPDATE_MEMORY_DETAILS_BY_ID` | Update memory text content | Updates the text content of an existing memory, identified by its `memory_id`. |
| `MEM0_UPDATE_ORGANIZATION_MEMBER_ROLE` | Update organization member role | Updates the role of an existing member to a new valid role within an existing organization. |
| `MEM0_UPDATE_PROJECT` | Update project | Updates a project by `project_id` within an `org_id`, modifying only provided fields (name, description, custom_instructions, custom_categories); list fields are fully replaced (cleared by `[]`), other omitted/null fields remain unchanged. |
| `MEM0_UPDATE_PROJECT_MEMBER_ROLE` | Update project member role | Updates the role of a specific member within a designated project, ensuring the new role is valid and recognized by the system. |

## Supported Triggers

None listed.

## Creating MCP Server - Stand-alone vs Composio SDK

The Mem0 MCP server is an implementation of the Model Context Protocol that connects your AI agent to Mem0. It provides structured and secure access so your agent can perform Mem0 operations on your behalf through a secure, permission-based interface.
With Composio's managed implementation, you don't have to create your own developer app. For production, if you're building an end product, we recommend using your own credentials. The managed server helps you prototype fast and go from 0-1 faster.

## Step-by-step Guide

### 1. Prerequisites

Before you begin, make sure you have:
- Node.js and npm installed
- A Composio account with API key
- An OpenAI API key

### 1. Getting API Keys for OpenAI and Composio

OpenAI API Key
- Go to the [OpenAI dashboard](https://platform.openai.com/settings/organization/api-keys) and create an API key. You'll need credits to use the models, or you can connect to another model provider.
- Keep the API key safe.
Composio API Key
- Log in to the [Composio dashboard](https://dashboard.composio.dev?utm_source=toolkits&utm_medium=framework_docs).
- Navigate to your API settings and generate a new API key.
- Store this key securely as you'll need it for authentication.

### 2. Install required dependencies

First, install the necessary packages for your project.
What you're installing:
- @ai-sdk/openai: Vercel AI SDK's OpenAI provider
- @ai-sdk/mcp: MCP client for Vercel AI SDK
- @composio/core: Composio SDK for tool integration
- ai: Core Vercel AI SDK
- dotenv: Environment variable management
```bash
npm install @ai-sdk/openai @ai-sdk/mcp @composio/core ai dotenv
```

### 3. Set up environment variables

Create a .env file in your project root.
What's needed:
- OPENAI_API_KEY: Your OpenAI API key for GPT model access
- COMPOSIO_API_KEY: Your Composio API key for tool access
- COMPOSIO_USER_ID: A unique identifier for the user session
```bash
OPENAI_API_KEY=your_openai_api_key_here
COMPOSIO_API_KEY=your_composio_api_key_here
COMPOSIO_USER_ID=your_user_id_here
```

### 4. Import required modules and validate environment

What's happening:
- We're importing all necessary libraries including Vercel AI SDK's OpenAI provider and Composio
- The dotenv/config import automatically loads environment variables
- The MCP client import enables connection to Composio's tool server
```typescript
import "dotenv/config";
import { openai } from "@ai-sdk/openai";
import { Composio } from "@composio/core";
import * as readline from "readline";
import { streamText, type ModelMessage, stepCountIs } from "ai";
import { createMCPClient } from "@ai-sdk/mcp";

const composioAPIKey = process.env.COMPOSIO_API_KEY;
const composioUserID = process.env.COMPOSIO_USER_ID;

if (!process.env.OPENAI_API_KEY) throw new Error("OPENAI_API_KEY is not set");
if (!composioAPIKey) throw new Error("COMPOSIO_API_KEY is not set");
if (!composioUserID) throw new Error("COMPOSIO_USER_ID is not set");

const composio = new Composio({
  apiKey: composioAPIKey,
});
```

### 5. Create Tool Router session and initialize MCP client

What's happening:
- We're creating a Tool Router session that gives your agent access to Mem0 tools
- The create method takes the user ID and specifies which toolkits should be available
- The returned mcp object contains the URL and authentication headers needed to connect to the MCP server
- This session provides access to all Mem0-related tools through the MCP protocol
```typescript
async function main() {
  // Create a tool router session for the user
  const session = await composio.create(composioUserID!, {
    toolkits: ["mem0"],
  });

  const mcpUrl = session.mcp.url;
```

### 6. Connect to MCP server and retrieve tools

What's happening:
- We're creating an MCP client that connects to our Composio Tool Router session via HTTP
- The mcp.url provides the endpoint, and mcp.headers contains authentication credentials
- The type: "http" is important - Composio requires HTTP transport
- tools() retrieves all available Mem0 tools that the agent can use
```typescript
const mcpClient = await createMCPClient({
  transport: {
    type: "http",
    url: mcpUrl,
    headers: session.mcp.headers, // Authentication headers for the Composio MCP server
  },
});

const tools = await mcpClient.tools();
```

### 7. Initialize conversation and CLI interface

What's happening:
- We initialize an empty messages array to maintain conversation history
- A readline interface is created to accept user input from the command line
- Instructions are displayed to guide the user on how to interact with the agent
```typescript
let messages: ModelMessage[] = [];

console.log("Chat started! Type 'exit' or 'quit' to end the conversation.\n");
console.log(
  "Ask any questions related to mem0, like summarize my last 5 emails, send an email, etc... :)))\n",
);

const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  prompt: "> ",
});

rl.prompt();
```

### 8. Handle user input and stream responses with real-time tool feedback

What's happening:
- We use streamText instead of generateText to stream responses in real-time
- toolChoice: "auto" allows the model to decide when to use Mem0 tools
- stopWhen: stepCountIs(10) allows up to 10 steps for complex multi-tool operations
- onStepFinish callback displays which tools are being used in real-time
- We iterate through the text stream to create a typewriter effect as the agent responds
- The complete response is added to conversation history to maintain context
- Errors are caught and displayed with helpful retry suggestions
```typescript
rl.on("line", async (userInput: string) => {
  const trimmedInput = userInput.trim();

  if (["exit", "quit", "bye"].includes(trimmedInput.toLowerCase())) {
    console.log("\nGoodbye!");
    rl.close();
    process.exit(0);
  }

  if (!trimmedInput) {
    rl.prompt();
    return;
  }

  messages.push({ role: "user", content: trimmedInput });
  console.log("\nAgent is thinking...\n");

  try {
    const stream = streamText({
      model: openai("gpt-5"),
      messages,
      tools,
      toolChoice: "auto",
      stopWhen: stepCountIs(10),
      onStepFinish: (step) => {
        for (const toolCall of step.toolCalls) {
          console.log(`[Using tool: ${toolCall.toolName}]`);
          }
          if (step.toolCalls.length > 0) {
            console.log(""); // Add space after tool calls
          }
        },
      });

      for await (const chunk of stream.textStream) {
        process.stdout.write(chunk);
      }

      console.log("\n\n---\n");

      // Get final result for message history
      const response = await stream.response;
      if (response?.messages?.length) {
        messages.push(...response.messages);
      }
    } catch (error) {
      console.error("\nAn error occurred while talking to the agent:");
      console.error(error);
      console.log(
        "\nYou can try again or restart the app if it keeps happening.\n",
      );
    } finally {
      rl.prompt();
    }
  });

  rl.on("close", async () => {
    await mcpClient.close();
    console.log("\n👋 Session ended.");
    process.exit(0);
  });
}

main().catch((err) => {
  console.error("Fatal error:", err);
  process.exit(1);
});
```

## Complete Code

```typescript
import "dotenv/config";
import { openai } from "@ai-sdk/openai";
import { Composio } from "@composio/core";
import * as readline from "readline";
import { streamText, type ModelMessage, stepCountIs } from "ai";
import { createMCPClient } from "@ai-sdk/mcp";

const composioAPIKey = process.env.COMPOSIO_API_KEY;
const composioUserID = process.env.COMPOSIO_USER_ID;

if (!process.env.OPENAI_API_KEY) throw new Error("OPENAI_API_KEY is not set");
if (!composioAPIKey) throw new Error("COMPOSIO_API_KEY is not set");
if (!composioUserID) throw new Error("COMPOSIO_USER_ID is not set");

const composio = new Composio({
  apiKey: composioAPIKey,
});

async function main() {
  // Create a tool router session for the user
  const session = await composio.create(composioUserID!, {
    toolkits: ["mem0"],
  });

  const mcpUrl = session.mcp.url;

  const mcpClient = await createMCPClient({
    transport: {
      type: "http",
      url: mcpUrl,
      headers: session.mcp.headers, // Authentication headers for the Composio MCP server
    },
  });

  const tools = await mcpClient.tools();

  let messages: ModelMessage[] = [];

  console.log("Chat started! Type 'exit' or 'quit' to end the conversation.\n");
  console.log(
    "Ask any questions related to mem0, like summarize my last 5 emails, send an email, etc... :)))\n",
  );

  const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout,
    prompt: "> ",
  });

  rl.prompt();

  rl.on("line", async (userInput: string) => {
    const trimmedInput = userInput.trim();

    if (["exit", "quit", "bye"].includes(trimmedInput.toLowerCase())) {
      console.log("\nGoodbye!");
      rl.close();
      process.exit(0);
    }

    if (!trimmedInput) {
      rl.prompt();
      return;
    }

    messages.push({ role: "user", content: trimmedInput });
    console.log("\nAgent is thinking...\n");

    try {
      const stream = streamText({
        model: openai("gpt-5"),
        messages,
        tools,
        toolChoice: "auto",
        stopWhen: stepCountIs(10),
        onStepFinish: (step) => {
          for (const toolCall of step.toolCalls) {
            console.log(`[Using tool: ${toolCall.toolName}]`);
          }
          if (step.toolCalls.length > 0) {
            console.log(""); // Add space after tool calls
          }
        },
      });

      for await (const chunk of stream.textStream) {
        process.stdout.write(chunk);
      }

      console.log("\n\n---\n");

      // Get final result for message history
      const response = await stream.response;
      if (response?.messages?.length) {
        messages.push(...response.messages);
      }
    } catch (error) {
      console.error("\nAn error occurred while talking to the agent:");
      console.error(error);
      console.log(
        "\nYou can try again or restart the app if it keeps happening.\n",
      );
    } finally {
      rl.prompt();
    }
  });

  rl.on("close", async () => {
    await mcpClient.close();
    console.log("\n👋 Session ended.");
    process.exit(0);
  });
}

main().catch((err) => {
  console.error("Fatal error:", err);
  process.exit(1);
});
```

## Conclusion

You've successfully built a Mem0 agent using the Vercel AI SDK with streaming capabilities! This implementation provides a powerful foundation for building AI applications with natural language interfaces and real-time feedback.
Key features of this implementation:
- Real-time streaming responses for a better user experience with typewriter effect
- Live tool execution feedback showing which tools are being used as the agent works
- Dynamic tool loading through Composio's Tool Router with secure authentication
- Multi-step tool execution with configurable step limits (up to 10 steps)
- Comprehensive error handling for robust agent execution
- Conversation history maintenance for context-aware responses
You can extend this further by adding custom error handling, implementing specific business logic, or integrating additional Composio toolkits to create multi-app workflows.

## How to build Mem0 MCP Agent with another framework

- [ChatGPT](https://composio.dev/toolkits/mem0/framework/chatgpt)
- [Antigravity](https://composio.dev/toolkits/mem0/framework/antigravity)
- [OpenAI Agents SDK](https://composio.dev/toolkits/mem0/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/mem0/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/mem0/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/mem0/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/mem0/framework/codex)
- [Cursor](https://composio.dev/toolkits/mem0/framework/cursor)
- [VS Code](https://composio.dev/toolkits/mem0/framework/vscode)
- [OpenCode](https://composio.dev/toolkits/mem0/framework/opencode)
- [OpenClaw](https://composio.dev/toolkits/mem0/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/mem0/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/mem0/framework/cli)
- [Google ADK](https://composio.dev/toolkits/mem0/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/mem0/framework/langchain)
- [Mastra AI](https://composio.dev/toolkits/mem0/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/mem0/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/mem0/framework/crew-ai)

## Related Toolkits

- [Google Sheets](https://composio.dev/toolkits/googlesheets) - Google Sheets is a cloud-based spreadsheet tool for real-time collaboration and data analysis. It lets teams work together from anywhere, updating information instantly.
- [Notion](https://composio.dev/toolkits/notion) - Notion is a collaborative workspace for notes, docs, wikis, and tasks. It streamlines team knowledge, project tracking, and workflow customization in one place.
- [Airtable](https://composio.dev/toolkits/airtable) - Airtable combines the flexibility of spreadsheets with the power of a database for easy project and data management. Teams use Airtable to organize, track, and collaborate with custom views and automations.
- [Asana](https://composio.dev/toolkits/asana) - Asana is a collaborative work management platform for teams to organize and track projects. It streamlines teamwork, boosts productivity, and keeps everyone aligned on goals.
- [Google Tasks](https://composio.dev/toolkits/googletasks) - Google Tasks is a to-do list and task management tool integrated into Gmail and Google Calendar. It helps you organize, track, and complete tasks across your Google ecosystem.
- [Linear](https://composio.dev/toolkits/linear) - Linear is a modern issue tracking and project planning tool for fast-moving teams. It helps streamline workflows, organize projects, and boost productivity.
- [Jira](https://composio.dev/toolkits/jira) - Jira is Atlassian’s platform for bug tracking, issue tracking, and agile project management. It helps teams organize work, prioritize tasks, and deliver projects efficiently.
- [Clickup](https://composio.dev/toolkits/clickup) - ClickUp is an all-in-one productivity platform for managing tasks, docs, goals, and team collaboration. It streamlines project workflows so teams can work smarter and stay organized in one place.
- [Monday](https://composio.dev/toolkits/monday) - Monday.com is a customizable work management platform for project planning and collaboration. It helps teams organize tasks, automate workflows, and track progress in real time.
- [Addressfinder](https://composio.dev/toolkits/addressfinder) - Addressfinder is a data quality platform for verifying addresses, emails, and phone numbers. It helps you ensure accurate customer and contact data every time.
- [Agiled](https://composio.dev/toolkits/agiled) - Agiled is an all-in-one business management platform for CRM, projects, and finance. It helps you streamline workflows, consolidate client data, and manage business processes in one place.
- [Ascora](https://composio.dev/toolkits/ascora) - Ascora is a cloud-based field service management platform for service businesses. It streamlines scheduling, invoicing, and customer operations in one place.
- [Basecamp](https://composio.dev/toolkits/basecamp) - Basecamp is a project management and team collaboration tool by 37signals. It helps teams organize tasks, share files, and communicate efficiently in one place.
- [Beeminder](https://composio.dev/toolkits/beeminder) - Beeminder is an online goal-tracking platform that uses monetary pledges to keep you motivated. Stay accountable and hit your targets with real financial incentives.
- [Boxhero](https://composio.dev/toolkits/boxhero) - Boxhero is a cloud-based inventory management platform for SMBs, offering real-time updates, barcode scanning, and team collaboration. It helps businesses streamline stock tracking and analytics for smarter inventory decisions.
- [Breathe HR](https://composio.dev/toolkits/breathehr) - Breathe HR is cloud-based HR software for SMEs to manage employee data, absences, and performance. It simplifies HR admin, making it easy to keep employee records accurate and up to date.
- [Breeze](https://composio.dev/toolkits/breeze) - Breeze is a project management platform designed to help teams plan, track, and collaborate on projects. It streamlines workflows and keeps everyone on the same page.
- [Bugherd](https://composio.dev/toolkits/bugherd) - Bugherd is a visual feedback and bug tracking tool for websites. It helps teams and clients report website issues directly on live sites for faster fixes.
- [Canny](https://composio.dev/toolkits/canny) - Canny is a platform for managing customer feedback and feature requests. It helps teams prioritize product decisions based on real user insights.
- [Chmeetings](https://composio.dev/toolkits/chmeetings) - Chmeetings is a church management platform for events, members, donations, and volunteers. It streamlines church operations and improves community engagement.

## Frequently Asked Questions

### What are the differences in Tool Router MCP and Mem0 MCP?

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

### Can I use Tool Router MCP with Vercel AI SDK v6?

Yes, you can. Vercel AI SDK v6 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 Mem0 tools.

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

Yes, absolutely. You can configure which Mem0 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 Mem0 data and credentials are handled as safely as possible.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
