Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 22, 19:30 UTC
server management updates
Sushmithamallesh committed
Oct 12, 2025 at 20:59 UTC
e357a3322e89e5e4f03119b295e2dd05d7106886
1 file changed
+72
-48
fern/pages/src/mcp/server-management.mdx
+72
-48
@@ -26,11 +26,16 @@ print(f"Created server: {server.id}")
26
```typescript
27
const server = await composio.mcp.create(
28
"my-gmail-server",
29
- [{
30
- authConfigId: "ac_xyz123",
31
- allowedTools: ["GMAIL_FETCH_EMAILS", "GMAIL_SEND_EMAIL"]
32
- }],
33
- { isChatAuth: true }
29
+ {
30
+ toolkits: [
31
+ {
32
+ authConfigId: "ac_xyz123",
33
+ toolkit: "gmail"
34
+ }
35
+ ],
36
+ allowedTools: ["GMAIL_FETCH_EMAILS", "GMAIL_SEND_EMAIL"],
37
+ manuallyManageConnections: false
38
+ }
39
);
40
41
console.log(`Created server: ${server.id}`);
@@ -64,17 +69,28 @@ production_servers = composio.mcp.list(
69
<CodeGroupItem title="TypeScript">
70
```typescript
71
// List all servers
67
-const servers = await composio.mcp.list();
72
+const servers = await composio.mcp.list({
73
+ limit: 10,
74
+ page: 1,
75
+ authConfigs: [],
76
+ toolkits: []
77
+});
78
console.log(`Found ${servers.items.length} servers`);
79
80
// Filter by toolkit
81
const gmailServers = await composio.mcp.list({
72
- toolkits: ["gmail"],
73
- limit: 20
82
+ limit: 20,
83
+ page: 1,
84
+ authConfigs: [],
85
+ toolkits: ["gmail"]
86
});
87
88
// Filter by name
89
const productionServers = await composio.mcp.list({
90
+ limit: 10,
91
+ page: 1,
92
+ authConfigs: [],
93
+ toolkits: [],
94
name: "production"
95
});
96
```
@@ -97,9 +113,6 @@ print(f"Toolkits: {server.toolkits}")
113
// Get by ID
114
const server = await composio.mcp.get("mcp_server_id");
115
100
-// Get by name (TypeScript only)
101
-const namedServer = await composio.mcp.getByName("my-gmail-server");
102
-
116
console.log(`Server: ${server.name}`);
117
console.log(`Toolkits: ${server.toolkits}`);
118
```
@@ -124,14 +137,20 @@ updated = composio.mcp.update(
137
```typescript
138
const updated = await composio.mcp.update(
139
"mcp_server_id",
127
- "updated-name",
128
- [{
129
- toolkit: "gmail",
130
- authConfigId: "ac_new_config",
131
- allowedTools: ["GMAIL_FETCH_EMAILS", "GMAIL_SEARCH_EMAILS"]
132
- }],
133
- { isChatAuth: true }
140
+ {
141
+ name: "updated-name",
142
+ toolkits: [
143
+ {
144
+ toolkit: "gmail",
145
+ authConfigId: "ac_new_config"
146
+ }
147
+ ],
148
+ allowedTools: ["GMAIL_FETCH_EMAILS", "GMAIL_SEARCH_EMAILS"],
149
+ manuallyManageConnections: false
150
+ }
151
);
152
+
153
+console.log(updated);
154
```
155
</CodeGroupItem>
156
</CodeGroup>
@@ -182,21 +201,28 @@ server = composio.mcp.create(
201
```typescript
202
const server = await composio.mcp.create(
203
"productivity-suite",
185
- [
186
- {
187
- authConfigId: "ac_gmail",
188
- allowedTools: ["GMAIL_FETCH_EMAILS"]
189
- },
190
- {
191
- authConfigId: "ac_slack",
192
- allowedTools: ["SLACK_SEND_MESSAGE"]
193
- },
194
- {
195
- authConfigId: "ac_github",
196
- allowedTools: ["GITHUB_CREATE_ISSUE"]
197
- }
198
- ],
199
- { isChatAuth: true }
204
+ {
205
+ toolkits: [
206
+ {
207
+ authConfigId: "ac_gmail",
208
+ toolkit: "gmail"
209
+ },
210
+ {
211
+ authConfigId: "ac_slack",
212
+ toolkit: "slack"
213
+ },
214
+ {
215
+ authConfigId: "ac_github",
216
+ toolkit: "github"
217
+ }
218
+ ],
219
+ allowedTools: [
220
+ "GMAIL_FETCH_EMAILS",
221
+ "SLACK_SEND_MESSAGE",
222
+ "GITHUB_CREATE_ISSUE"
223
+ ],
224
+ manuallyManageConnections: false
225
+ }
226
);
227
```
228
</CodeGroupItem>
@@ -225,31 +251,29 @@ instance_manual = server.generate(
251
</CodeGroupItem>
252
<CodeGroupItem title="TypeScript">
253
```typescript
228
-// Generate URLs for user
229
-const urls = await composio.mcp.getServer(
230
- server.id,
231
- "user@example.com"
232
-);
233
-
234
-// Or use convenience method from create response
235
-const urls2 = await server.getServer({
236
- userId: "user@example.com"
237
-});
254
+// Generate instance for user
255
+const instance = await server.generate("user@example.com");
256
239
-console.log("URL:", urls);
257
+console.log("URL:", instance.url);
258
+console.log("Tools:", instance.allowedTools);
259
241
-// Note: URLs include include_composio_helper_actions=true when
242
-// isChatAuth is enabled, allowing agents to guide authentication
260
+// Chat-based authentication is enabled by default
261
+// Set manuallyManageConnections: true to disable it:
262
+const instanceManual = await composio.mcp.generate(
263
+ "user@example.com",
264
+ server.id,
265
+ { manuallyManageConnections: true }
266
+);
267
```
268
</CodeGroupItem>
269
</CodeGroup>
270
271
<Note>
272
**Chat-based authentication:**
249
-- **TypeScript**: Set `isChatAuth: true` during server creation to enable
273
+- **TypeScript**: Enabled by default (set `manuallyManageConnections=False` or omit it)
274
- **Python**: Enabled by default (set `manually_manage_connections=False` or omit it)
275
252
-When enabled, the agent can authenticate users dynamically during conversation if they're missing required connections.
276
+When enabled, the agent can authenticate users dynamically during conversation if they're missing required connections. Set `manuallyManageConnections=True` (TypeScript) or `manually_manage_connections=True` (Python) to disable it.
277
</Note>
278
279
## Best practices