# Composio 串接

本指南將引導您完成從 Composio 獲取並設定 MCP (Model Context Protocol) 伺服器 URL 的步驟，以便您在 MaiAgent 的 AI 助理能夠利用 Composio 提供的 MCP Server 服務。

## ✅ 前提條件

* 您擁有一個 Composio 帳戶。
* 您希望將 Composio 的工具整合到 MaiAgent 的 AI 助理中使用。

## 🌐 步驟 1：訪問 Composio MCP 目錄

1. 開啟您的網頁瀏覽器，直接訪問連結進入 [**Composio MCP 工具目錄**](https://mcp.composio.dev/?_gl=1*1hz6rb*_ga*MTk3MzE0OTMzOC4xNzQ2MDk4NjI0*_ga_YKMWVQS9W0*czE3NDY5NTMzNzgkbzQkZzAkdDE3NDY5NTMzNzgkajYwJGwwJGgyMDc1NDkxNzYz*_ga_J9WD56TEBS*czE3NDY5NTMzNzgkbzQkZzAkdDE3NDY5NTMzNzgkajAkbDAkaDA.)：
   * 這個頁面展示了所有可以與您的 AI 代理人整合的 Composio 工具和應用程式。

<figure><img src="/files/0PKZqYpcZlRkLH6jr1c1" alt="Composio MCP 目錄頁面示意圖"><figcaption><p>Composio MCP 目錄展示了眾多可整合的應用程式與工具</p></figcaption></figure>

## 🔑 步驟 2：進行帳號登入

1. 在 Composio MCP 目錄頁面的右上角，找到並點擊 **"Sign in"** 按鈕。
2. 使用您的 Composio 帳號進行登入。
   * 如果您尚未擁有 Composio 帳號，必須先完成註冊程序。

<figure><img src="/files/dPu9Zd2pAsOSCuqRfUfD" alt="Composio MCP 登入按鈕位置"><figcaption><p>點擊頁面右上角的 "Sign in" 按鈕進行帳號登入</p></figcaption></figure>

3. 登入成功後，頁面將更新為個人化的 MCP Dashboard，顯示您可以使用的所有工具和應用程式。

<figure><img src="/files/7v6TrrvH8GTZ4qwktVWy" alt="Composio MCP 登入按鈕位置"><figcaption><p>Composio MCP Dashboard</p></figcaption></figure>

## 👆 步驟 3：選擇您需要的工具/應用程式

1. 在 **Composio MCP Dashboard**中，瀏覽或搜尋您希望 AI 代理人使用的工具或應用程式 (例如 Google Drive, Slack, Jira, GitHub 等)。

以 Google Calendar 為例：

<figure><img src="/files/0kAgKQq1TbczsYO0KqkX" alt=""><figcaption></figcaption></figure>

## 🔐 步驟 4：建立 Server，連接帳號

1. 找到工具後，需要先進行帳號連結授權才能啟用工具。

按下 「<mark style="color:blue;">+Create Server</mark>」

<figure><img src="/files/qE3EwaIiUOnbCpFtDPny" alt=""><figcaption></figcaption></figure>

2. 為 Server 命名，完成後點下「<mark style="color:blue;">Next</mark>」

<figure><img src="/files/rDJ3HTyqLE5f5w7tlkgZ" alt=""><figcaption></figcaption></figure>

3. 系統會彈出該服務的授權視窗，請您確認授予 Composio 訪問權限。

* 例如，如果是 Google 服務，您需要選擇要授權的 Google 帳號，並確認授權範圍。
* 這一步是必要的，因為 Composio 需要獲得您的授權才能代表您執行操作。

<figure><img src="/files/RMJXUQCSlze7OUfTtpG4" alt="Composio MCP 登入按鈕位置"><figcaption><p>服務授權頁面，根據自身服務提供的驗證方式選擇即可</p></figcaption></figure>

點選 **"Connect"** 授權完成後，您會被重定向回 Composio 平台

3. 選擇要授權使用的工具，點擊「<mark style="color:blue;">Create Server</mark>」 建立連線

* **重要提示**：Configure Actions 可以根據用戶實際會用到的功能進行選取，若沒有特別需求全選即可。

<figure><img src="/files/uCOg2SrRW8pYeHHOjyo0" alt=""><figcaption></figcaption></figure>

## 🔗 步驟 5：複製 MCP 伺服器 URL

1. Server 建置完成後，系統將為您生成一個專屬的 **MCP 伺服器**。

{% hint style="info" %}
請切換為 HTTP Stream，以支援 MaiAgent 服務
{% endhint %}

<figure><img src="/files/tg4bz1FNtcOZ0ThoWaNf" alt=""><figcaption></figcaption></figure>

2. 請複製這一段 HTTP 網址，進入 MaiAgent 頁面。

<figure><img src="/files/4xSPhHSEZ4LDzA04tddf" alt=""><figcaption></figcaption></figure>

## 💻 步驟 6：在 MaiAgent 建置 MCP 工具

1. 開啟 MaiAgent 工具頁面。
2. 新增一個 MCP 工具。
3. 填寫工具配置：
   * **基礎設定**: 根據使用者手冊[建立工具](https://docs.maiagent.ai/tools/setup)完成基礎設定，並且工具類型選擇 **MCP**。
   * **伺服器 URL**: 將您在步驟 5 中複製的 Composio **MCP 伺服器 URL** 貼到此處。
   * **參數 / 環境變數 / 允許的工具**: 這些欄位保持空白即可，保存工具設置的時候 MaiAgent 會自動跟 MCP Server 取得。
4. 儲存設定。

<figure><img src="/files/beNFOYzq9S0zQQPgqm2Y" alt=""><figcaption></figcaption></figure>

完成後可以點按「重新取得」

<figure><img src="/files/RR5vxijJ40HR1i9aDPKk" alt=""><figcaption></figcaption></figure>

系統將自動抓取已連結的工具，顯示於下方「<mark style="color:blue;">允許的工具</mark>」列表中。

## ⚠️ 注意事項

* **URL 的私密性**：再次強調，生成的 **MCP Server URL** 是私密的，請勿洩露。
* **多個工具**：如果您需要整合多個不同的應用程式 (例如同時使用 Google Drive 和 Slack)，您可能需要為每個應用程式在 **Composio MCP 目錄**中重複上述步驟 3 到 5，以獲取它們各自的 **MCP 伺服器 URL**，並在 MaiAgent 中分別設定不同的工具再分配給 AI 助理。
* **Composio 文件**：Composio 的介面或流程可能會更新，建議隨時參考 [Composio 官方最新的說明文件](https://docs.composio.dev/getting-started/welcome)以獲取最準確的資訊。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.maiagent.ai/tech/remote-mcp/composio.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
