インストール不要。2分以内に動きます。
cloud.anythingmcp.com で無料トライアルを開始し、Mailtrap をワンクリックで追加して、AI クライアント(Claude、ChatGPT、Copilot、Cursor)を生成された MCP エンドポイントに向けるだけ。Docker も git clone も、開発経験も不要です。
概要
Mailtrap のアカウントをあらゆる AI エージェントから操作:トランザクション、バルク、バッチのメール送信、Email Sandbox でのテストとスパム・HTML レポート、送信ドメイン、抑制リスト、テンプレートの管理、送信した各メッセージのメールログでの追跡、送信統計の確認、Email Marketing の連絡先、リスト、キャンペーンの運用。API トークン 1 つで使えます。元に戻せない削除はインストール時にオフです。
こう聞いてみよう
Mailtrap のサンプルプロンプト
プロンプトをクリックでコピー。Claude / ChatGPT / Cursor / Gemini / Copilot / OpenClaw に貼り付けて、このコネクターで実行できます。
Claude は AI のため誤ることがあります。回答をご確認ください。
💡 インストール不要? cloud.anythingmcp.com を直接利用してください。 サインインし、Connectors → Mailtrap をクリック、認証情報を貼り付け、MCP API キーを発行すれば完了です。Docker も
git cloneもローカルサーバーも不要。
Mailtrap + Microsoft Copilot
Mailtrap のアカウントをあらゆる AI エージェントから操作:トランザクション、バルク、バッチのメール送信、Email Sandbox でのテストとスパム・HTML レポート、送信ドメイン、抑制リスト、テンプレートの管理、送信した各メッセージのメールログでの追跡、送信統計の確認、Email Marketing の連絡先、リスト、キャンペーンの運用。API トークン 1 つで使えます。元に戻せない削除はインストール時にオフです。
前提条件
完全なセットアップ手順はコネクタ自体に組み込まれています (ストアでコネクタを選択すると表示)。必要な環境変数:
MAILTRAP_API_TOKEN
ステップ 1 — 認証情報を取得
設定は約 3 分です。Mailtrap のアカウントが必要です。
- Mailtrap で Settings、API Tokens(https://mailtrap.io/api-tokens)を開き、トークンを作成します。送信ドメイン(送信、統計、ログ、抑制リスト用)、サンドボックスまたはプロジェクト(Email Sandbox 用)、使う場合は Email Marketing へのアクセスを付与します。抑制リストの変更には管理者アクセスが必要です。
- それを
MAILTRAP_API_TOKENに貼り付けます。Authorization: Bearer <token>として送られ、リセットするまで失効しません。 - コネクタをインストールして
mailtrap_list_accountsを実行します。アクセスレベル(1000 owner、100 admin、10 viewer)付きでアカウントが表示され、トークンを確認できます。トークンは 1 つのアカウントに属し、すべての呼び出しがそのアカウントに対して動くので、アカウント ID は不要です。 - 実際の送信には検証済みの送信ドメインが必要です(
mailtrap_list_sending_domains)。Email Sandbox はドメインなしで使えます。
Mailtrap は機能ごとに別のホストを使い、コネクタはツールごとに正しいホストを選びます。管理とレポートは https://mailtrap.io、トランザクション送信は https://send.api.mailtrap.io、Bulk ストリームは https://bulk.api.mailtrap.io、サンドボックスへのテスト送信は https://sandbox.api.mailtrap.io です。
送信: mailtrap_send_email は 1 通のトランザクションメールを最大 1000 人の宛先に送り、mailtrap_send_batch_emails は 1 回の呼び出しで最大 500 通の異なるメール(最大 50 MB)を送ります。マーケティングメールなどの一斉送信は、プロモーションの配信をトランザクションメールと分ける Bulk ストリームを使い、mailtrap_send_bulk_email と mailtrap_send_bulk_batch_emails で送ります。本文は text、html またはその両方か、保存済みテンプレートです。テンプレートの場合は template_uuid(数値 ID ではなく mailtrap_list_templates の uuid)と template_variables を渡し、subject、text、html、category は省きます。from_email は検証済み送信ドメインのアドレスでなければならず、to、cc、bcc は {"email", "name"} のリスト、添付ファイルは content に Base64 で入れます。送信はすべて実際の受信箱に届くため、AI は宛先、送信者、件名、本文を示してあなたの同意を待ちます。送信すると宛先ごとに 1 つずつ message_ids が返ります。バッチ呼び出しは一部のメッセージが失敗しても 200 を返すため、AI は responses の各エントリの success と errors を確認します。
Email Sandbox: mailtrap_send_sandbox_email はテストメールを送り、それはサンドボックスで受け止められて配信されることはありません。テンプレートや新しい内容を安全に試す方法です。その後 AI は受け止めたメッセージ(mailtrap_list_sandbox_messages、mailtrap_get_sandbox_message)、テキスト、プレビュー用 HTML、HTML ソース、生の MIME としての本文、ヘッダー、添付ファイル、スコアと該当ルール付きの SpamAssassin レポート、どの要素や CSS プロパティがどのメールクライアントで非対応かを示す HTML チェックを読みます。プロジェクトとサンドボックスの一覧表示とサンドボックスの作成もできます。SMTP の認証情報はどの応答にも含まれません。
ドメインと到達率: 公開すべき DNS レコード(SPF、DKIM、DMARC、リターンパス)と検証状況付きで送信ドメインを一覧表示、取得し、ドメインを追加し、DNS 設定手順を DNS 担当者にメールで送ります。抑制されたアドレス(ハードバウンス、配信停止、迷惑メール報告、手動インポート)は原因となったメッセージ付きで一覧でき、mailtrap_create_suppression であるアドレスへの送信を止められます。個々のメールについては、mailtrap_list_email_logs が宛先、ステータス、イベント、カテゴリ、送信時刻で絞り込み、mailtrap_get_email_log がプロバイダの応答付きで配信、開封、クリック、バウンスのイベントを示します。mailtrap_get_sending_stats は期間の合計を、mailtrap_get_sending_stats_grouped はドメイン、カテゴリ、メールボックスプロバイダ、日別の内訳を、mailtrap_get_billing_usage はプランに対する使用量を返します。
テンプレート: テンプレートの一覧、取得、作成、更新ができます。変数は Handlebars で、例えば {{user_name}} です。更新後に送るメールは新しい版を使います。
Email Marketing: ステータス、リスト、フィールド付きの連絡先(ID またはメールアドレスでの作成、取得、更新。オートメーションやセグメント用の purchase などのカスタムイベント。メールアドレスで照合する最大 50,000 件のインポートと mailtrap_get_contact_import での進捗確認)、連絡先リスト、連絡先フィールド(fields のキーになるマージタグ)。キャンペーン:mailtrap_create_campaign は常に下書きを作り、mailtrap_update_campaign は下書きを変更し、mailtrap_schedule_campaign は最大 1 か月先までの日時を設定し、mailtrap_start_campaign はすぐに送信し、mailtrap_cancel_campaign は予約済みキャンペーンを下書きに戻し、mailtrap_get_campaign_stats は結果を示します。予約と開始は配信対象の全員にメールを送るため、AI は先にキャンペーン、配信対象、日時をあなたに確認します。メール受信に同意した連絡先だけを追加し、送るのをやめたい相手は削除せずに配信停止(unsubscribed: true)にしてください。
インストール時はオフ: mailtrap_delete_suppression(そのアドレスに再びメールが届くようになります)、mailtrap_clean_sandbox(サンドボックスのメッセージをすべて削除)、mailtrap_delete_contact です。元に戻せないため、チームに必要になったらワークスペースの管理者がオンにします。
データ形式: ドメイン、サンドボックス、メッセージ、テンプレート、リスト、キャンペーンの ID は整数、連絡先、抑制、メールログのメッセージは UUID です。日時は UTC の ISO 8601 です。統計の率は小数(0.25 = 25%)、統計の日付は YYYY-MM-DD です。
ページング: 連絡先は null になるまで pagination.next_token を token に渡し、キャンペーンは pagination.next_token のページ番号を token に使います。メールログは next_page_cursor を search_after に渡します。抑制は 1 ページ 1000 件で、最後の項目の id を last_id に渡します。サンドボックスのメッセージは 1 ページ 30 件で、page か最後のメッセージ ID を last_id に使います。
制限: トークンごとに 10 秒あたり 150 リクエスト。連絡先は 1 分 200 回、統計と抑制は 1 分 10 回、メールログの一覧はアカウントごとに 1 分 60 回です。
よくあるエラー: 401 Incorrect API token はトークンが間違っているか、そのドメインやサンドボックスへのアクセスがありません。403 は権限不足なので、Settings、API Tokens でトークンを編集してください。404 は不明な ID です。422 は無効な入力で、理由が errors に入ります(例えば検証済みドメインにない送信者や、すでに下書きではないキャンペーン)。429 はレート制限なので、待ってから再試行します。
このコネクタは送信ドメイン、サンドボックス、テンプレート、キャンペーンを削除せず、サンドボックスの SMTP 認証情報も返しません。
ステップ 2 — アダプターをインストール
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
ステップ 3 — Microsoft Copilot にコネクタを追加
サーバーURL: AnythingMCP で MCP Servers を開き、このコネクタがあるサーバーを選んで URL(
https://cloud.anythingmcp.com/mcp/…)をコピーします。このガイドでYOUR_SERVER_IDと表示されている箇所に使ってください。
Microsoft Copilot は、Copilot Studio で作成したエージェントを通じて MCP サーバーを使います。AnythingMCP をツールとしてエージェントに追加し、そのエージェントを Microsoft 365 Copilot と Teams に公開します。Copilot Studio は Microsoft のクラウドから Streamable HTTP で接続し、AnythingMCP はこれに対応しています。
- Copilot Studio でエージェントを開き(または新規作成し)、Tools で Add a tool → New tool → Model Context Protocol を選びます。
- Server name(例:
AnythingMCP)、コネクタでできることを説明する Server description、Server URLhttps://cloud.anythingmcp.com/mcp/YOUR_SERVER_IDを入力します。Copilot Studio はこの説明をもとに、いつサーバーを呼び出すかを判断します。 - 認証で API key を選び、Type を Header、ヘッダー名を
X-API-Keyにして Create を選びます。 - Add tool で Create a new connection を選び、AnythingMCP の MCP API キー(MCP Servers → 対象のサーバー → API keys)を貼り付けて Add to agent を選びます。
- エージェントの Test ウィンドウで試します。
Mailtrapのツールが必要になる依頼をしてみましょう。 - Publish を選び、Channels → Microsoft 365 and Microsoft Teams で Make agent available in Microsoft Copilot を選択したまま Add channel を選びます。See agent in Teams で自分用にインストールされます。Microsoft 365 Copilot では @ を入力してエージェントを選びます。
ユーザーごとにサインインさせたい場合は、API キーの代わりに OAuth 2.0 → Dynamic discovery を選びます。各ユーザーは、エージェントが初めて呼び出すときに AnythingMCP にサインインします。
セルフホストの場合は、https://cloud.anythingmcp.com の代わりにインスタンスの公開 HTTPS アドレスを使ってください。Copilot Studio は Microsoft のクラウドから接続するため、localhost は使えません。
利用可能なツール
| Tool | What it does |
|---|---|
mailtrap_list_accounts | Mailtrap accounts the API token can reach, with id, name and access_levels (1000 owner, 100 admin, 10 viewer) |
mailtrap_get_billing_usage | Usage of the current billing cycle: plan names and sent or stored message counts against their limits for Email Sending, Email Sandbox and… |
mailtrap_send_email | Send one transactional email through the Email API (send.api.mailtrap.io): to up to 1000 recipients, with text and/or HTML, or from a… |
mailtrap_send_batch_emails | Send up to 500 different transactional emails in one call (send.api.mailtrap.io/api/batch): shared fields in base, one entry per message in… |
mailtrap_send_bulk_email | Send one marketing or bulk email through the Bulk stream (bulk.api.mailtrap.io), which keeps promotional traffic apart from transactional… |
mailtrap_send_bulk_batch_emails | Send up to 500 different bulk (marketing) emails in one call through the Bulk stream (bulk.api.mailtrap.io/api/batch) |
mailtrap_list_sending_domains | Sending domains of the account with their id, DNS verification and compliance status and tracking settings |
mailtrap_get_sending_domain | One sending domain with the DNS records to publish (SPF, DKIM, DMARC, return path) and whether each is verified, plus compliance status and… |
mailtrap_create_sending_domain | Add a sending domain |
mailtrap_send_domain_setup_instructions | Email the DNS setup instructions of a sending domain to someone, e.g. the person who manages DNS |
mailtrap_list_suppressions | Addresses Mailtrap no longer sends to (hard bounce, unsubscription, spam complaint, manual import), up to 1000 per call, with the message… |
mailtrap_create_suppression | Stop sending to an address on one domain and stream |
mailtrap_delete_suppression | Remove a suppression so the address receives email again |
mailtrap_get_sending_stats | Sending totals for a date range: delivery, bounce, open, click and spam counts and rates, optionally limited to domains, streams… |
mailtrap_get_sending_stats_grouped | The same sending stats split by sending domain, category, recipient mailbox provider or day |
mailtrap_list_email_logs | Sent messages of the account, newest first, with status, recipient, subject, category, opens and clicks |
mailtrap_get_email_log | One sent message with its delivery events (delivery, open, click, bounce with the provider response), custom variables, template and a link… |
mailtrap_list_sandbox_projects | Email Sandbox projects with the sandboxes (test inboxes) in each |
mailtrap_list_sandboxes | All sandboxes (test inboxes) with id, name, project, message and unread counts and the sandbox email address |
mailtrap_get_sandbox | One sandbox: name, project, message counts, size limits, SMTP host and ports and its email address |
mailtrap_list_sandbox_messages | Messages caught in a sandbox, newest first, 30 per page: id, subject, sender, recipient, sent time, size and read state (SMTP details and… |
mailtrap_get_sandbox_message | One sandbox message: sender, recipient, subject, size, SMTP details and blacklist report summary |
mailtrap_get_sandbox_message_body | The body of a sandbox message: txt (plain text), html (sanitized for preview), htmlsource (the HTML as sent) or raw (the whole MIME message) |
mailtrap_get_sandbox_message_headers | The mail headers of a sandbox message (From, To, Subject, Message-ID, List-Unsubscribe, ...) |
mailtrap_get_sandbox_spam_report | SpamAssassin report of a sandbox message: total score, threshold and the rules that matched |
mailtrap_get_sandbox_html_analysis | HTML check of a sandbox message: which elements and CSS properties are unsupported by which email clients, with an overall support score |
mailtrap_list_sandbox_attachments | Attachments of a sandbox message with filename, content type, size and download path |
mailtrap_send_sandbox_email | Send a test email into a sandbox (sandbox.api.mailtrap.io): it is caught there and never reaches the recipients, so it is safe for trying… |
mailtrap_create_sandbox | Create a sandbox (test inbox) in a project; the answer carries its id and email address, SMTP credentials left out |
mailtrap_clean_sandbox | Delete every message in a sandbox |
mailtrap_list_contacts | Email Marketing contacts, 25 per page by default (at most 50), with id, email, status, list ids and fields |
mailtrap_get_contact | One contact by id or email: status, lists, fields and timestamps |
mailtrap_create_contact | Add a contact, optionally with fields (by merge tag) and lists |
mailtrap_update_contact | Change a contact: email, fields, list membership or subscription status |
mailtrap_delete_contact | Delete a contact for good, e.g. on an erasure request |
mailtrap_create_contact_event | Record a custom event for a contact (e.g. purchase, trial_started) with parameters, for automations and segments |
mailtrap_list_contact_lists | Contact lists with id and name; search filters by the start of the name |
mailtrap_create_contact_list | Create an Email Marketing contact list; add contacts with list_ids or list_ids_included afterwards |
mailtrap_list_contact_fields | Contact fields with id, name, data type and the merge tag used in contact fields and templates |
mailtrap_import_contacts | Create or update up to 50,000 contacts in one asynchronous import, matched by email |
mailtrap_get_contact_import | Status of a contact import (created, started, finished, failed) with the counts of created and updated contacts and those over the plan… |
mailtrap_list_templates | Email templates of the account with id, uuid (used to send), name, category and subject |
mailtrap_get_template | One email template with subject, HTML and text body (Handlebars variables such as {{user_name}}) |
mailtrap_create_template | Create an email template |
mailtrap_update_template | Change an email template; only the fields you pass change |
mailtrap_list_campaigns | Email Marketing campaigns, newest first, with id, name, state and schedule |
mailtrap_get_campaign | One campaign: state, sender, audience lists and segments, delivery mode, template and schedule |
mailtrap_get_campaign_stats | Results of a campaign: delivered, opened, clicked, bounced, spam and unsubscribed counts and rates, optionally for a date window |
mailtrap_create_campaign | Create a campaign as a draft: sender, audience, subject and design |
mailtrap_update_campaign | Change a draft campaign; only the fields you pass change |
mailtrap_schedule_campaign | Schedule a draft campaign to go out at a set time, at most one month ahead |
mailtrap_start_campaign | Start sending a draft campaign now to its whole audience |
mailtrap_cancel_campaign | Cancel a scheduled campaign before it goes out; it goes back to draft and can be edited again |
プロンプトの例
- 「今朝 [email protected] に送った注文確認メールは届いた?イベントを見せて。」
- 「この新しいウェルカムテンプレートをテスト用サンドボックスに送って、スパムスコアと HTML に問題があるメールクライアントを教えて。」
- 「先週の配信率、バウンス率、迷惑メール率をメールボックスプロバイダ別に見せて。」
- 「うちの送信ドメインでまだ検証されていない DNS レコードはどれ?」
- 「顧客リスト向けに 11 月ニュースレターのテンプレートでキャンペーン下書きを作って、予約する前に配信対象を見せて。」
FAQ
どの Copilot が対象ですか? 職場で使う Microsoft 365 Copilot で、Copilot Studio のエージェントを通じて利用します。個人アカウント向けの Microsoft Copilot アプリでは、独自の MCP サーバーを追加できません。
何が必要ですか? エージェントを作成するために、Copilot Studio を利用できる職場アカウント(ライセンスまたは試用版)が必要です。Microsoft 365 Copilot や Teams でエージェントを使う人には、エージェントへのアクセス権が必要です。共有するか、管理者に組織向けに公開してもらってください。組織が Power Platform コネクタにデータ ポリシーを適用している場合は、MCP サーバーにも適用されます。
エージェントがツールを呼び出しません。 ヘッダー名が正確に X-API-Key であること、キーが URL と同じ MCP サーバーのものであることを確認し、Server description を具体的に書いてください。Copilot Studio はこの説明をもとにサーバーを呼び出すかどうかを判断します。変更のたびにエージェントを再公開し、開いているチャットでは "start over" と入力すると新しいバージョンになります。
次のステップ
このガイドは役に立ちましたか?