KosmoKrator

communication

SendGrid MCP Integration for OpenAI Agents SDK

Connect SendGrid to OpenAI Agents SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.

7 functions 6 read 1 write API key auth

Connect SendGrid to OpenAI Agents SDK

Attach KosmoKrator integration tools to OpenAI Agents SDK workflows through a local MCP gateway.

Start the KosmoKrator MCP gateway locally and point the OpenAI Agents SDK MCP tool at that process or wrapper. The gateway is local, scoped to this integration, and starts with --write=deny so OpenAI Agents can inspect read-capable tools without receiving write access by default.

SendGrid MCP Config for OpenAI Agents SDK

Use headless JSON commands for CI-style execution and MCP for agent tool discovery.

{
  "mcpServers": {
    "kosmokrator-sendgrid": {
      "type": "stdio",
      "command": "kosmo",
      "args": [
        "mcp:serve",
        "--integration=sendgrid",
        "--write=deny"
      ]
    }
  }
}

Run the Gateway Manually

kosmokrator mcp:serve --integration=sendgrid --write=deny

Why Use KosmoKrator Here

Scoped tools

Expose only SendGrid instead of a broad multi-service tool list.

Local credentials

Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.

Write policy

Start read-only, then opt into ask or allow for trusted workspaces.

SendGrid Tools Visible to OpenAI Agents

OpenAI Agents sees stable MCP tool names generated from the SendGrid integration catalog.

MCP toolSource functionTypeDescription
integration__sendgrid__sendgrid_list_contacts sendgrid.sendgrid_list_contacts Read List contacts in your SendGrid marketing contacts database. Supports pagination.
integration__sendgrid__sendgrid_send_email sendgrid.sendgrid_send_email Write Send an email via SendGrid. Specify sender, recipients, subject, and HTML or text content.
integration__sendgrid__sendgrid_get_contact sendgrid.sendgrid_get_contact Read Get details of a specific contact in SendGrid by their contact ID. Returns email, custom fields, and list memberships.
integration__sendgrid__sendgrid_get_current_user sendgrid.sendgrid_get_current_user Read Get the profile of the currently authenticated SendGrid user, including email, first name, and last name.
integration__sendgrid__sendgrid_get_template sendgrid.sendgrid_get_template Read Get details of a specific email template in SendGrid by its ID. Returns template name, versions, and active version content.
integration__sendgrid__sendgrid_list_emails sendgrid.sendgrid_list_emails Read List emails in your SendGrid account. Supports filtering by query and pagination.
integration__sendgrid__sendgrid_list_templates sendgrid.sendgrid_list_templates Read List email templates in your SendGrid account. Supports pagination.

Related SendGrid Pages