# How to integrate Stack exchange MCP with Vercel AI SDK v6

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

## Introduction

This guide walks you through connecting Stack exchange to Vercel AI SDK v6 using the Composio tool router. By the end, you'll have a working Stack exchange agent that can find top-voted javascript questions this week, list all collectives on stack overflow, show recent comments on your math stackexchange post through natural language commands.
This guide will help you understand how to give your Vercel AI SDK agent real control over a Stack exchange account through Composio's Stack exchange MCP server.
Before we dive in, let's take a quick look at the key ideas and tools involved.

## Also integrate Stack exchange with

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

## TL;DR

Here's what you'll learn:
- How to set up and configure a Vercel AI SDK agent with Stack exchange integration
- Using Composio's Tool Router to dynamically load and access Stack exchange 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 Stack exchange MCP server, and what's possible with it?

The Stack exchange MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Stack Exchange account. It provides structured and secure access to your Stack Exchange activity, so your agent can perform actions like searching questions, exploring collectives, retrieving comments, and analyzing post revisions on your behalf.
- Powerful question search and discovery: Instantly ask your agent to search for Stack Exchange questions by keyword or tag, helping you find relevant discussions and solutions faster.
- Collectives and tags exploration: Have your agent retrieve lists of collectives and their associated tags, making it easy to discover expert communities and filter content by topic.
- Comment management and flagging: Let your agent fetch comments from specific sites and check valid flag options, streamlining comment moderation and participation.
- Revision history analysis: Direct your agent to retrieve and review the full edit history of posts, enabling transparent audits or understanding how answers evolve over time.
- Site discovery and navigation: Use your agent to list all available Stack Exchange sites and their API parameters, ensuring you always target the right community for your needs.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `STACK_EXCHANGE_CREATE_FILTER` | Create Filter | Tool to create a custom filter for Stack Exchange API responses. Use when you need to customize which fields are included/excluded in API responses to reduce payload size or include additional data not in the default filter. |
| `STACK_EXCHANGE_FIND_SIMILAR_QUESTIONS` | Find Similar Questions | Tool to find questions similar to a hypothetical one based on a title and optional tag combination. Use when you need to correlate external data with similar content within a Stack Exchange site, or to get suggestions similar to a site's related questions feature. |
| `STACK_EXCHANGE_GET_ACCESS_TOKENS` | Get Access Tokens | Tool to read the properties for a set of access tokens obtained via OAuth 2.0. Use when you need to verify token validity, check expiration dates, review granted scopes, or identify the account associated with tokens. |
| `STACK_EXCHANGE_GET_ANSWER_COMMENTS` | Get Answer Comments | Tool to retrieve comments on a set of answers from Stack Exchange. Use when you have answer IDs and need to fetch their associated comments. If you know you have a question ID instead, use the questions endpoint. If unsure whether you have an answer or question ID, use the posts endpoint. Supports filtering by date range, sorting by creation date or votes, and pagination. Returns comment metadata including body, score, owner details, and timestamps. |
| `STACK_EXCHANGE_GET_ANSWER_FLAG_OPTIONS` | Get Answer Flag Options | Tool to fetch valid flag options for a specific answer. Returns flags that the authenticated user can create for the answer. Available flags vary from post to post and user to user. Use when you need to know which flags a user can raise before submitting. |
| `STACK_EXCHANGE_GET_ANSWERS_BY_IDS` | Get Answers By IDs | Tool to retrieve a set of answers by their IDs from a Stack Exchange site. Use when you need to fetch specific answers by ID (up to 100 semicolon-delimited IDs). Supports filtering by date, sorting by activity/creation/votes, and pagination. |
| `STACK_EXCHANGE_GET_BADGE_RECIPIENTS_BY_IDS` | Get Badge Recipients By IDs | Tool to retrieve recently awarded badges constrained to a specific set of badge IDs. Use when you need to track who has received specific badges (up to 100 badge IDs) within an optional date range. |
| `STACK_EXCHANGE_GET_BADGES_BY_IDS` | Get Badges By IDs | Tool to retrieve badges by their IDs on a Stack Exchange site. Use when you need to get details about specific badges using semicolon-delimited badge IDs. |
| `STACK_EXCHANGE_GET_COLLECTIVE_ANSWERS` | Get Collective Answers | Tool to retrieve answers belonging to the specified collective(s) on a Stack Exchange site. Use when you need to find answers associated with a specific collective or multiple collectives. |
| `STACK_EXCHANGE_GET_COLLECTIVE_QUESTIONS` | Get Collective Questions | Tool to retrieve questions associated with the specified collective. Use when you have a collective ID and need its questions for a site. |
| `STACK_EXCHANGE_GET_COLLECTIVES` | Get Collectives | Tool to retrieve all collectives on a Stack Exchange site in alphabetical order. Use when you need to list collectives for display or filtering. |
| `STACK_EXCHANGE_GET_COLLECTIVES_BY_SLUGS` | Get Collectives By Slugs | Tool to retrieve Collective objects by their slugs from a Stack Exchange site. Use when you need to fetch specific collectives by their identifier slugs. |
| `STACK_EXCHANGE_GET_COLLECTIVE_TAGS` | Get Collective Tags | Retrieve tags associated with specified Stack Overflow collectives. Returns tag information including usage count, moderator status, and collective membership details. Use this when you need to discover what tags are used within specific collectives (e.g., 'aws', 'google-cloud'). Requires collective slugs (string identifiers) - obtain these first via the Get Collectives action. |
| `STACK_EXCHANGE_GET_COLLECTIVE_USERS` | Get Collective Users | Tool to retrieve users who are members of the specified Collectives on Stack Exchange. Use when you need to list members of a collective (e.g., google-cloud, azure) on a Stack Exchange site. |
| `STACK_EXCHANGE_GET_COMMENT_FLAG_OPTIONS` | Get Comment Flag Options | Tool to fetch valid flag options for a given comment. Use when you need to know which flags a user can raise before submitting. Requires authenticated access. |
| `STACK_EXCHANGE_GET_COMMENTS` | Get Comments | Retrieves comments from a Stack Exchange site (e.g., Stack Overflow, Super User, Server Fault). Returns recent comments with full metadata including comment body, score, creation date, owner details (reputation, profile, etc.), and reply information. Supports pagination, date filtering, and sorting by creation date or vote score. Use this when you need to browse recent activity, find comments by specific users, or analyze comment patterns on Stack Exchange sites. Monitor `quota_remaining` in responses; paginated requests can exhaust the daily API quota. |
| `STACK_EXCHANGE_GET_COMMENTS_BY_IDS` | Get Comments By IDs | Tool to retrieve specific comments by their IDs from a Stack Exchange site. Use when you have a cache of comment IDs obtained through other means (such as /questions/{id}/comments) but suspect the data may be stale. Accepts up to 100 semicolon-delimited comment IDs at once. Supports sorting by creation date or vote score, and filtering by date ranges. |
| `STACK_EXCHANGE_GET_EVENTS` | Get Events | Retrieves a stream of recent events that occurred on a Stack Exchange site. Events include posting questions, answers, comments, editing posts, and creating users. Events are only accessible for 15 minutes after they occurred, and by default only events in the last 5 minutes are returned. Use the 'since' parameter to specify older events within the 15-minute window. |
| `STACK_EXCHANGE_GET_FILTERS_BY_IDS` | Get Filters By IDs | Tool to retrieve the fields included by the given filters and the safeness of those filters. Use when you need to debug or understand what fields a filter includes before using it in other API calls. |
| `STACK_EXCHANGE_GET_LINKED_QUESTIONS` | Get Linked Questions | Tool to get questions which link to those questions identified in the ids parameter. Use when you need to find questions that reference or are related to specific question IDs by explicit hyperlinks within a single Stack Exchange site. |
| `STACK_EXCHANGE_GET_ME` | Get Me | Tool to retrieve the authenticated user's profile information from Stack Exchange. Use when you need details about the current user associated with the access token. |
| `STACK_EXCHANGE_GET_MY_ACHIEVEMENTS` | Get My Achievements | Retrieves the authenticated user's recent network-wide achievements across all Stack Exchange sites. Returns achievements including badges earned and reputation changes with metadata like site information, timestamps, and links. Supports pagination for browsing through achievement history. Use this when you need to view the user's recent activity and accomplishments across the Stack Exchange network. |
| `STACK_EXCHANGE_GET_MY_ASSOCIATED_ACCOUNTS` | Get My Associated Accounts | Tool to retrieve all Stack Exchange accounts associated with the authenticated user. Use when you need to discover which Stack Exchange sites the user participates in, along with their reputation, activity stats, and badges on each site. |
| `STACK_EXCHANGE_GET_MY_FEATURED_QUESTIONS` | Get My Featured Questions | Tool to retrieve questions with active bounties offered by the authenticated user. Use when you need to check which questions the user has placed bounties on. Requires authentication. |
| `STACK_EXCHANGE_GET_MY_MENTIONS` | Get My Mentions | Tool to retrieve comments mentioning the authenticated user on a Stack Exchange site. Use when you need to find where the user has been mentioned in comments, track discussions involving the user, or monitor user engagement. |
| `STACK_EXCHANGE_GET_MY_MERGE_HISTORY` | Get My Merge History | Tool to retrieve account merge history for the authenticated user. Returns records of merges involving the user's accounts. Use when you need to track account id changes, confirm if an account_id is new to your application, or understand which account ids were equivalent in the past. Account merges happen for various reasons and should not be assumed to have particular causes. |
| `STACK_EXCHANGE_GET_MY_NETWORK_ACTIVITY` | Get My Network Activity | Tool to retrieve a summary of the authenticated user's activity across the Stack Exchange network. Returns recent activity including questions posted, answers given, badges earned, and other user actions across all Stack Exchange sites. |
| `STACK_EXCHANGE_GET_MY_NO_ANSWER_QUESTIONS` | Get My No Answer Questions | Tool to retrieve questions owned by the authenticated user that have no answers. Use when you need to find unanswered questions asked by the current user on a Stack Exchange site. |
| `STACK_EXCHANGE_GET_MY_POSTS` | Get My Posts | Tool to retrieve posts (questions and answers) owned by the authenticated user from a Stack Exchange site. Use when you need to list the user's own content, review their posting history, or track their contributions to a specific Stack Exchange community. |
| `STACK_EXCHANGE_GET_MY_PRIVILEGES` | Get My Privileges | Tool to retrieve privileges for the authenticated user on a Stack Exchange site. Use when you need to check what permissions or capabilities the current user has earned based on their reputation. |
| `STACK_EXCHANGE_GET_MY_QUESTIONS` | Get My Questions | Tool to retrieve questions owned by the authenticated user on a Stack Exchange site. Use when you need to list the user's question history, check their recent questions, or analyze their contribution patterns. Requires authentication via access token. |
| `STACK_EXCHANGE_GET_MY_REPUTATION` | Get My Reputation | Tool to retrieve reputation changes for the authenticated user on a Stack Exchange site. Use when you need to track the user's reputation history, including gains and losses from votes, accepts, and other reputation-affecting actions. |
| `STACK_EXCHANGE_GET_MY_REPUTATION_HISTORY` | Get My Reputation History | Tool to retrieve the authenticated user's public reputation history on a Stack Exchange site. Returns a chronological list of reputation changes with details about what caused each change (upvotes, downvotes, accepted answers, etc.). Use when you need to track reputation gains and losses over time. |
| `STACK_EXCHANGE_GET_MY_SUGGESTED_EDITS` | Get My Suggested Edits | Tool to retrieve suggested edits submitted by the authenticated user on a Stack Exchange site. Use when you need to list the user's own suggested edits with filtering by date range, sort by creation/approval/rejection date, and paginate through results. |
| `STACK_EXCHANGE_GET_MY_TAG_PREFERENCES` | Get My Tag Preferences | Tool to retrieve tag preferences for the authenticated user on a Stack Exchange site. Returns the tags the user has marked as favorite or ignored. Use when you need to fetch the user's tag filter settings. |
| `STACK_EXCHANGE_GET_MY_TAGS` | Get My Tags | Tool to retrieve tags the authenticated user is active in on a Stack Exchange site. Use when you need to fetch the user's tag activity, filter by date, or sort by popularity/activity/name. |
| `STACK_EXCHANGE_GET_MY_TIMELINE` | Get My Timeline | Tool to retrieve a timeline of actions the authenticated user has taken on a Stack Exchange site. Use when you need to track user activity history, review their contributions chronologically, or monitor recent actions across questions, answers, comments, badges, and edits. |
| `STACK_EXCHANGE_GET_MY_TOP_ANSWERS_IN_TAGS` | Get My Top Answers In Tags | Tool to retrieve the top 30 answers the authenticated user has posted in response to questions with specific tags. Use when you need to fetch the user's best answers filtered by tags, sorted by activity, creation date, or votes. |
| `STACK_EXCHANGE_GET_MY_TOP_ANSWER_TAGS` | Get My Top Answer Tags | Tool to retrieve the authenticated user's top 30 tags by answer score on a Stack Exchange site. Use when you need to identify which tags the user is most active in or has the highest scoring answers. |
| `STACK_EXCHANGE_GET_MY_TOP_QUESTIONS_IN_TAGS` | Get My Top Questions In Tags | Tool to retrieve the top 30 questions the authenticated user has posted in response to questions with the given tags. Use when you need to find the user's most successful or highly-voted questions in specific topic areas. |
| `STACK_EXCHANGE_GET_MY_TOP_QUESTION_TAGS` | Get My Top Question Tags | Tool to retrieve the authenticated user's top 30 tags by question score on a Stack Exchange site. Use when you need to analyze which tags the user has the most expertise in based on their question activity. |
| `STACK_EXCHANGE_GET_MY_TOP_TAGS` | Get My Top Tags | Tool to retrieve the authenticated user's top 30 tags by combined question and answer score on a Stack Exchange site. Use when you need to discover the user's areas of expertise based on their participation in specific topics. |
| `STACK_EXCHANGE_GET_MY_UNACCEPTED_QUESTIONS` | Get My Unaccepted Questions | Tool to retrieve questions owned by the authenticated user that have no accepted answer. Use when you need to find the user's unresolved questions or track which questions still need an accepted answer. |
| `STACK_EXCHANGE_GET_MY_UNANSWERED_QUESTIONS` | Get My Unanswered Questions | Tool to retrieve questions owned by the authenticated user that are not considered answered. Use when you need to find the user's unanswered questions on a Stack Exchange site. |
| `STACK_EXCHANGE_GET_POST_COMMENTS` | Get Post Comments | Tool to retrieve comments on posts identified by IDs, regardless of post type (question or answer). Use when you have post IDs from users or other sources but are unsure of the specific post type. If you know the post is a question, use get_question_comments; if you know it's an answer, use get_answer_comments. This method handles both cases and accepts up to 100 semicolon-delimited post IDs. |
| `STACK_EXCHANGE_GET_POSTS_BY_IDS` | Get Posts By IDs | Tool to retrieve a set of posts by their IDs from a Stack Exchange site. Use when grabbing an object when unsure whether an ID identifies a question or an answer (commonly with user-entered data). Accepts up to 100 semicolon-delimited IDs. |
| `STACK_EXCHANGE_GET_POST_SUGGESTED_EDITS` | Get Post Suggested Edits | Tool to retrieve suggested edits on posts from a Stack Exchange site. Use when you need to fetch pending or historical suggested edits for specific posts by their IDs (up to 100 semicolon-delimited post IDs). Supports sorting by creation, approval, or rejection dates, and filtering by date ranges. |
| `STACK_EXCHANGE_GET_QUESTION_ANSWERS` | Get Question Answers | Tool to retrieve all answers for a set of questions identified by their IDs. Use when you have specific question IDs and need to fetch all answers for those questions (up to 100 semicolon-delimited question IDs). Most useful for polling for new or updated answers (with sort=activity). |
| `STACK_EXCHANGE_GET_QUESTION_CLOSE_OPTIONS` | Get Question Close Options | Tool to fetch flag options that make up close reasons for a specific question. Returns close options that the authenticated user can create for the question. Available flags vary from post to post and user to user. |
| `STACK_EXCHANGE_GET_QUESTION_COMMENTS` | Get Question Comments | Tool to retrieve comments on a set of questions from Stack Exchange. Use when you have question IDs and need to fetch their associated comments. If you know you have an answer ID instead, use the answers endpoint. If unsure whether you have an answer or question ID, use the posts endpoint. Supports filtering by date range, sorting by creation date or votes, and pagination. Returns comment metadata including body, score, owner details, and timestamps. |
| `STACK_EXCHANGE_GET_QUESTION_FLAG_OPTIONS` | Get Question Flag Options | Tool to fetch valid flag options, including close reasons, for a specific question. Returns flags that the authenticated user can create for the question. Available flags vary from post to post and user to user. |
| `STACK_EXCHANGE_GET_QUESTIONS` | Get Questions | Tool to retrieve a list of questions from a Stack Exchange site without requiring tags or keywords. Use when you need to list newest questions overall, most voted questions, or apply date filters across the entire site corpus. |
| `STACK_EXCHANGE_GET_QUESTIONS_BY_ANSWER_IDS` | Get Questions By Answer IDs | Tool to retrieve questions that specific answers belong to on a Stack Exchange site. Use when you have answer IDs and need to find the parent questions they were posted on. |
| `STACK_EXCHANGE_GET_QUESTIONS_BY_IDS` | Get Questions By IDs | Tool to retrieve a set of questions by their IDs from a Stack Exchange site. Use when you need to fetch specific questions by ID (up to 100 semicolon-delimited IDs) for fresh data or polling changes. Supports filtering by date, sorting by activity/creation/votes, and pagination. |
| `STACK_EXCHANGE_GET_QUESTION_TIMELINE` | Get Question Timeline | Tool to retrieve timeline events for specified questions on a Stack Exchange site. Use when you need to see the history of events (votes, comments, edits, etc.) that have happened to questions. Voting data is scrubbed to prevent voter identification. |
| `STACK_EXCHANGE_GET_RELATED_TAGS` | Get Related Tags | Tool to retrieve tags most related to the specified tags on a Stack Exchange site. Use when you need to find related or similar tags. Including multiple tags is equivalent to asking for 'tags related to tag #1 and tag #2' (AND logic, not OR). |
| `STACK_EXCHANGE_GET_REVISIONS_BY_IDS` | Get Revisions By IDs | Tool to retrieve revisions for specific posts by their IDs. Use when you need to examine the edit history of posts by providing semicolon-delimited IDs. |
| `STACK_EXCHANGE_GET_SEARCH_RESULTS` | Search Questions | Tool to search the site for questions meeting certain criteria. Use after defining tags or keywords to locate relevant questions. At least one of 'tagged' or 'intitle' must be set. Monitor `quota_remaining` in responses when paginating to avoid exhausting API quota. |
| `STACK_EXCHANGE_GET_SITE_INFO` | Get Site Info | Tool to retrieve comprehensive statistics and information about a Stack Exchange site. Returns data including site customization details, related sites, aggregate statistics (total questions, answers, users, votes), activity rates (questions/answers per minute), and metadata. Use this to discover site-specific information, aggregate statistics, and configuration details. This data is heavily cached; query sparingly (ideally no more than once per hour). |
| `STACK_EXCHANGE_GET_SITES` | Get Sites | Retrieves a comprehensive list of all Stack Exchange network sites with detailed information including site names, URLs, styling, and api_site_parameter values needed for other API calls. Use this to discover available sites (Stack Overflow, Math, Gaming, etc.) and get their API identifiers before making site-specific queries. Responses include has_more field; increment page until has_more=false to retrieve all sites. |
| `STACK_EXCHANGE_GET_SUGGESTED_EDITS_BY_IDS` | Get Suggested Edits By IDs | Tool to retrieve suggested edits by their IDs from a Stack Exchange site. Use when you need to fetch specific suggested edits (up to 100 semicolon-delimited IDs). Supports filtering by date, sorting by creation/approval/rejection date, and pagination. |
| `STACK_EXCHANGE_GET_TAG_FAQ` | Get Tag FAQ | Tool to retrieve frequently asked questions for a set of tags on Stack Exchange. Use when you need to find the most common or important questions for specific tags (max 5 tags). |
| `STACK_EXCHANGE_GET_TAG_INFO` | Get Tag Info | Tool to retrieve tag objects representing specified tags on a Stack Exchange site. Use when you need to get detailed information about specific tags, including usage count, synonyms, and activity. |
| `STACK_EXCHANGE_GET_TAG_SYNONYMS` | Get Tag Synonyms | Tool to retrieve all synonyms that point to the specified tags on a Stack Exchange site. Use when you need to discover tag synonyms for specific tags (up to 20 per request). |
| `STACK_EXCHANGE_GET_TAG_TOP_ANSWERERS` | Get Tag Top Answerers | Tool to retrieve the top 30 answerers active in a single tag, of either all-time or the last 30 days. Use when you need to identify the most active or highest-scoring answerers for a specific tag on a Stack Exchange site. |
| `STACK_EXCHANGE_GET_TAG_TOP_ASKERS` | Get Tag Top Askers | Tool to retrieve the top askers active in a single tag. Use when you need to find the most active users who ask questions in a specific tag, either for all-time or the last 30 days. |
| `STACK_EXCHANGE_GET_TAG_WIKIS` | Get Tag Wikis | Tool to retrieve wiki content for specified tags on a Stack Exchange site. Use when you need detailed documentation about tags including body content, excerpts, and edit history. Note that not all tags have wikis. |
| `STACK_EXCHANGE_GET_USER_ANSWERS` | Get User Answers | Tool to retrieve answers posted by specific users on a Stack Exchange site. Use when you need to list answers from one or more users, analyze their contributions, or filter by date/score ranges. |
| `STACK_EXCHANGE_GET_USER_ASSOCIATED_ACCOUNTS` | Get User Associated Accounts | Tool to retrieve all Stack Exchange accounts associated with specified users by their account IDs. Use when you need to discover which Stack Exchange sites users participate in, along with their reputation, activity stats, and badges on each site. |
| `STACK_EXCHANGE_GET_USER_BADGES` | Get User Badges | Tool to retrieve badges earned by specified users on a Stack Exchange site. Use when you need to fetch badge collections for one or more users, optionally filtered by date or sorted by rank/name/type/award date. |
| `STACK_EXCHANGE_GET_USER_COMMENTS` | Get User Comments | Tool to retrieve comments posted by specified users on a Stack Exchange site. Use when you need to find all comments from specific users, analyze their comment activity, or track their contributions. Supports up to 100 semicolon-delimited user IDs at once. Can filter by date range, sort by creation date or votes, and paginate through results for users with many comments. |
| `STACK_EXCHANGE_GET_USER_COMMENTS_TO_USER` | Get User Comments To User | Tool to retrieve comments that specific users have posted in reply to a single user. Use when you need to extract conversations between users, especially over time or across multiple posts on Stack Exchange. |
| `STACK_EXCHANGE_GET_USER_FAVORITES` | Get User Favorites | Tool to retrieve the questions that users have favorited/bookmarked. Use when you need to view a user's favorite questions or analyze what questions users have bookmarked. |
| `STACK_EXCHANGE_GET_USER_FEATURED_QUESTIONS` | Get User Featured Questions | Tool to retrieve questions with active bounties offered by specified users. Use when you need to check which questions specific users have placed bounties on. |
| `STACK_EXCHANGE_GET_USER_FULL_REPUTATION_HISTORY` | Get User Full Reputation History | Tool to retrieve a user's full reputation history on a Stack Exchange site, including private events. Use when you need the complete reputation history with all event types. This method requires an access token with a scope containing "private_info". |
| `STACK_EXCHANGE_GET_USER_INBOX` | Get User Inbox | Tool to retrieve a user's inbox from Stack Exchange. Returns inbox items including comments, answers, questions, and chat messages directed at the specified user. Use when you need to check a specific user's notifications, mentions, or recent activity. Requires an access_token with 'read_inbox' scope. |
| `STACK_EXCHANGE_GET_USER_MENTIONS` | Get User Mentions | Tool to retrieve comments that mention specific users on a Stack Exchange site. Use when you need to find where specific users have been mentioned in comments. A comment only counts as a mention if it is "in reply to" a user, and a comment can only be in reply to a single user. |
| `STACK_EXCHANGE_GET_USER_MERGE_HISTORY` | Get User Merge History | Tool to retrieve account merge history for specified user account IDs across the Stack Exchange network. Returns records of merges involving the provided accounts. Use when you need to track account ID changes, map invalid account IDs to their current valid IDs, or confirm if an account_id is new to your application. This is a network-wide endpoint and does not require a 'site' parameter. |
| `STACK_EXCHANGE_GET_USER_NO_ANSWER_QUESTIONS` | Get User No Answer Questions | Tool to retrieve questions asked by specified users that have zero undeleted answers. Use when you need to find unanswered questions from specific users on a Stack Exchange site. These questions are completely disjoint from unanswered or unaccepted questions which have at least one answer. |
| `STACK_EXCHANGE_GET_USER_NOTIFICATIONS` | Get User Notifications | Tool to retrieve notifications for a specific Stack Exchange user by ID. Returns unread and read notifications including comments, answers, badges, and other activity. Requires an access_token with 'read_inbox' scope. Use when you need to check another user's notification feed or monitor their activity. |
| `STACK_EXCHANGE_GET_USER_POSTS` | Get User Posts | Tool to retrieve posts (questions and answers) posted by specific users on a Stack Exchange site. Use when you need to list all posts from one or more users, analyze their contributions, or filter by date/score ranges. |
| `STACK_EXCHANGE_GET_USER_PRIVILEGES` | Get User Privileges | Tool to retrieve privileges a specific user has on a Stack Exchange site. Use when you need to check what permissions or capabilities a user has earned based on their reputation. Applications are encouraged to calculate privileges themselves by comparing results from /privileges with user.user_type. |
| `STACK_EXCHANGE_GET_USER_QUESTIONS` | Get User Questions | Tool to retrieve questions asked by specific users on a Stack Exchange site. Use when you need to analyze a user's question history, check their recent contributions, or compare question patterns across multiple users (up to 100 user IDs). |
| `STACK_EXCHANGE_GET_USER_REPUTATION` | Get User Reputation | Tool to retrieve reputation changes for users on a Stack Exchange site. Use when you need to track reputation history for specific users, including gains and losses from votes, accepts, and other reputation-affecting actions. Reputation changes are intentionally scrubbed to make it difficult to correlate votes on particular posts with user reputation changes. |
| `STACK_EXCHANGE_GET_USER_REPUTATION_HISTORY` | Get User Reputation History | Tool to retrieve public reputation history for specified Stack Exchange users. Use when you need to track reputation changes over time, understand how users gained or lost reputation, or audit reputation events. |
| `STACK_EXCHANGE_GET_USERS_BY_IDS` | Get Users By IDs | Tool to retrieve user profiles by their IDs from a Stack Exchange site. Use when you have obtained user IDs from other sources (e.g., /questions) and need detailed user information including reputation, badges, profile links, and activity statistics. |
| `STACK_EXCHANGE_GET_USER_SUGGESTED_EDITS` | Get User Suggested Edits | Tool to retrieve suggested edits submitted by specified users on a Stack Exchange site. Use when you need to fetch suggested edits from specific users (up to 100 semicolon-delimited user IDs) with filtering by date, sorting by creation/approval/rejection date, and pagination support. |
| `STACK_EXCHANGE_GET_USER_TAGS` | Get User Tags | Tool to retrieve tags that specified users are active in on a Stack Exchange site. Use when you need to fetch tag activity for specific user IDs, filter by date, or sort by popularity/activity/name. |
| `STACK_EXCHANGE_GET_USER_TIMELINE` | Get User Timeline | Tool to retrieve a timeline of actions taken by specified users on a Stack Exchange site. Returns users' posts, edits, and earned badges in chronological order. Use when tracking activity history for specific users or monitoring their contributions across questions, answers, comments, badges, and edits. |
| `STACK_EXCHANGE_GET_USER_TOP_ANSWERS_IN_TAGS` | Get User Top Answers In Tags | Tool to retrieve the top 30 answers a specific user has posted in response to questions with given tags. Use when you need to fetch a user's best answers filtered by tags (maximum 5 tags), sorted by activity, creation date, or votes. |
| `STACK_EXCHANGE_GET_USER_TOP_ANSWER_TAGS` | Get User Top Answer Tags | Tool to retrieve a single user's top tags by answer score on Stack Exchange. Use when you need to discover which topics a user is most active in answering. |
| `STACK_EXCHANGE_GET_USER_TOP_QUESTIONS_IN_TAGS` | Get User Top Questions In Tags | Tool to retrieve the top 30 questions a user has asked with the given tags. Use when you need to find a user's most successful or highly-voted questions in specific topic areas (limited to 5 tags maximum). |
| `STACK_EXCHANGE_GET_USER_TOP_QUESTION_TAGS` | Get User Top Question Tags | Tool to retrieve a single user's top tags by question score on a Stack Exchange site. Use when you need to analyze which tags a specific user has the most expertise in based on their question activity. |
| `STACK_EXCHANGE_GET_USER_TOP_TAGS` | Get User Top Tags | Tool to retrieve a single user's top tags by combined question and answer score on a Stack Exchange site. Use when you need to discover a specific user's areas of expertise based on their participation in topics. |
| `STACK_EXCHANGE_GET_USER_UNACCEPTED_QUESTIONS` | Get User Unaccepted Questions | Tool to retrieve questions asked by specified users that have at least one answer but no accepted answer. Use when you need to find unresolved questions from specific users or track which of their questions still need an accepted answer. |
| `STACK_EXCHANGE_GET_USER_UNANSWERED_QUESTIONS` | Get User Unanswered Questions | Tool to retrieve questions asked by specific users that the site considers unanswered. Use when you need to find a user's questions that lack upvoted or accepted answers. |
| `STACK_EXCHANGE_GET_USER_UNREAD_INBOX` | Get User Unread Inbox | Tool to retrieve unread items in a specific user's Stack Exchange inbox. Use when you need to check for new notifications, comments, answers, or other inbox activity for a particular user. This method requires an access token with the "read_inbox" scope. |
| `STACK_EXCHANGE_GET_USER_UNREAD_NOTIFICATIONS` | Get User Unread Notifications | Tool to retrieve unread notifications for a specific user on Stack Exchange. Use when you need to check unread activity notifications, badge awards, comment replies, or other alerts for a particular user. Requires an access_token with 'read_inbox' scope. |
| `STACK_EXCHANGE_LIST_ANSWERS` | List Answers | Tool to retrieve all undeleted answers from a Stack Exchange site. Use when you need to list recent answers, most voted answers, or apply date/score filters across the entire site. |
| `STACK_EXCHANGE_LIST_BADGE_RECIPIENTS` | List Badge Recipients | Tool to retrieve recently awarded badges from a Stack Exchange site. Use when you need to see recent badge activity, track specific badge awards, or analyze badge distribution over time. As these badges have been awarded, they will have the user property set. |
| `STACK_EXCHANGE_LIST_BADGES` | List Badges | Tool to retrieve all badges available in a Stack Exchange site. Use when you need to browse available badges, search for specific badges by name, or filter by rank (gold/silver/bronze) or type (named/tag-based). |
| `STACK_EXCHANGE_LIST_ELECTED_MODERATORS` | List Elected Moderators | Tool to retrieve users who have moderator powers and were actually elected on a Stack Exchange site. Use when you need to get the list of elected moderators, excluding Stack Exchange Inc. employees unless they were elected before employment. |
| `STACK_EXCHANGE_LIST_ERRORS` | List Errors | Tool to retrieve the various error codes that can be produced by the Stack Exchange API. Use when you need to discover, document, or test error handling, or to understand what error codes mean. |
| `STACK_EXCHANGE_LIST_FEATURED_QUESTIONS` | List Featured Questions | Tool to retrieve all questions with active bounties in the system. Use when you need to find questions with bounties, filter by tags, or sort by activity/creation/votes. |
| `STACK_EXCHANGE_LIST_MODERATOR_ONLY_TAGS` | List Moderator Only Tags | Tool to retrieve tags that only moderators can use on a Stack Exchange site. Use when you need to discover moderator-only tags, filter by name substring, or sort by popularity/activity/name. |
| `STACK_EXCHANGE_LIST_MODERATORS` | List Moderators | Tool to retrieve users who can exercise moderation powers on a Stack Exchange site. Use when you need to identify site moderators, including Stack Exchange employees granted moderation abilities. |
| `STACK_EXCHANGE_LIST_NAMED_BADGES` | List Named Badges | Tool to retrieve all explicitly named badges from a Stack Exchange site. Use when you need to discover available badges, filter badges by name, or rank badges by type (gold, silver, bronze). Named badges are general badges awarded site-wide, as opposed to tag-based badges. |
| `STACK_EXCHANGE_LIST_NO_ANSWER_QUESTIONS` | List No Answer Questions | Tool to retrieve questions that have received no answers from a Stack Exchange site. Use when you need to find unanswered questions across the site, optionally filtered by tags, dates, or score. |
| `STACK_EXCHANGE_LIST_POSTS` | List Posts | Tool to retrieve all posts (questions and answers) from a Stack Exchange site. Use when you need to list recent posts across all content types, most voted posts, or apply date/score filters across the entire site. This is the union of questions and answers, returning common fields for both. |
| `STACK_EXCHANGE_LIST_PRIVILEGES` | List Privileges | Tool to retrieve all earnable privileges on a Stack Exchange site. Use when you need to discover what abilities users can earn based on reputation, including the reputation thresholds required for each privilege. |
| `STACK_EXCHANGE_LIST_REQUIRED_TAGS` | List Required Tags | Tool to retrieve tags found on a site that fulfill required tag constraints on questions. Use when you need to discover which tags are required for certain question types on a Stack Exchange site. |
| `STACK_EXCHANGE_LIST_SUGGESTED_EDITS` | List Suggested Edits | Tool to retrieve all suggested edits in a Stack Exchange site. Use when you need to list all pending, approved, or rejected edit suggestions with filtering by date range, sort by creation/approval/rejection date, and paginate through results. |
| `STACK_EXCHANGE_LIST_TAG_BADGES` | List Tag Badges | Returns badges awarded for participation in specific tags on Stack Exchange sites. Use when you need to discover tag-specific badges (like language or topic badges), filter badges by rank (gold/silver/bronze), or search for badges by name. |
| `STACK_EXCHANGE_LIST_TAGS` | List Tags | Tool to retrieve tags found on a Stack Exchange site. Use when you need to browse available tags, search for tags by name substring, or filter by popularity, activity, or alphabetically. |
| `STACK_EXCHANGE_LIST_TAG_SYNONYMS` | List Tag Synonyms | Tool to retrieve all tag synonyms found on a Stack Exchange site. Use when you need to discover which tags are synonyms of other tags (e.g., 'js' -> 'javascript'). For synonyms of specific tags, prefer using the get tags by tags endpoint. |
| `STACK_EXCHANGE_LIST_UNANSWERED_QUESTIONS` | List Unanswered Questions | Tool to retrieve questions the site considers to be unanswered. Use when you need to find questions that lack upvoted answers. Note: a question must have at least one upvoted answer to be considered answered, so questions with only non-upvoted answers will appear in results. |
| `STACK_EXCHANGE_LIST_UNANSWERED_QUESTIONS_MY_TAGS` | List Unanswered Questions My Tags | Tool to retrieve unanswered questions within the authenticated user's favorite or frequented tags. Use when you need to find questions the site considers unanswered that match the user's tag interests. |
| `STACK_EXCHANGE_LIST_USERS` | List Users | Tool to retrieve all users on a Stack Exchange site. Use when you need to browse users on a site, search for users by name substring, or filter by reputation, creation date, or modification date with sorting options. |
| `STACK_EXCHANGE_RENDER_ANSWER` | Render Answer | Tool to render a preview of an answer given its body and the question it's on. Use when you need to see how an answer will look after markdown is converted to HTML without actually posting it to Stack Exchange. |
| `STACK_EXCHANGE_SEARCH_ADVANCED` | Advanced Search | Tool to search a Stack Exchange site for questions matching advanced criteria. Use when you need to search with complex filters like accepted answers, closed status, body text, title text, user filters, or view counts. Supports free-form text search and multiple tag filters. |
| `STACK_EXCHANGE_SEARCH_EXCERPTS` | Search Excerpts | Tool to search a Stack Exchange site for items matching given criteria with excerpt snippets. Use when you need search results with highlighted excerpts showing matching text from questions and answers. |

## Supported Triggers

None listed.

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

The Stack exchange MCP server is an implementation of the Model Context Protocol that connects your AI agent to Stack exchange. It provides structured and secure access so your agent can perform Stack exchange 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 Stack exchange 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 Stack exchange-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: ["stack_exchange"],
  });

  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 Stack exchange 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 stack_exchange, 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 Stack exchange 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: ["stack_exchange"],
  });

  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 stack_exchange, 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 Stack exchange 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 Stack exchange MCP Agent with another framework

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

## Related Toolkits

- [Gmail](https://composio.dev/toolkits/gmail) - Gmail is Google's email service with powerful spam protection, search, and G Suite integration. It keeps your inbox organized and makes communication fast and reliable.
- [Outlook](https://composio.dev/toolkits/outlook) - Outlook is Microsoft's email and calendaring platform for unified communications and scheduling. It helps users stay organized with powerful email, contacts, and calendar management.
- [Slack](https://composio.dev/toolkits/slack) - Slack is a channel-based messaging platform for teams and organizations. It helps people collaborate in real time, share files, and connect all their tools in one place.
- [Gong](https://composio.dev/toolkits/gong) - Gong is a platform for video meetings, call recording, and team collaboration. It helps teams capture conversations, analyze calls, and turn insights into action.
- [Microsoft teams](https://composio.dev/toolkits/microsoft_teams) - Microsoft Teams is a collaboration platform that combines chat, meetings, and file sharing within Microsoft 365. It keeps distributed teams connected and productive through seamless virtual communication.
- [Slackbot](https://composio.dev/toolkits/slackbot) - Slackbot is a conversational automation tool for Slack that handles reminders, notifications, and automated responses. It boosts team productivity by streamlining onboarding, answering FAQs, and managing timely alerts—all right inside Slack.
- [2chat](https://composio.dev/toolkits/_2chat) - 2chat is an API platform for WhatsApp and multichannel text messaging. It streamlines chat automation, group management, and real-time messaging for developers.
- [Agent mail](https://composio.dev/toolkits/agent_mail) - Agent mail provides AI agents with dedicated email inboxes for sending, receiving, and managing emails. It empowers agents to communicate autonomously with people, services, and other agents—no human intervention needed.
- [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.
- [Chatwork](https://composio.dev/toolkits/chatwork) - Chatwork is a team communication platform with group chats, file sharing, and task management. It helps businesses boost collaboration and streamline productivity.
- [Clickmeeting](https://composio.dev/toolkits/clickmeeting) - ClickMeeting is a cloud-based platform for running online meetings and webinars. It helps businesses and individuals host, manage, and engage virtual audiences with ease.
- [Confluence](https://composio.dev/toolkits/confluence) - Confluence is Atlassian's team collaboration and knowledge management platform. It helps your team organize, share, and update documents and project content in one secure workspace.
- [Dailybot](https://composio.dev/toolkits/dailybot) - DailyBot streamlines team collaboration with chat-based standups, reminders, and polls. It keeps work flowing smoothly in your favorite messaging platforms.
- [Dialmycalls](https://composio.dev/toolkits/dialmycalls) - Dialmycalls is a mass notification service for sending voice and text messages to contacts. It helps teams and organizations quickly broadcast urgent alerts and updates.
- [Dialpad](https://composio.dev/toolkits/dialpad) - Dialpad is a cloud-based business phone and contact center system for teams. It unifies voice, video, messaging, and meetings across your devices.
- [Discord](https://composio.dev/toolkits/discord) - Discord is a real-time messaging and VoIP platform for communities and teams. It lets users chat, share media, and collaborate across public and private channels.
- [Discordbot](https://composio.dev/toolkits/discordbot) - Discordbot is an automation tool for Discord servers that handles moderation, messaging, and user engagement. It helps communities run smoothly by automating routine and complex tasks.
- [Echtpost](https://composio.dev/toolkits/echtpost) - Echtpost is a secure digital communication platform for encrypted document and message exchange. It ensures confidential data stays private and protected during transmission.
- [Egnyte](https://composio.dev/toolkits/egnyte) - Egnyte is a cloud-based platform for secure file sharing, storage, and governance. It helps teams collaborate efficiently while maintaining data compliance and security.
- [Google Meet](https://composio.dev/toolkits/googlemeet) - Google Meet is a secure video conferencing platform for virtual meetings, chat, and screen sharing. It helps teams connect, collaborate, and communicate seamlessly from anywhere.

## Frequently Asked Questions

### What are the differences in Tool Router MCP and Stack exchange MCP?

With a standalone Stack exchange MCP server, the agents and LLMs can only access a fixed set of Stack exchange tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Stack exchange 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 Stack exchange tools.

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

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

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