Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.19.0"
".": "0.20.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 25
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/inbound%2Finbound-3a201e697c7829392693d40176a670c003c2f60d490c2cc51147ee341251678b.yml
openapi_spec_hash: 4f2b2086e995bc095acf7db4506b3355
config_hash: 7664efcf01b23a96ae00ead0a64f22ee
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/inbound%2Finbound-04a8a5e5040d2818c904bbe928e57c790f8f06b7e1335197f8d9d9f66b202b3a.yml
openapi_spec_hash: c84e146f4513cb7169350473efb20290
config_hash: 1450bd31f2a046791524466b8a5ea006
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Changelog

## 0.20.0 (2025-12-11)

Full Changelog: [v0.19.0...v0.20.0](https://github.com/inboundemail/inbound-typescript-sdk/compare/v0.19.0...v0.20.0)

### Features

* **api:** api update ([feb8844](https://github.com/inboundemail/inbound-typescript-sdk/commit/feb884455a3fceda6cf1968a10d6553299e98400))
* **api:** api update ([b7926ec](https://github.com/inboundemail/inbound-typescript-sdk/commit/b7926ec7c9dfea912995ec1e1be0cb89a02f2448))
* **api:** api update ([ba47317](https://github.com/inboundemail/inbound-typescript-sdk/commit/ba473173ccab81066589006e8f905a40c595d40f))
* **api:** api update ([d2fb94d](https://github.com/inboundemail/inbound-typescript-sdk/commit/d2fb94d3af9c8ebaa77723d40c7710c8c8ba2ed6))
* **api:** api update ([2299442](https://github.com/inboundemail/inbound-typescript-sdk/commit/22994422dd114b52a9af6c3e3797ca32394ebd4a))
* **api:** api update ([0ad20fe](https://github.com/inboundemail/inbound-typescript-sdk/commit/0ad20fecf3bd20dddba107b21ab5944c7eee90b6))


### Bug Fixes

* **mcp:** add client instantiation options to code tool ([cf6642b](https://github.com/inboundemail/inbound-typescript-sdk/commit/cf6642bed6778b624007f12f327b553aac286107))


### Chores

* **internal:** configure MCP Server hosting ([d4a7a76](https://github.com/inboundemail/inbound-typescript-sdk/commit/d4a7a7665c01b70b8dea8d835f761bbeeb5b18b9))

## 0.19.0 (2025-12-09)

Full Changelog: [v0.18.0...v0.19.0](https://github.com/inboundemail/inbound-typescript-sdk/compare/v0.18.0...v0.19.0)
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ TypeScript >= 4.9 is supported.

The following runtimes are supported:

- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)
- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
- Deno v1.28.0 or higher.
- Bun 1.0 or later.
Expand All @@ -349,6 +348,9 @@ The following runtimes are supported:
- Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time).
- Nitro v2.6 or greater.

> [!WARNING]
> Web browser runtimes aren't supported. The SDK will throw an error if used in a browser environment.

Note that React Native is not supported at this time.

If you are interested in other runtime environments, please open or upvote an issue on GitHub.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "inboundemail",
"version": "0.19.0",
"version": "0.20.0",
"description": "The official TypeScript library for the Inbound API",
"author": "Inbound <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
66 changes: 66 additions & 0 deletions packages/mcp-server/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Dependencies
node_modules/
**/node_modules/

# Build outputs
dist/
**/dist/
build/
**/build/

# Git
.git/
.gitignore

# CI/CD
.github/
.gitlab-ci.yml
.travis.yml

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Documentation
*.md
docs/
LICENSE

# Testing
test/
tests/
__tests__/
*.test.js
*.spec.js
coverage/
.nyc_output/

# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Environment
.env
.env.*

# Temporary files
*.tmp
*.temp
.cache/

# Examples and scripts
examples/
bin/

# Other packages (we only need mcp-server)
packages/*/
!packages/mcp-server/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Dockerignore file in wrong location, won't be used

The .dockerignore file at packages/mcp-server/.dockerignore won't be used during Docker builds. Docker only reads .dockerignore from the build context root, not from the Dockerfile's directory. Since the documented build command runs from the repo root (docker build -f packages/mcp-server/Dockerfile .), this file is effectively ignored. The build will include all files (node_modules, tests, etc.) resulting in much larger images and longer build times than intended.

Additional Locations (1)

Fix in Cursor Fix in Web

81 changes: 81 additions & 0 deletions packages/mcp-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Dockerfile for Inbound MCP Server
#
# This Dockerfile builds a Docker image for the MCP Server.
#
# To build the image locally:
# docker build -f packages/mcp-server/Dockerfile -t inbound-docs-mcp:local .
#
# To run the image:
# docker run -i inbound-docs-mcp:local [OPTIONS]
#
# Common options:
# --tool=<name> Include specific tools
# --resource=<name> Include tools for specific resources
# --operation=read|write Filter by operation type
# --client=<type> Set client compatibility (e.g., claude, cursor)
# --transport=<type> Set transport type (stdio or http)
#
# For a full list of options:
# docker run -i inbound-docs-mcp:local --help
#
# Note: The MCP server uses stdio transport by default. Docker's -i flag
# enables interactive mode, allowing the container to communicate over stdin/stdout.

# Build stage
FROM node:20-alpine AS builder

# Enable corepack to use pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate

# Install bash for build script
RUN apk add --no-cache bash openssl

# Set working directory
WORKDIR /build

# Copy entire repository
COPY . .

# Install all dependencies and build everything
RUN pnpm install --frozen-lockfile && \
pnpm build

# Production stage

FROM denoland/deno:alpine
RUN apk add --no-cache npm

# Add non-root user
RUN addgroup -g 1001 -S nodejs && adduser -S nodejs -u 1001

# Set working directory
WORKDIR /app

# Copy the built mcp-server preserving directory structure
COPY --from=builder /build/packages/mcp-server/dist ./packages/mcp-server/dist
COPY --from=builder /build/packages/mcp-server/node_modules ./packages/mcp-server/node_modules

# Copy node_modules from root (pnpm hoists dependencies here)
COPY --from=builder /build/node_modules ./node_modules

# Copy the built inboundemail into node_modules
COPY --from=builder /build/dist ./node_modules/inboundemail

# Change ownership to nodejs user
RUN chown -R nodejs:nodejs /app

# Switch to non-root user
USER nodejs

# The MCP server uses stdio transport by default
# No exposed ports needed for stdio communication

# This is needed for node to run on the deno:alpine image.
# See <https://github.com/denoland/deno_docker/issues/373>.
ENV LD_LIBRARY_PATH=/usr/lib:/usr/local/lib

# Set the entrypoint to the MCP server
ENTRYPOINT ["node", "packages/mcp-server/dist/index.js"]

# Allow passing arguments to the MCP server
CMD []
74 changes: 4 additions & 70 deletions packages/mcp-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ The following tools are available in this MCP server.

### Resource `domains`:

- `create_domains` (`write`): Add a new domain for email receiving. Automatically initiates SES verification and returns required DNS records. Subdomains inherit verification from their verified parent domain.
- `retrieve_domains` (`read`): Get detailed information about a specific domain including DNS records. Use `?check=true` for live DNS and SES verification.
- `create_domains` (`write`): Add a new domain for email receiving. Automatically initiates verification and returns required DNS records. Subdomains inherit verification from their verified parent domain.
- `retrieve_domains` (`read`): Get detailed information about a specific domain including DNS records. Use `?check=true` for a live verification check.
- `update_domains` (`write`): Update catch-all email settings for a domain. Catch-all receives emails sent to any address on your domain. Domain must be verified first.
- `list_domains` (`read`): Get paginated list of domains for authenticated user with optional filtering.
- `delete_domains` (`write`): Delete a domain and all associated resources including email addresses, DNS records, and SES configurations. Root domains with subdomains must have subdomains deleted first.
Expand All @@ -263,48 +263,16 @@ The following tools are available in this MCP server.

### Resource `email_addresses`:

- `create_email_addresses` (`write`): Create a new email address for an authenticated user's domain. Automatically configures AWS SES receipt rules.
- `create_email_addresses` (`write`): Create a new email address for an authenticated user's domain, optionally routing to a webhook or endpoint.
- `retrieve_email_addresses` (`read`): Get a specific email address by ID with detailed information including routing configuration
- `update_email_addresses` (`write`): Update an email address's routing (endpoint/webhook) or active status. Cannot have both endpoint and webhook.
- `list_email_addresses` (`read`): Get paginated list of email addresses for authenticated user with optional filtering by domain, active status, and receipt rule configuration
- `delete_email_addresses` (`write`): Delete an email address and clean up associated SES receipt rules. Returns cleanup status.
- `delete_email_addresses` (`write`): Delete an email address. Returns cleanup status.

### Resource `emails`:

- `retrieve_emails` (`read`): Retrieve a single email by ID. Works for sent, received, and scheduled emails.
- `list_emails` (`read`): List all email activity (sent, received, and scheduled) with comprehensive filtering options.

**Type Filtering:**

- `all` - Returns sent, received, and scheduled emails combined (default)
- `sent` - Only outbound emails you've sent
- `received` - Only inbound emails you've received
- `scheduled` - Only emails scheduled for future delivery

**Status Filtering:**

- `delivered` - Successfully delivered emails
- `pending` - Emails currently being processed
- `failed` - Emails that failed to deliver
- `bounced` - Emails that bounced (sent only)
- `scheduled` - Emails scheduled for future delivery
- `cancelled` - Cancelled scheduled emails
- `unread` - Unread received emails
- `read` - Read received emails
- `archived` - Archived received emails

**Time Range Filtering:**

- `1h` - Last hour
- `24h` - Last 24 hours
- `7d` - Last 7 days
- `30d` - Last 30 days (default)
- `90d` - Last 90 days
- `all` - All time

**Address Filtering:**
Supports filtering by domain ID, domain name, address ID, or raw email address (e.g., '[email protected]').

- `delete_emails` (`write`): Cancel a scheduled email by ID. Only works for emails that haven't been sent yet.
- `reply_emails` (`write`): Reply to an email or thread. Accepts either an email ID or thread ID (replies to latest message in thread). Supports reply all functionality.
- `retry_emails` (`write`): Retry delivery of a received email. Can retry to a specific endpoint, retry a specific failed delivery, or retry to all configured endpoints.
Expand All @@ -325,44 +293,10 @@ The following tools are available in this MCP server.
- `inbound` - Emails you received
- `outbound` - Emails you sent (includes delivery status)

**Message Content:**
Each message includes:

- Full body content (text and HTML)
- Sender and recipient information
- Attachments metadata
- Read status and timestamps
- Threading headers (In-Reply-To, References)

**Typical Workflow:**

1. List threads using `GET /mail/threads`
2. User clicks a thread
3. Fetch full thread using this endpoint
4. Display conversation view with all messages

- `list_mail` (`read`): List email threads (conversations) for your inbox with cursor-based pagination. This is the primary endpoint for building an inbox UI.

**What is a Thread?**
A thread groups related emails together based on the In-Reply-To and References headers, similar to how Gmail groups conversations. Each thread contains both inbound (received) and outbound (sent) messages.

**Filtering:**

- `domain` - Filter by domain ID or name (e.g., 'example.com'). Returns threads where any participant matches the domain.
- `address` - Filter by email address (e.g., '[email protected]'). Returns threads where the address is a participant.
- `search` - Search in subject lines and participant emails.
- `unread` - Set to 'true' to only return threads with unread messages.

**Pagination:**
Uses cursor-based pagination for efficient infinite scroll. Pass `pagination.next_cursor` from the response as the `cursor` parameter to get the next page.

**Response:**
Each thread includes:

- Thread metadata (subject, participants, message count)
- `latest_message` - Preview of the most recent message (inbound or outbound)
- `has_unread` - Whether there are unread inbound messages
- `unread_count` - Number of unread messages

**Use with /mail/threads/:id:**
Use this endpoint to list threads, then use `GET /mail/threads/:id` to fetch all messages in a specific thread.
2 changes: 1 addition & 1 deletion packages/mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "inbound-docs-mcp",
"version": "0.19.0",
"version": "0.20.0",
"description": "The official MCP Server for the Inbound API",
"author": "Inbound <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions packages/mcp-server/src/code-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export async function codeTool() {
},
body: JSON.stringify({
project_name: 'inbound',
client_opts: {},
code,
}),
});
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const newMcpServer = () =>
new McpServer(
{
name: 'inboundemail_api',
version: '0.19.0',
version: '0.20.0',
},
{ capabilities: { tools: {}, logging: {} } },
);
Expand Down
Loading
Loading