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
providers mcp update
Sushmithamallesh committed
Oct 12, 2025 at 21:17 UTC
6d0ba7d79eb2d1e97fd59c5d6af90342b268ec11
6 files changed
+229
-141
fern/pages/src/mcp/providers.mdx
+24
-141
@@ -1,151 +1,42 @@
1
---
2
-title: MCP providers
3
-subtitle: Using MCP servers with AI frameworks
2
+title: Provider integrations
3
+subtitle: Connect MCP servers to AI frameworks
4
---
5
6
-Connect your MCP servers to popular AI frameworks and agents.
6
+Integrate your MCP servers with popular AI SDKs and frameworks.
7
8
-## Anthropic (Claude)
8
+## Anthropic SDK
9
10
-Use MCP servers with Claude API and Claude Desktop.
10
+Use MCP servers with the Anthropic Claude API.
11
12
<CodeGroup>
13
<CodeGroupItem title="Python">
14
-```python
15
-# Python SDK - Anthropic integration coming soon
16
-# Use the standard MCP server URL generation for now
17
-instance = server.generate("user@example.com")
18
-print(f"MCP URL for Claude: {instance['url']}")
19
-```
14
+<SnippetCode src="fern/snippets/mcp/python/anthropic-provider.py" />
15
</CodeGroupItem>
16
<CodeGroupItem title="TypeScript">
22
-```typescript
23
-import Anthropic from '@anthropic-ai/sdk';
24
-
25
-const anthropic = new Anthropic({
26
- apiKey: process.env.ANTHROPIC_API_KEY,
27
-});
28
-
29
-// Get MCP server URL
30
-const serverUrls = await composio.mcp.getServer(
31
- server.id,
32
- "user@example.com"
33
-);
34
-
35
-// Use with Claude (when MCP support is available)
36
-const stream = await anthropic.beta.messages.stream({
37
- model: "claude-3-5-sonnet-20241022",
38
- mcp_servers: serverUrls,
39
- messages: [{
40
- role: "user",
41
- content: "Fetch my latest emails"
42
- }]
43
-});
44
-```
17
+<SnippetCode src="fern/snippets/mcp/typescript/anthropic-provider.ts" />
18
</CodeGroupItem>
19
</CodeGroup>
20
48
-## OpenAI
21
+## OpenAI SDK
22
23
Integrate MCP servers with OpenAI GPT models.
24
25
<CodeGroup>
26
<CodeGroupItem title="Python">
54
-```python
55
-from openai import OpenAI
56
-
57
-client = OpenAI()
58
-
59
-# Get MCP server instance
60
-instance = server.generate("user@example.com")
61
-
62
-# Use the MCP URL with OpenAI (hypothetical integration)
63
-# OpenAI MCP support details coming soon
64
-```
27
+<SnippetCode src="fern/snippets/mcp/python/openai-provider.py" />
28
</CodeGroupItem>
29
<CodeGroupItem title="TypeScript">
67
-```typescript
68
-import OpenAI from 'openai';
69
-
70
-const openai = new OpenAI({
71
- apiKey: process.env.OPENAI_API_KEY,
72
-});
73
-
74
-// Get MCP server URL
75
-const serverUrls = await composio.mcp.getServer(
76
- server.id,
77
- "user@example.com"
78
-);
79
-
80
-// Integration with OpenAI (when available)
81
-// Use serverUrls with OpenAI's MCP support
82
-```
30
+<SnippetCode src="fern/snippets/mcp/typescript/openai-provider.ts" />
31
</CodeGroupItem>
32
</CodeGroup>
33
86
-## Vercel AI SDK
87
-
88
-Use MCP servers with Vercel's AI SDK.
89
-
90
-```typescript
91
-import { experimental_createMCPClient as createMCPClient } from 'ai';
92
-import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js';
93
-
94
-// Get server URL
95
-const serverUrls = await composio.mcp.getServer(
96
- server.id,
97
- "user@example.com"
98
-);
99
-
100
-// Create MCP client
101
-const mcpClient = await createMCPClient({
102
- name: 'composio-mcp-client',
103
- transport: new SSEClientTransport(new URL(serverUrls.url)),
104
-});
105
-
106
-// Use with Vercel AI
107
-const tools = await mcpClient.tools();
108
-```
109
-
110
-## Cursor IDE
111
-
112
-Configure MCP servers in Cursor settings.
113
-
114
-```json
115
-{
116
- "mcpServers": {
117
- "composio": {
118
- "command": "npx",
119
- "args": [
120
- "-y",
121
- "@modelcontextprotocol/server-compose",
122
- "YOUR_MCP_SERVER_URL"
123
- ]
124
- }
125
- }
126
-}
127
-```
128
-
129
-## Claude Desktop
130
-
131
-Add to Claude Desktop configuration:
132
-
133
-**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
134
-**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
135
-
136
-```json
137
-{
138
- "mcpServers": {
139
- "composio-gmail": {
140
- "command": "node",
141
- "args": [
142
- "/path/to/mcp-server.js",
143
- "YOUR_MCP_SERVER_URL"
144
- ]
145
- }
146
- }
147
-}
148
-```
34
+## Mastra
35
+
36
+Use MCP servers with Mastra framework.
37
+
38
+<SnippetCode src="fern/snippets/mcp/typescript/mastra-provider.ts" />
39
+
40
41
## Quick integration guide
42
@@ -167,23 +58,15 @@ Add to Claude Desktop configuration:
58
</Step>
59
</Steps>
60
170
-## Supported clients
61
+## Supported frameworks
62
172
-- **Claude Desktop** - Native MCP support
173
-- **Cursor IDE** - Built-in MCP integration
174
-- **Vercel AI SDK** - Experimental MCP support
175
-- **Custom clients** - Any MCP-compatible client
63
+- **Anthropic SDK** - Claude API integration (coming soon)
64
+- **OpenAI SDK** - GPT models integration (coming soon)
65
+- **Mastra** - Framework with native MCP client support
66
+- **Custom integrations** - Any MCP-compatible SDK
67
68
## Next steps
69
179
-<Cards>
180
- <Card title="Quickstart" href="/docs/mcp-quickstart" icon="rocket">
181
- Get started with MCP servers
182
- </Card>
183
- <Card title="Implementation guide" href="/docs/mcp-implementation" icon="book">
184
- Complete development guide
185
- </Card>
186
- <Card title="Troubleshooting" href="/docs/troubleshooting/mcp" icon="wrench">
187
- Common issues and solutions
188
- </Card>
189
-</Cards>
\ No newline at end of file
70
+- [Quickstart](/docs/mcp-quickstart) - Get started with MCP servers
71
+- [Server management](/docs/mcp-server-management) - Manage your MCP servers
72
+- [Troubleshooting](/docs/troubleshooting/mcp) - Common issues and solutions
\ No newline at end of file
fern/snippets/mcp/python/anthropic-provider.py
new
+37
@@ -0,0 +1,37 @@
1
+from anthropic import Anthropic
2
+from composio import Composio
3
+
4
+# Initialize clients
5
+composio = Composio()
6
+anthropic = Anthropic(api_key="your-anthropic-api-key")
7
+
8
+# Create MCP server with GitHub and Linear tools
9
+server = composio.mcp.create(
10
+ name="dev-workflow-server",
11
+ toolkits=[
12
+ {"toolkit": "github", "auth_config": "ac_github_id"},
13
+ {"toolkit": "linear", "auth_config": "ac_linear_id"}
14
+ ],
15
+ allowed_tools=["GITHUB_LIST_PRS", "GITHUB_CREATE_COMMENT", "LINEAR_CREATE_ISSUE"]
16
+)
17
+
18
+# Generate MCP instance for user
19
+instance = server.generate("user@example.com")
20
+
21
+# Use MCP with Anthropic to manage development workflow
22
+response = anthropic.beta.messages.create(
23
+ model="claude-3-5-sonnet-20241022",
24
+ max_tokens=1000,
25
+ messages=[{
26
+ "role": "user",
27
+ "content": "Check my GitHub PRs for review comments, create Linear tasks for any requested changes, and update the PR descriptions with task links"
28
+ }],
29
+ mcp_servers=[{
30
+ "type": "url",
31
+ "url": instance['url'],
32
+ "name": "composio-mcp-server"
33
+ }],
34
+ betas=["mcp-client-2025-01-15"] # Enable MCP beta
35
+)
36
+
37
+print(response.content)
\ No newline at end of file
fern/snippets/mcp/python/openai-provider.py
new
+36
@@ -0,0 +1,36 @@
1
+from openai import OpenAI
2
+from composio import Composio
3
+
4
+# Initialize clients
5
+composio = Composio()
6
+openai = OpenAI(api_key="your-openai-api-key")
7
+
8
+# Create MCP server with Google Sheets and Notion tools
9
+server = composio.mcp.create(
10
+ name="data-docs-server",
11
+ toolkits=[
12
+ {"toolkit": "googlesheets", "auth_config": "ac_sheets_id"},
13
+ {"toolkit": "notion", "auth_config": "ac_notion_id"}
14
+ ],
15
+ allowed_tools=["GOOGLESHEETS_GET_DATA", "GOOGLESHEETS_UPDATE_DATA", "NOTION_CREATE_PAGE"]
16
+)
17
+
18
+# Generate MCP instance for user
19
+instance = server.generate("user@example.com")
20
+
21
+# Use MCP with OpenAI for data management
22
+response = openai.responses.create(
23
+ model="gpt-5",
24
+ tools=[
25
+ {
26
+ "type": "mcp",
27
+ "server_label": "composio-server",
28
+ "server_description": "Composio MCP server with Google Sheets and Notion integrations",
29
+ "server_url": instance['url'],
30
+ "require_approval": "never",
31
+ },
32
+ ],
33
+ input="Export the Q4 metrics from Google Sheets and create a comprehensive Notion page with charts and analysis",
34
+)
35
+
36
+print("OpenAI MCP Response:", response.output_text)
\ No newline at end of file
fern/snippets/mcp/typescript/anthropic-provider.ts
new
+40
@@ -0,0 +1,40 @@
1
+import Anthropic from '@anthropic-ai/sdk';
2
+import { Composio } from '@composio/core';
3
+
4
+// Initialize clients
5
+const composio = new Composio();
6
+const anthropic = new Anthropic({
7
+ apiKey: process.env.ANTHROPIC_API_KEY,
8
+});
9
+
10
+// Create MCP server with Google Sheets tools
11
+const server = await composio.mcp.create(
12
+ "analytics-server",
13
+ {
14
+ toolkits: [
15
+ { toolkit: "googlesheets", authConfigId: "ac_sheets_id" }
16
+ ],
17
+ allowedTools: ["GOOGLESHEETS_GET_DATA", "GOOGLESHEETS_UPDATE_DATA", "GOOGLESHEETS_CREATE_SHEET"]
18
+ }
19
+);
20
+
21
+// Generate MCP instance for user
22
+const instance = await server.generate("user@example.com");
23
+
24
+// Use MCP with Anthropic for spreadsheet operations
25
+const response = await anthropic.beta.messages.create({
26
+ model: "claude-3-5-sonnet-20241022",
27
+ max_tokens: 1000,
28
+ messages: [{
29
+ role: "user",
30
+ content: "Analyze the sales data in my Google Sheets 'Q4 Revenue' spreadsheet, calculate month-over-month growth, and add a new summary sheet with visualizations"
31
+ }],
32
+ mcp_servers: [{
33
+ type: "url",
34
+ url: instance.url,
35
+ name: "composio-mcp-server"
36
+ }],
37
+ betas: ["mcp-client-2025-01-15"] // Enable MCP beta
38
+});
39
+
40
+console.log(response.content);
\ No newline at end of file
fern/snippets/mcp/typescript/mastra-provider.ts
new
+52
@@ -0,0 +1,52 @@
1
+import { MCPClient } from "@mastra/mcp";
2
+import { openai } from "@ai-sdk/openai";
3
+import { Agent } from "@mastra/core/agent";
4
+import { Composio } from "@composio/core";
5
+
6
+// Initialize Composio
7
+const composio = new Composio();
8
+
9
+// Create MCP server with GitHub, Linear, and Notion tools
10
+const server = await composio.mcp.create(
11
+ "dev-automation-server",
12
+ {
13
+ toolkits: [
14
+ { toolkit: "github", authConfigId: "ac_github_id" },
15
+ { toolkit: "linear", authConfigId: "ac_linear_id" },
16
+ { toolkit: "notion", authConfigId: "ac_notion_id" }
17
+ ],
18
+ allowedTools: [
19
+ "GITHUB_LIST_ISSUES", "GITHUB_CREATE_ISSUE",
20
+ "LINEAR_CREATE_ISSUE", "LINEAR_UPDATE_ISSUE",
21
+ "NOTION_CREATE_PAGE", "NOTION_UPDATE_PAGE"
22
+ ]
23
+ }
24
+);
25
+
26
+// Generate MCP instance for user
27
+const instance = await server.generate("user@example.com");
28
+
29
+// Create MCP client with Composio server
30
+export const mcpClient = new MCPClient({
31
+ id: "composio-mcp-client",
32
+ servers: {
33
+ composio: { url: new URL(instance.url) },
34
+ }
35
+});
36
+
37
+// Create a development workflow agent
38
+export const devAgent = new Agent({
39
+ name: "Dev Assistant",
40
+ description: "AI assistant for development workflow automation",
41
+ instructions: "Help manage GitHub repos, Linear issues, and Notion documentation.",
42
+ model: openai("gpt-4-turbo"),
43
+ tools: await mcpClient.getTools()
44
+});
45
+
46
+// Example: Automate development workflow
47
+(async () => {
48
+ const response = await devAgent.generate(
49
+ "Review open GitHub issues, create Linear tasks for bugs labeled 'priority', and update the Notion roadmap page"
50
+ );
51
+ console.log(response.text);
52
+})();
\ No newline at end of file
fern/snippets/mcp/typescript/openai-provider.ts
new
+40
@@ -0,0 +1,40 @@
1
+import OpenAI from 'openai';
2
+import { Composio } from '@composio/core';
3
+
4
+// Initialize clients
5
+const composio = new Composio();
6
+const openai = new OpenAI({
7
+ apiKey: process.env.OPENAI_API_KEY,
8
+});
9
+
10
+// Create MCP server with Linear and Notion tools
11
+const server = await composio.mcp.create(
12
+ "project-docs-server",
13
+ {
14
+ toolkits: [
15
+ { toolkit: "linear", authConfigId: "ac_linear_id" },
16
+ { toolkit: "notion", authConfigId: "ac_notion_id" }
17
+ ],
18
+ allowedTools: ["LINEAR_LIST_ISSUES", "LINEAR_GET_ISSUE", "NOTION_CREATE_PAGE"]
19
+ }
20
+);
21
+
22
+// Generate MCP instance for user
23
+const instance = await server.generate("user@example.com");
24
+
25
+// Use MCP with OpenAI for project documentation
26
+const response = await openai.responses.create({
27
+ model: "gpt-5",
28
+ tools: [
29
+ {
30
+ type: "mcp",
31
+ server_label: "composio-server",
32
+ server_description: "Composio MCP server with Linear and Notion integrations",
33
+ server_url: instance.url,
34
+ require_approval: "never",
35
+ },
36
+ ],
37
+ input: "Find all completed Linear issues from this sprint and create a Notion page documenting the release notes",
38
+});
39
+
40
+console.log("OpenAI MCP Response:", response.output_text);
\ No newline at end of file