Skip to main content
Glama
SendGrid MCP Server

SendGrid MCP Server

by Garoth

SendGrid MCP サーバー

電子メール マーケティングと連絡先管理用の SendGrid のマーケティング API へのアクセスを提供するモデル コンテキスト プロトコル (MCP) サーバー。https ://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api

デモ

このデモでは、Cline SendGridエージェントに新しい連絡先リストを作成し、そこに私のメールを追加し、Lost Citiesに関するテンプレートを自動生成して、リストにメールを送信するよう指示します。このプロセスで、Clineは検証済みの送信者と、使用する配信停止グループを知る必要があることを自動的に認識します。美しいメールが私の受信トレイに届き、Lost Citiesの素晴らしさに感動しました!

Related MCP server: SendGrid MCP Server

APIサポートに関する重要な注意事項

このサーバーはSendGridのv3 APIのみをサポートしており、従来の機能はサポートしていません。これには以下が含まれます。

  • 動的テンプレートのみ - レガシーテンプレートはサポートされていません

  • すべての連絡先と連絡先リストの操作のためのマーケティング API v3

  • 一括メール送信用の Single Sends API

利用可能なツール

連絡先管理

連絡先リスト

SendGrid アカウント内のすべての連絡先を一覧表示します。

// No parameters required

連絡先を追加

SendGrid マーケティング連絡先に連絡先を追加します。

{
  email: string;           // Required: Contact email address
  first_name?: string;     // Optional: Contact first name
  last_name?: string;      // Optional: Contact last name
  custom_fields?: object;  // Optional: Custom field values
}

連絡先を削除する

SendGrid アカウントから連絡先を削除します。

{
  emails: string[];  // Required: Array of email addresses to delete
}

リストで連絡先を取得する

SendGrid リスト内のすべての連絡先を取得します。

{
  list_id: string;  // Required: ID of the contact list
}

リスト管理

連絡先リスト

SendGrid アカウント内のすべての連絡先リストを一覧表示します。

// No parameters required

連絡先リストを作成する

SendGrid に新しい連絡先リストを作成します。

{
  name: string;  // Required: Name of the contact list
}

削除リスト

SendGrid から連絡先リストを削除します。

{
  list_id: string;  // Required: ID of the contact list to delete
}

リストに連絡先を追加する

既存の SendGrid リストに連絡先を追加します。

{
  list_id: string;    // Required: ID of the contact list
  emails: string[];   // Required: Array of email addresses to add
}

リストから連絡先を削除する

SendGrid リストから連絡先を削除せずに削除します。

{
  list_id: string;    // Required: ID of the contact list
  emails: string[];   // Required: Array of email addresses to remove
}

メール送信

メールを送信

SendGrid を使用して電子メールを送信します。

{
  to: string;                             // Required: Recipient email address
  subject: string;                        // Required: Email subject line
  text: string;                          // Required: Plain text content
  from: string;                          // Required: Verified sender email address
  html?: string;                         // Optional: HTML content
  template_id?: string;                  // Optional: Dynamic template ID
  dynamic_template_data?: object;        // Optional: Template variables
}

リストに送信

SendGrid Single Sends を使用して連絡先リストに電子メールを送信します。

{
  name: string;                          // Required: Name of the single send
  list_ids: string[];                    // Required: Array of list IDs to send to
  subject: string;                       // Required: Email subject line
  html_content: string;                  // Required: HTML content
  plain_content: string;                 // Required: Plain text content
  sender_id: number;                     // Required: ID of the verified sender
  suppression_group_id?: number;         // Required if custom_unsubscribe_url not provided
  custom_unsubscribe_url?: string;       // Required if suppression_group_id not provided
}

テンプレート管理(動的テンプレートのみ)

テンプレートの作成

新しい動的電子メール テンプレートを作成します。

{
  name: string;           // Required: Name of the template
  subject: string;        // Required: Default subject line
  html_content: string;   // Required: HTML content with handlebars syntax
  plain_content: string;  // Required: Plain text content with handlebars syntax
}

リストテンプレート

すべての動的電子メール テンプレートを一覧表示します。

// No parameters required

get_template

ID でテンプレートを取得します。

{
  template_id: string;  // Required: ID of the template to retrieve
}

テンプレートの削除

動的テンプレートを削除します。

{
  template_id: string;  // Required: ID of the template to delete
}

分析と検証

取得統計

SendGrid 電子メールの統計を取得します。

{
  start_date: string;                          // Required: Start date (YYYY-MM-DD)
  end_date?: string;                           // Optional: End date (YYYY-MM-DD)
  aggregated_by?: 'day' | 'week' | 'month';    // Optional: Aggregation period
}

検証メール

SendGrid を使用して電子メール アドレスを検証します。

{
  email: string;  // Required: Email address to validate
}

アカウント管理

検証済み送信者リスト

検証済みの送信者の ID をすべて一覧表示します。

// No parameters required

リスト抑制グループ

すべての登録解除グループを一覧表示します。

// No parameters required

インストール

git clone https://github.com/Garoth/sendgrid-mcp.git
cd sendgrid-mcp
npm install

構成

  1. SendGrid API キーを取得します。

    • SendGridアカウントにログイン

    • 設定 > APIキーに移動します

    • フルアクセス権限を持つ新しいAPIキーを作成する

    • APIキーは再度表示されないため、安全に保管してください。

  2. VSCode の設定内の Cline MCP 設定ファイルに追加します (例: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json):

{
  "mcpServers": {
    "sendgrid": {
      "command": "node",
      "args": ["/path/to/sendgrid-mcp/build/index.js"],
      "env": {
        "SENDGRID_API_KEY": "your-api-key-here"
      },
      "disabled": false,
      "autoApprove": [
        "list_contacts",
        "list_contact_lists",
        "list_templates",
        "list_single_sends",
        "get_single_send",
        "list_verified_senders",
        "list_suppression_groups",
        "get_stats",
        "validate_email"
      ]
    }
  }
}

注: データを変更するツール (電子メールの送信や連絡先の削除など) は、安全のため、意図的に自動承認から除外されています。

発達

テストの設定

テストでは実際のAPI呼び出しを使用し、正確なレスポンスを保証します。テストを実行するには、以下の手順に従ってください。

  1. サンプル環境ファイルをコピーします。

    cp .env.example .env
  2. .envを編集し、SendGrid API キーを追加します。

    SENDGRID_API_KEY=your-api-key-here

    注: 機密情報のコミットを防ぐため、 .envファイルは gitignored されます。

  3. テストを実行します。

    npm test

建物

npm run build

重要な注意事項

  • リストにメールを送信する場合、メール規制に準拠するために、suppression_group_id または custom_unsubscribe_url のいずれかを指定する必要があります。

  • 送信者のメールアドレスは、メールを送信する前にSendGridで検証する必要があります。

  • すべてのテンプレートは、ハンドルバー構文をサポートする動的テンプレートとして作成されます (例: {{variable_name}})

  • Single Sends APIは、より優れた追跡および管理機能を提供するため、すべての一括メール操作に使用されます。

  • SendGrid APIは「結果的に一貫性がある」ため、データの変更(連絡先の追加やリストの更新など)は、変更後すぐには反映されない場合があります。

ライセンス

マサチューセッツ工科大学

SendGridロゴの著作権/所有者はTwilioです

Available Tools

21 tools
add_contactC

Add a contact to your SendGrid marketing contacts

Inputs: email (required), first_name, last_name, custom_fields.

add_contacts_to_listC

Add contacts to an existing SendGrid list

Inputs: list_id (required), emails (required).

create_contact_listC

Create a new contact list in SendGrid

Inputs: name (required).

create_templateC

Create a new email template in SendGrid

Inputs: name (required), subject (required), html_content (required), plain_content (required).

delete_contactsC

Delete contacts from your SendGrid account

Inputs: emails (required).

delete_listC

Delete a contact list from SendGrid

Inputs: list_id (required).

delete_templateC

Delete a dynamic template from SendGrid

Inputs: template_id (required).

get_contacts_by_listC

Get all contacts in a SendGrid list

Inputs: list_id (required).

get_single_sendC

Get details of a specific single send

Inputs: single_send_id (required).

get_statsC

Get SendGrid email statistics

Inputs: start_date (required), end_date, aggregated_by.

get_templateC

Retrieve a SendGrid template by ID

Inputs: template_id (required).

list_contact_listsB

List all contact lists in your SendGrid account

Inputs: no named parameters.

list_contactsB

List all contacts in your SendGrid account

Inputs: no named parameters.

list_single_sendsB

List all single sends in your SendGrid account

Inputs: no named parameters.

list_suppression_groupsB

List all unsubscribe groups in your SendGrid account

Inputs: no named parameters.

list_templatesB

List all email templates in your SendGrid account

Inputs: no named parameters.

list_verified_sendersA

List all verified sender identities in your SendGrid account

Inputs: no named parameters.

remove_contacts_from_listA

Remove contacts from a SendGrid list without deleting them

Inputs: list_id (required), emails (required).

send_emailC

Send an email using SendGrid

Inputs: to (required), subject (required), text (required), from (required), +3 more.

send_to_listC

Send an email to a contact list using SendGrid Single Sends

Inputs: name (required), list_ids (required), subject (required), html_content (required), +4 more.

validate_emailC

Validate an email address using SendGrid

Inputs: email (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 21 tools

    Disambiguation4/5

    Most tools have distinct purposes, but some overlap exists between list_contacts and get_contacts_by_list, and between send_email and send_to_list, which could cause minor confusion. However, descriptions clarify the differences (e.g., list vs. get by list, general send vs. list-specific send).

    Naming Consistency5/5

    All tool names follow a consistent verb_noun or verb_noun_preposition pattern (e.g., add_contact, list_contact_lists, get_contacts_by_list), with clear and predictable naming conventions throughout the set.

    Tool Count3/5

    With 21 tools, the count is borderline high for a SendGrid server, as it covers contacts, lists, templates, sends, and stats, which might feel heavy but is reasonable given the broad scope. It's not excessive but leans toward the upper limit of typical scoping.

    Completeness5/5

    The tool set provides comprehensive coverage for SendGrid's core email marketing and contact management functions, including CRUD operations for contacts, lists, and templates, as well as sending emails, retrieving stats, and validation, with no obvious gaps in the surface.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Enables comprehensive email marketing and transactional email operations through SendGrid's API v3. Supports contact management, campaign creation, email automation, list management, and email sending with built-in read-only safety mode.
      58
      1,553 npm
      4
      ISC
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI models to send emails, manage contacts, and interact with SendGrid's email platform via MCP.
      1
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Manages SendGrid email workflows including design library, transactional templates, marketing contacts and lists, single sends, and direct email sends via the SendGrid v3 API.
      80
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables sending transactional emails, managing templates, suppression lists, sending domains, webhooks, subaccounts, and retrieving account metrics via the SparkPost API.
      20
      356 npm
      MIT