### Development commands Source: https://github.com/agentmail-to/agentmail-mcp/blob/main/README.md Common pnpm commands for installing dependencies, building, testing, and checking the contract. ```sh pnpm install pnpm build pnpm test pnpm check:contract ``` -------------------------------- ### Run AgentMail MCP with uvx Source: https://github.com/agentmail-to/agentmail-mcp/blob/main/python/stdio-bridge/README.md Run the AgentMail MCP stdio bridge using uvx. Requires the AGENTMAIL_API_KEY environment variable. The command starts the bridge, which connects to the hosted MCP server at https://mcp.agentmail.to/mcp. ```bash AGENTMAIL_API_KEY=... uvx agentmail-mcp ``` -------------------------------- ### Run Python bridge with uvx Source: https://github.com/agentmail-to/agentmail-mcp/blob/main/docs/compatibility.md Use this command to run the AgentMail MCP Python bridge with a normal install or isolated runner. It supports stdio-only clients and dynamically discovers tools. ```sh uvx agentmail-mcp ``` -------------------------------- ### Send local file attachment via tool call Source: https://github.com/agentmail-to/agentmail-mcp/blob/main/packages/npm-stdio-bridge/README.md Example tool call that uses a local path for an attachment. The bridge reads and base64-encodes the file locally, keeping bytes out of the model's tool arguments. Paths must resolve inside the configured file root; symlinks cannot escape it. Hidden files and directories are denied, and the combined decoded-size limit is 6 MiB. ```json { "inboxId": "sender@agentmail.to", "to": ["recipient@example.com"], "subject": "Document", "attachments": [ { "path": "documents/report.pdf", "contentType": "application/pdf" } ] } ``` -------------------------------- ### Check OAuth configuration with pnpm check:oauth-config Source: https://github.com/agentmail-to/agentmail-mcp/blob/main/docs/operations.md Run this command to verify the Clerk OAuth configuration without making changes. Requires the CLERK_SECRET_KEY environment variable set to a live secret key. ```bash CLERK_SECRET_KEY=sk_live_... pnpm check:oauth-config ``` -------------------------------- ### Dispatch PyPI publish workflow manually Source: https://github.com/agentmail-to/agentmail-mcp/blob/main/docs/release.md Use this GitHub CLI command to run the publish-pypi.yml workflow out of band on the main branch. After it succeeds, verify the registry artifact with uvx. ```sh gh workflow run publish-pypi.yml --ref main ``` -------------------------------- ### Node stdio bridge configuration (mcpServers) Source: https://github.com/agentmail-to/agentmail-mcp/blob/main/README.md JSON configuration for using the npm bridge with existing Node MCP clients. Requires an AgentMail API key in the AGENTMAIL_API_KEY environment variable. ```json { "mcpServers": { "AgentMail": { "command": "npx", "args": ["-y", "agentmail-mcp"], "env": { "AGENTMAIL_API_KEY": "YOUR_API_KEY" } } } } ``` -------------------------------- ### Configure agentmail-mcp with --file-root for local attachments Source: https://github.com/agentmail-to/agentmail-mcp/blob/main/packages/npm-stdio-bridge/README.md JSON configuration for the bridge with the --file-root flag to enable local file attachments. The file root must be an absolute path. This configuration is required for attachment-capable tools to accept a local path. ```json { "mcpServers": { "agentmail": { "command": "npx", "args": ["-y", "agentmail-mcp", "--file-root", "/absolute/path/to/project"], "env": { "AGENTMAIL_API_KEY": "your-api-key" } } } } ``` -------------------------------- ### Python stdio bridge command Source: https://github.com/agentmail-to/agentmail-mcp/blob/main/README.md Command to run the native Python bridge via uvx. Requires the AGENTMAIL_API_KEY environment variable. ```sh AGENTMAIL_API_KEY=YOUR_API_KEY uvx agentmail-mcp ``` -------------------------------- ### Run npm bridge with npx Source: https://github.com/agentmail-to/agentmail-mcp/blob/main/docs/compatibility.md Use this command to run the AgentMail MCP npm bridge with an existing Node configuration. It supports stdio-only clients and dynamically discovers tools. ```sh npx -y agentmail-mcp ``` -------------------------------- ### Configure agentmail-mcp in MCP client Source: https://github.com/agentmail-to/agentmail-mcp/blob/main/packages/npm-stdio-bridge/README.md JSON configuration for an MCP client to use agentmail-mcp as a stdio server. Requires an AGENTMAIL_API_KEY environment variable. The API key is sent to the hosted server as x-api-key and never written to stdout. ```json { "mcpServers": { "AgentMail": { "command": "npx", "args": ["-y", "agentmail-mcp"], "env": { "AGENTMAIL_API_KEY": "YOUR_API_KEY" } } } } ``` -------------------------------- ### Configure npm trusted publisher for agentmail-mcp Source: https://github.com/agentmail-to/agentmail-mcp/blob/main/docs/release.md Use this npm CLI command to configure the trusted publisher for the agentmail-mcp package. Requires npm CLI 11.15.0 or newer. The command specifies the workflow file, repository, and allows publishing. ```sh npm trust github agentmail-mcp --file publish-npm.yml --repo agentmail-to/agentmail-mcp --allow-publish -y ``` -------------------------------- ### Hosted MCP endpoint URL Source: https://github.com/agentmail-to/agentmail-mcp/blob/main/README.md The Streamable HTTP endpoint for the hosted AgentMail MCP server. Use this URL when your client supports remote MCP. ```text https://mcp.agentmail.to/mcp ```