# Nylas MCP

> Nylas lets your AI agent handle all communication data—emails, calendars, and contacts—across every provider you use (Gmail, Outlook, etc.). It wraps up a whole mess of APIs into one point. You can read your inbox using `list_messages`, block out time with `create_event`, or add new people to your address book via `create_contact`. Stop switching between apps; manage everything through a single interaction.

## Overview
- **Category:** talk-to-me
- **Price:** Free
- **Tags:** email-api, calendar-sync, unified-api, contact-management, inbox-automation, message-parsing

## Description

You'll connect this server directly to your AI agent so it can handle every bit of communication data—emails, calendar stuff, and contacts—no matter where those things live. This wraps up a whole mess of separate APIs into one spot you can point your agent at. You don't gotta switch between five different apps; you just manage everything through a single interaction with your AI client.

**Managing Your Inbox:**
You can pull a unified stream of every message, both incoming and outgoing, using **`list_messages`**. If you wanna check out what's in specific folders or see which labels are set up, call **`list_folders`**. You can also peep at all the unsent threads sitting in your drafts folder by running **`list_drafts`**. When it comes to sending mail, you just tell the agent to use **`send_message`**, and it sends an outbound email straight from the native mail provider.

**Handling Your Schedule:**
To see what meetings are already on the books, your agent runs **`list_events`**, which pulls all scheduled appointments tied to a specific calendar UUID. Before scheduling anything, you'll first need to know what calendars are connected; run **`list_calendars`** for that list of available sources and their UUIDs. You can book new time slots instantly by invoking **`create_event`**. And if an appointment gets canceled or needs clearing out, the agent handles it with **`delete_event`**, removing a specific existing meeting from your calendar provider.

**Keeping Your Address Book Current:**
The server lets you read every contact record linked to your account by calling **`list_contacts`**. If you meet someone new and need to save them, the agent adds a brand-new person's record right into your address book using **`create_contact`**.

This setup means that when your AI client needs data—whether it's checking for open slots in your calendar or reading an old email from last year—it just hits this single endpoint. The agent executes the appropriate tool call, like asking for all events via **`list_events`**, and immediately gets structured data back. It’s everything you need to manage communication without leaving the chat window.

## Tools

### list_calendars
Returns a list of all user calendars connected to the system, providing necessary UUIDs for scheduling queries.

### list_events
Pulls all scheduled events mapped inside a specific calendar's UUID.

### create_event
Books and synchronizes a new meeting event on your calendar.

### delete_event
Removes a specific, existing appointment from your calendar provider.

### list_messages
Retrieves a unified stream of all incoming and outgoing messages for your connected accounts.

### send_message
Sends an outbound email using the native mail provider directly from the agent.

### list_contacts
Retrieves a comprehensive list of all address book contacts linked to your account.

### create_contact
Adds a brand new person's record to your address book.

### list_folders
Enumerates the organizational directories or labels within your email account.

### list_drafts
Dumps the unsent email threads that are currently parked in your drafts folder.

## Prompt Examples

**Prompt:** 
```
Check my inbox for any emails received today with the subject 'Invoice'.
```

**Response:** 
```
I've fetched your latest messages and found 2 emails containing 'Invoice' received today. Would you like me to summarize the billing amounts?
```

**Prompt:** 
```
Schedule a 30-minute sync at 2 PM tomorrow titled 'Q3 Execution Strategy'.
```

**Response:** 
```
Your calendar event 'Q3 Execution Strategy' is now scheduled for tomorrow at 2:00 PM successfully.
```

**Prompt:** 
```
Find Robert's email address by listing my contacts.
```

**Response:** 
```
I checked your Nylas contact directory. Robert's formal email address is `robert.smith@domain.com`. Would you like me to draft a message to him?
```

## Capabilities

### Read and Search Mail
The agent fetches your entire message stream, allowing you to read recent emails or search through specific folders using tools like `list_messages` and `list_folders`.

### Manage Calendar Slots
You can check existing meetings with `list_events`, find all connected calendars via `list_calendars`, and book new time instantly by invoking `create_event`.

### Update Address Book Records
The agent reads your entire contact list (`list_contacts`) or adds brand-new people you meet using the `create_contact` tool.

### Draft and Send Email
It composes and sends outbound emails directly from the system, bypassing manual access to your mail provider via the `send_message` function.

## Use Cases

### Preparing for a Client Call
A user needs to prep for a meeting with Jane Doe. They prompt their agent: 'What's the history and what should I send?' The agent uses `list_messages` to summarize recent emails, checks `list_contacts` for her title, and can then draft and save a follow-up in their drafts using `send_message`.

### Rescheduling a Complex Meeting
A meeting needs to move from three different people with three different calendars. The user asks the agent: 'Find a new slot next week for four people.' The agent runs `list_calendars` and cycles through `list_events` on all accounts before calling `create_event` at the optimal time.

### Onboarding a New Vendor
A new vendor, Robert Smith, is introduced. Instead of manually typing his details, the user asks the agent to 'Save Robert's info and schedule an intro call.' The agent first calls `create_contact` with the data, then uses `list_calendars` to check availability before calling `create_event`.

### Triage After Vacation
The user returns and needs to catch up. They prompt: 'Read my inbox for anything urgent or flagged.' The agent executes `list_messages`, then uses `list_folders` to check the 'Urgent' folder, giving them a prioritized list of actions.

## Benefits

- Eliminate context switching. Instead of opening Gmail for mail, Outlook for calendars, and a CRM for contacts, you tell your AI agent to do it all in one prompt. It handles the cross-provider calls internally.
- Never miss an action item again. Using `list_messages` lets your agent read entire threads—not just subject lines—so you know exactly what needs follow-up before a meeting even starts.
- Stop manual booking conflicts. When you ask to schedule time, the agent uses `list_calendars` and `create_event` to check availability across all linked accounts in seconds, guaranteeing no double bookings.
- Streamline outreach. You don't have to copy-paste addresses. The agent uses `list_contacts` to verify details and then executes `send_message` with the correct formatting.
- Gain a full picture of your communications history. By combining `list_messages`, `list_folders`, and `list_drafts`, you get an audit trail of everything that was ever sent or intended to be sent.

## How It Works

The bottom line is: your AI client doesn't talk to Gmail or Outlook directly; it talks to us, and we handle the connection details for you.

1. First, subscribe to this server and input your Nylas API Key (v3) into the connection setup.
2. Next, you prompt your AI client with a request—for example, 'Schedule 30 minutes next Tuesday.'
3. The agent translates that request into specific tool calls, like `list_calendars` followed by `create_event`, and executes them using this server's APIs.

## Frequently Asked Questions

**How does Nylas MCP Server handle multiple email providers?**
It unifies communication data from every connected provider (Gmail, Outlook) into one stream. You can read messages using `list_messages` regardless of which platform sent them.

**Can I schedule meetings using the Nylas MCP Server?**
Yes. You use the agent to call `create_event`. This tool checks multiple calendars via `list_calendars` before booking time, preventing double bookings automatically.

**Do I need to use list_contacts before creating a contact?**
No. If you are adding a brand new person, you just invoke `create_contact`. You only run `list_contacts` if you want to see the current directory contents.

**What is the difference between list_messages and list_folders?**
`list_messages` gives a unified stream of all mail, while `list_folders` lets your agent enumerate specific organizational directories or labels within your inbox structure.

**If I call `send_message`, what security protocols govern the outbound transmission?**
The connection uses industry-standard OAuth 2.0 authentication for all transmissions. Your API key is never exposed; communications are routed through secure, encrypted endpoints to your native mail provider.

**When I use `create_event`, how does the system handle scheduling conflicts?**
The server checks availability against existing events before creating anything. If a time slot is booked or unavailable, it returns an explicit conflict error code, allowing your agent to prompt for alternative times.

**What specific metadata does `list_messages` provide beyond just the subject line?**
`list_messages` pulls sender details, total recipients, and message timestamps. It also flags if attachments are present, letting your agent know immediately if file parsing is necessary.

**How often does `list_contacts` update its data to reflect changes in the directory?**
The contact list syncs near real-time. While we can't guarantee instant updates, repeated calls to `list_contacts` ensure your agent is working with the most current available directory information.

**Can my AI draft and actually send emails natively?**
Yes! Provide the recipient, subject, and prompt your agent on what the body should look like. The agent leverages the `send_message` tool interacting directly through the Nylas provider, and your real account will dispatch the email in seconds.

**How can I check if I have upcoming meeting clashes?**
Your agent queries your complete agenda using the `list_events` tool. Describe your timeframe, and the AI will scan down the returned events, identifying overlapping blocks or showing you pure free space availability.

**Will the agent read my historical email archives?**
When using `list_messages`, the agent fetches paginated incoming boxes. You can search directly by providing queries within the prompt, letting the agent fetch and summarize the content of past conversation threads effectively.