|
1 | 1 | # Integration App MCP Server |
2 | | -<img width="1148" alt="Screenshot 2025-07-07 at 23 03 05" src="https://github.com/user-attachments/assets/39f6cc74-a689-4657-91f3-ee8358c05e31" /> |
3 | 2 |
|
| 3 | +<img width="1148" alt="Screenshot 2025-07-07 at 23 03 05" src="https://github.com/user-attachments/assets/39f6cc74-a689-4657-91f3-ee8358c05e31" /> |
4 | 4 |
|
5 | 5 | The Integration App MCP Server is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server, it provides actions for connected integrations on Integration.app membrane as tools. |
6 | 6 |
|
@@ -107,13 +107,15 @@ await client.connect( |
107 | 107 | ); |
108 | 108 | ``` |
109 | 109 |
|
110 | | -### ⚡ Static & Dynamic Mode |
| 110 | +### ⚡ Static vs Dynamic Mode |
| 111 | + |
| 112 | +By default, the MCP server runs in **static mode**, which means it returns **all available tools** (actions) for all connected integrations. |
111 | 113 |
|
112 | | -By default, the MCP server is in `static` mode and will return all tools. In `dynamic` mode (`?mode=dynamic`) the MCP server will only return only a single tool: `enable-tools`, you can use this tool to enable tools for the session. |
| 114 | +If you switch to **dynamic mode** (by adding `?mode=dynamic` to your request), the server will only return **one tool**: `enable-tools`. You can use this tool to selectively enable the tools you actually need for that session. |
113 | 115 |
|
114 | | -Your implementation needs to provide a way to find the most relevant tools to the user query, after which you can use the `enable-tools` tool to enable the tools for the session. Ideally you want to prompt LLM to call this tool |
| 116 | +In dynamic mode, your implementation should figure out which tools are most relevant to the user's query. Once you've identified them, prompt the LLM to call the `enable-tools` tool with the appropriate list. |
115 | 117 |
|
116 | | -See an example implementation in our [AI Agent Example](https://github.com/integration-app/ai-agent-example) |
| 118 | +Want to see how this works in practice? Check out our [AI Agent Example](https://github.com/integration-app/ai-agent-example). |
117 | 119 |
|
118 | 120 | ```ts |
119 | 121 | import { Client } from '@modelcontextprotocol/sdk/client/index.js'; |
@@ -151,6 +153,36 @@ In static mode, the MCP server fetches tools from all active connections associa |
151 | 153 |
|
152 | 154 | You can choose to only fetch tools for a specific integration by passing the `apps` query parameter: `/mcp?apps=google-calendar,google-docs` |
153 | 155 |
|
| 156 | +### 💬 Chat Session Management |
| 157 | + |
| 158 | +The MCP server supports persistent chat sessions. Include an `x-chat-id` header in your requests to automatically track sessions for that specific chat. |
| 159 | + |
| 160 | +**Starting a new chat session:** |
| 161 | + |
| 162 | +```http |
| 163 | +POST /mcp |
| 164 | +Authorization: Bearer YOUR_ACCESS_TOKEN |
| 165 | +x-chat-id: my-awesome-chat-123 |
| 166 | +``` |
| 167 | + |
| 168 | +**Retrieving your chat sessions:** |
| 169 | + |
| 170 | +```http |
| 171 | +GET /mcp/sessions |
| 172 | +Authorization: Bearer YOUR_ACCESS_TOKEN |
| 173 | +``` |
| 174 | + |
| 175 | +**Response:** |
| 176 | + |
| 177 | +```json |
| 178 | +{ |
| 179 | + "my-awesome-chat-123": "session-uuid-1", |
| 180 | + "another-chat-456": "session-uuid-2" |
| 181 | +} |
| 182 | +``` |
| 183 | + |
| 184 | +This feature lets you maintain conversation context across multiple requests without creating new sessions each time. Perfect for multi-chat applications! Check out our [AI Agent Example](https://github.com/integration-app/ai-agent-example) to see how this works in practice. |
| 185 | + |
154 | 186 | ### Configuring other MCP clients |
155 | 187 |
|
156 | 188 | #### 📝 Cursor |
|
0 commit comments