SendGrid MCP Server

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Provides access to SendGrid's Marketing API for email marketing and contact management, including contact and list management, email sending, template management, and analytics capabilities

SendGrid MCP 서버

이메일 마케팅 및 연락처 관리를 위한 SendGrid의 마케팅 API에 대한 액세스를 제공하는 MCP(Model Context Protocol) 서버입니다. https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api

데모

이 데모에서는 Cline SendGrid 에이전트에게 새 연락처 목록을 만들고, 제 이메일을 추가하고, Lost Cities 관련 정보 템플릿을 자동으로 생성하여 해당 목록으로 이메일을 전송하도록 요청합니다. 이 과정에서 Cline은 검증된 발신자와 어떤 수신 거부 그룹을 사용해야 하는지 자동으로 인식합니다. Lost Cities 관련 정보가 담긴 예쁜 이메일이 제 받은 편지함으로 전송됩니다!

API 지원에 대한 중요 참고 사항

이 서버는 SendGrid v3 API만 지원하며 기존 기능은 지원하지 않습니다. 여기에는 다음이 포함됩니다.

  • 동적 템플릿만 지원 - 레거시 템플릿은 지원되지 않습니다.
  • 모든 연락처 및 연락처 목록 작업을 위한 마케팅 API v3
  • 대량 이메일 전송을 위한 Single Sends API

사용 가능한 도구

연락처 관리

연락처 목록

SendGrid 계정의 모든 연락처를 나열합니다.

지엑스피1

연락처 추가

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 }

분석 및 검증

get_stats

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 }

계정 관리

확인된 발신자 목록

확인된 모든 발신자 신원을 나열합니다.

// 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" ] } } }

참고: 데이터를 수정하는 도구(예: 이메일 전송 또는 연락처 삭제)는 안전을 위해 의도적으로 autoApprove에서 제외되었습니다.

개발

테스트 설정

테스트는 정확한 응답을 보장하기 위해 실제 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는 "최종적으로 일관성이 있습니다" - 데이터 변경 사항(예: 연락처 추가 또는 목록 업데이트)이 변경된 직후에 나타나지 않을 수 있습니다.

특허

MIT

SendGrid 로고 저작권 / Twilio 소유

ID: 82glmn141z