Cursor
Integrate AgentPost email operations into your Cursor AI coding workflow
Cursor is an AI-powered code editor that supports MCP servers for extending its capabilities. By connecting the AgentPost MCP server, Cursor can manage email directly within your coding environment -- useful for agents that need email integration or for managing project communications.
Setup
1. Install the MCP server
npm install -g @agentpost/mcp-server2. Configure Cursor
Open Cursor's MCP configuration. Navigate to Settings > MCP Servers and add a new server:
Name: agentpost
Command: npx
Args: @agentpost/mcp-server
Or edit the configuration file directly at ~/.cursor/mcp.json:
{
"mcpServers": {
"agentpost": {
"command": "npx",
"args": ["@agentpost/mcp-server"],
"env": {
"AGENTPOST_API_KEY": "ap_sk_your_api_key_here"
}
}
}
}3. Restart Cursor
After saving the configuration, restart Cursor to load the MCP server. The AgentPost tools will be available in Cursor's AI chat.
Example workflows
Email-driven development
Use Cursor to build email integration features while testing them live:
> Create a test inbox for my e-commerce notification system.
> Send a test order confirmation email to [email protected] with
the HTML template I just wrote in src/templates/order-confirmation.html.
> Check if the test email was received and show me the rendered content.Bug report via email
Let Cursor help you send structured bug reports to your team:
> The test in src/api/__tests__/auth.test.ts is failing.
> Create a bug report email to [email protected] with the
test name, error output, and relevant code context. Include
the stack trace as a code block in the HTML body.Code review notifications
Automate email notifications for code review workflows:
> Send an email to the team at [email protected] notifying
them that the authentication refactor PR is ready for review.
Include a summary of the changes I made in the last 5 commits.API integration testing
Test your email API integration without leaving the editor:
> List all inboxes and show me which ones have unread messages.
> Get the latest message in the support inbox and show me
the extracted_text field.
> Reply to that message with "Looking into this now. Will update
within the hour."Environment variables
| Variable | Required | Description |
|---|---|---|
AGENTPOST_API_KEY | Yes | Your AgentPost API key (ap_sk_...) |
AGENTPOST_BASE_URL | No | Custom API base URL for self-hosted instances |
Available operations
All MCP server tools are available in Cursor, including inbox management, message operations, thread management, drafts, labels, attachments, and domain management.
Tips
- Cursor's AI chat can combine AgentPost operations with code editing in a single conversation
- Use project-level MCP configuration to share the AgentPost connection with collaborators
- For testing email templates, have Cursor send the HTML and then check the received message to verify rendering
- Create test inboxes for development and staging environments to avoid sending to real addresses
- Keep API key scopes minimal -- Cursor only needs the permissions your workflow requires