Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Api Patterns

ASecurity

Mimecast MCP fundamentals: the available tool catalog, OAuth 2.0 client-credentials authentication, regional API endpoints, pagination, rate limiting, and error handling.

48 stars
0 votes
0 copies
0 views
Added 10/2/2026
ai-agentsbashapisecurity

Works with

cursorcliapimcp

Security Analysis

A100/100

Scanned 10/2/2026

$npx -y skills add wyre-technology/msp-claude-plugins --skill api-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Patterns?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Api Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/wyre-technology-api-patterns-58b3debc/badge)](https://www.skillsdirectory.com/skills/wyre-technology-api-patterns-58b3debc)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: "Mimecast API Patterns"
description: >
  Mimecast MCP fundamentals: the available tool catalog, OAuth 2.0
  client-credentials authentication, regional API endpoints, pagination,
  rate limiting, and error handling.
when_to_use: >-
  When authenticating to Mimecast, choosing a regional endpoint, paging results, or interpreting
  a Mimecast API error. Use when: mimecast, mimecast api, mimecast authentication, mimecast
  tools, mimecast mcp, mimecast request, mimecast error, mimecast region, or mimecast
  pagination.
---

# Mimecast MCP Tools & API Patterns

## Overview

The Mimecast MCP server provides AI tool integration with the Mimecast Email Security platform. It covers message tracking, threat intelligence (TTP), email delivery queue management, and audit event access. Authentication is via OAuth 2.0 client credentials — the MCP Gateway handles token acquisition automatically using the injected client ID and secret.

## Connection & Authentication

### OAuth 2.0 Client Credentials

Mimecast uses OAuth 2.0 client credentials flow. The MCP Gateway injects credentials via headers:

| Header | Description |
|--------|-------------|
| `X-Mimecast-Client-ID` | OAuth 2.0 Client ID |
| `X-Mimecast-Client-Secret` | OAuth 2.0 Client Secret |
| `X-Mimecast-Region` | Regional API endpoint key (us, eu, de, ca, za, au) |

The server exchanges the client ID and secret for a bearer token at startup and refreshes it as needed. Individual tool calls do not require manual token management.

**Environment Variables (self-hosted):**

```bash
export MIMECAST_CLIENT_ID="your-client-id"
export MIMECAST_CLIENT_SECRET="your-client-secret"
export MIMECAST_REGION="us"
```

> **IMPORTANT:** Never hardcode credentials. Always use environment variables or the MCP Gateway.

### Regional Endpoints

Mimecast tenants are hosted in specific regions. Using the wrong region returns empty results or authentication failures.

| Region Key | Base URL |
|------------|----------|
| `us` | `https://api.services.mimecast.com` |
| `eu` | `https://eu-api.mimecast.com` |
| `de` | `https://de-api.mimecast.com` |
| `ca` | `https://ca-api.mimecast.com` |
| `za` | `https://za-api.mimecast.com` |
| `au` | `https://au-api.mimecast.com` |

To identify the correct region, log into the Mimecast Administration Console and check the URL — the subdomain indicates the region (`us`, `eu`, `de`, etc.).

## Available MCP Tools

### Message Tracking

| Tool | Description |
|------|-------------|
| `mimecast_find_message` | Search messages by sender, recipient, subject, date range |
| `mimecast_get_message_info` | Get detailed metadata for a specific message |
| `mimecast_hold_message` | Place a message on hold (prevent delivery) |
| `mimecast_release_message` | Release a held message for delivery |

### Threat Intelligence

| Tool | Description |
|------|-------------|
| `mimecast_get_threat_incidents` | List threat remediation incidents |
| `mimecast_get_ttp_logs` | Get TTP logs — URL clicks, attachment checks, impersonation |
| `mimecast_get_audit_events` | Retrieve audit log entries |

### Queue Management

| Tool | Description |
|------|-------------|
| `mimecast_get_queue_status` | Get email delivery queue status — whole gateway, no arguments, no filters |

## Pagination

Most Mimecast list endpoints use cursor-based pagination:

- Responses include a `meta.pagination` object with `pageSize`, `totalCount`, and optionally `next`
- Pass the `next` cursor value as the `pageToken` parameter on the next call
- Continue until `meta.pagination.next` is absent or null

**Example pagination response:**

```json
{
  "meta": {
    "status": 200,
    "pagination": {
      "pageSize": 25,
      "totalCount": 142,
      "next": "eyJwYWdlIjoyLCJwYWdlU2l6ZSI6MjV9"
    }
  },
  "data": []
}
```

**Pagination workflow:**

1. Call the tool with no `pageToken`
2. Check `meta.pagination.next` in the response
3. If present, call again with `pageToken` set to that value
4. Repeat until `next` is absent

## Rate Limiting

Mimecast enforces per-endpoint rate limits. Specific limits vary by subscription tier.

- HTTP 429 responses indicate rate limiting
- Use exponential backoff before retrying
- Apply date range and sender/recipient filters to reduce result set sizes
- Avoid broad sweeping queries — target specific messages or time windows

## Error Handling

### Common Error Codes

| Code | Meaning | Resolution |
|------|---------|------------|
| 400 | Bad Request | Check required parameters and date format (ISO 8601) |
| 401 | Unauthorized | Verify Client ID and Secret; check token expiry |
| 403 | Forbidden | Insufficient OAuth scopes for the operation |
| 404 | Not Found | Message ID or resource doesn't exist |
| 429 | Rate Limited | Wait and retry with backoff |
| 500 | Server Error | Retry; contact Mimecast support if persistent |

### Error Response Format

```json
{
  "meta": {
    "status": 401,
    "message": "Invalid credentials"
  },
  "fail": [
    {
      "errors": [
        {
          "code": "err_auth_invalid",
          "message": "The provided client credentials are invalid",
          "retryable": false
        }
      ]
    }
  ]
}
```

### Wrong Region

If requests succeed but return empty `data` arrays when results are expected, the region is likely incorrect. Verify the tenant's region and update the `MIMECAST_REGION` configuration.

## Best Practices

- Always specify date ranges when searching messages — open-ended queries are slow and may be rate limited
- Use sender and recipient filters together to narrow results quickly
- Check the `meta.status` field in every response — Mimecast sometimes returns HTTP 200 with error status in the body
- Log the `requestId` from response headers for support escalations

## Related Skills

- [message-tracking](../message-tracking/SKILL.md) - Search and manage messages
- [threat-intelligence](../threat-intelligence/SKILL.md) - TTP logs and threat incidents
- [queue-management](../queue-management/SKILL.md) - Delivery queue monitoring

Attribution

WYRE-AIWYRE-AI
View sourceSee grades on GitHubMore from wyre-technology →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →