The Elastic Email MCP connector routes your AI agent's tool calls to Elastic Email's own MCP server through Scalekit. Each user signs in to Elastic Email once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 11 tools.
- Tools
- 11
- What they doRead · write · destructive
- 11 · 0 · 011 read0 write0 destructive
- Users sign in with
- OAuth
- OAuth app
- Your own Elastic Email MCP server app
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the Elastic Email MCP connection
In AgentKit > Connections, create an Elastic Email MCP connection and copy its redirect URI. The name you give it is the
connection_nameyour code passes. See Configure connections.Register an OAuth app
Elastic Email MCP server connections use your own OAuth app. Register one with Elastic Email MCP server and add the redirect URI you copied.
Then enter the app's Client ID and Client Secret on the Elastic Email MCP connection.
Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'elasticemailmcp'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Elastic Email MCP:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'elasticemailmcp_get_domains',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "elasticemailmcp"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Elastic Email MCP:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="elasticemailmcp_get_domains",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user signs in once. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolelasticemailmcp_fetch_templateUse to retrieve the full definition of a known template; do not use it to list or create templates.Read-onlyFetch Template
Use to retrieve the full definition of a known template; do not use it to list or create templates. Returns the template definition and has no side effects. If the name is empty or absent, use FetchTemplates to obtain an exact name, then retry.
Inputs
namestringrequired- Exact name of the template. Use FetchTemplates to list the names on this account.
elasticemailmcp_fetch_templatesUse to list available templates by scope and optional editor type; do not use it to retrieve one template's full content.Read-onlyFetch Templates
Use to list available templates by scope and optional editor type; do not use it to retrieve one template's full content. Returns matching template records and has no side effects. Provide at least one scope; correct invalid filters or resolve the returned API error and retry.
Inputs
scopesarrayrequired- Which template scopes to list. Allowed values: Personal: this account's own templates; Global: templates shared across accounts.
templateTypesarray- Optional filter on template type. Allowed values: RawHTML: editable HTML; DragDropEditor: drag-and-drop editor; TemplateEditor: block-based editor. Defaults to all three types.
elasticemailmcp_get_domainUse to inspect one configured domain by name; do not use it to list all domains or verify DNS.Read-onlyGet Domain
Use to inspect one configured domain by name; do not use it to list all domains or verify DNS. Returns the API v5 agent envelope, with the domain in data and any required DNS work in next_steps. It has no side effects. If the name is unknown, use GetDomains, then retry with its exact name.
Inputs
domainstringrequired- Name of the domain, e.g. yourdomain.com. Use GetDomains to list them.
elasticemailmcp_get_domainsUse to list domains configured for the account; do not use it to inspect or verify one known domain.Read-onlyGet Domains
Use to list domains configured for the account; do not use it to inspect or verify one known domain. Returns the API v5 agent envelope: data contains the domain records, page states whether more results exist, and next_steps gives the next page operation. It has no side effects. If the request is refused, resolve the returned blockers and retry.
Inputs
limitinteger- Maximum number of domains to return. Use the page data and next_steps to request every page.default
50 offsetinteger- Number of domains to skip. Start at 0, then use the offset in the page.next operation.default
0
elasticemailmcp_get_email_event_historyUse to inspect retained delivery and engagement events for one sent message ID; do not use it to send, edit, or search email messages.Read-onlyGet Email Event History
Use to inspect retained delivery and engagement events for one sent message ID; do not use it to send, edit, or search email messages. Returns the message event history and EventHorizon retention state, and has no side effects. If no events are available yet, retry shortly; if EventHorizon.HistoryComplete is false, the message log partition has expired.
Inputs
msgIdstringrequired- Msg ID, as returned by SendTransactionalEmail or GetEmailEvents.
elasticemailmcp_get_email_eventsUse to list delivery and engagement events for emails on the account; do not use it to inspect rendered message content or send email.Read-onlyGet Email Events
Use to list delivery and engagement events for emails on the account; do not use it to inspect rendered message content or send email. Returns matching v4 event records, including TransactionID and MsgID, and has no side effects. Filter by v4 event type and UTC time range. If no records match, correct the filters or retry with a broader range.
Inputs
eventTypesarray- Optional v4 event types to include. Omit to return every available event type.
fromstring- Start of the range, inclusive. Converted to UTC before the query is made.
limitinteger- Maximum event records to return, from 1 to 1000. Omit for the API default.
offsetinteger- Number of matching event records to skip before returning results.default
0 orderBystring- Sort order for event timestamps.one of
DateDescendingDateAscendingdefaultDateDescending tostring- End of the range, inclusive. Converted to UTC before the query is made.
elasticemailmcp_get_sent_emailsUse to list sent-email events in an optional UTC time range; do not use it to inspect a message body or send email.Read-onlyGet Sent Emails
Use to list sent-email events in an optional UTC time range; do not use it to inspect a message body or send email. Returns matching sent events and has no side effects. If the request fails, correct the range or resolve the returned API error and retry.
Inputs
fromstring- Start of the range, inclusive. Converted to UTC before the query is made.
tostring- End of the range, inclusive. Converted to UTC before the query is made.
elasticemailmcp_get_sent_emails_by_transaction_idUse to retrieve send events for one transaction ID; do not use it to search by recipient or inspect a message body.Read-onlyGet Sent Emails By Transaction Id
Use to retrieve send events for one transaction ID; do not use it to search by recipient or inspect a message body. Returns matching events and has no side effects. If the transaction ID is unknown, obtain it from a send result or GetSentEmails and retry.
Inputs
transactionIdstringrequired- Transaction ID returned when the email was sent.
fromstring- Start of the range, inclusive. Converted to UTC before the query is made.
limitinteger- Maximum event records to return. Omit for the API default.
offsetinteger- Number of matching event records to skip before returning results.default
0 tostring- End of the range, inclusive. Converted to UTC before the query is made.
elasticemailmcp_get_suppression_listUse to list existing contact suppressions; do not use it to inspect, add or remove one.Read-onlyGet Suppression List
Use to list existing contact suppressions; do not use it to inspect, add or remove one. Returns the API v5 envelope unchanged: page states whether more results exist and how to request them. It has no side effects. To decide whether a suppression may be removed, inspect that recipient instead. If the request fails, resolve the API error and retry.
Inputs
limitinteger- Maximum number of suppressions to return. Use the page data to request every page.default
50 offsetinteger- Number of suppressions to skip. Start at 0, then use the next page offset.default
0
elasticemailmcp_is_readyUse to check whether this MCP server can reach the Elastic Email API; do not use it to validate credentials, send email, or inspect account data.Read-onlyIs Ready
Use to check whether this MCP server can reach the Elastic Email API; do not use it to validate credentials, send email, or inspect account data. Returns healthy, an API connectivity status, or not healthy. It has no side effects; retry after resolving the reported service or network issue.
Inputs
This tool takes no inputs.
elasticemailmcp_view_emailUse to inspect the rendered content of one sent email by MsgID; do not use it to send, edit, or search emails.Read-onlyView Email
Use to inspect the rendered content of one sent email by MsgID; do not use it to send, edit, or search emails. Returns the email, including its body. It has no side effects. Use the MsgID returned by SendTransactionalEmail or GetSentEmails; if it is missing or not found, obtain a valid ID and retry.
Inputs
msgIdstringrequired- MsgID of the sent email, as returned by SendTransactionalEmail or GetSentEmails.
No tools match.