thrd-mcp
v0.1.5
Published
Thrd MCP Server (Agent Email): events, threads, sending/replying, usage, trust and security tools for AI clients.
Maintainers
Readme
Thrd MCP Server
Expose Thrd (Agent Email) as an MCP server so AI clients can:
- Poll inbound email events
- Read threads and messages
- Reply and send outbound (policy-gated)
- Check usage, trust score, and security analysis
This lives in the monorepo under apps/mcp.
Environment Variables
Required:
THRD_API_KEY: your Thrd agent API key
Optional:
THRD_API_BASE_URL: defaults tohttps://api.thrd.email
Transport:
MCP_TRANSPORT:stdio(default) orhttp
HTTP mode (if MCP_TRANSPORT=http):
MCP_HTTP_PORT: default8080MCP_HTTP_PATH: default/mcpMCP_STATELESS:1for stateless mode (no session ids). Default is stateful.MCP_AUTH_TOKEN: if set, requiresAuthorization: Bearer <token>on every request
Instant onboarding tool gate:
ALLOW_THRD_INSTANT_ONBOARDING: set to1to enablethrd.instant_onboarding
Run (stdio)
From repo root:
export THRD_API_KEY="thrd_xxx"
pnpm -C apps/mcp devInstall (npm)
If published to npm as thrd-mcp:
export THRD_API_KEY="thrd_xxx"
npx -y thrd-mcpRun (HTTP)
export THRD_API_KEY="thrd_xxx"
export MCP_TRANSPORT="http"
export MCP_HTTP_PORT="8080"
export MCP_AUTH_TOKEN="change-me" # recommended
pnpm -C apps/mcp devHealth check:
curl http://localhost:8080/healthzClaude Desktop (example)
Add a server entry to your Claude Desktop config and point it at the stdio command.
Example (adjust paths and shell as needed):
{
"mcpServers": {
"thrd": {
"command": "pnpm",
"args": ["-C", "apps/mcp", "start"],
"env": {
"THRD_API_KEY": "thrd_xxx",
"THRD_API_BASE_URL": "https://api.thrd.email"
}
}
}
}Tools
Highlights:
thrd.poll_events,thrd.ack_eventsthrd.list_threads,thrd.get_thread_messagesthrd.reply,thrd.send,thrd.outbound_statusthrd.usage,thrd.trust_scorethrd.message_security,thrd.create_security_ackthrd.billing_checkout_selfthrd.claim_x_start,thrd.claim_x_status
Publishing To The MCP Registry
The GitHub MCP Registry indexes servers from the official MCP Registry.
High level steps:
- Publish
thrd-mcpto npm. - Ensure
apps/mcp/server.jsonis valid and the npm package containsmcpNamematchingserver.jsonname. - Use
mcp-publisherto publishserver.jsonto the registry.
Resources / Prompts
Resources:
thrd://docs/quickstartthrd://docs/api
Prompts:
thrd.triage_inboxthrd.draft_reply
