oshaani MCP Marketplace
Sign in

← Documentation

Outlook MCP Email

Read, search and triage emails in a Microsoft 365 / Outlook mailbox, draft replies and (optionally) send email.

1 credits / tool call

Quick start

  1. Add a Outlook connection with the settings below, then click Test configuration.
  2. Create an API key for your agent.
  3. Paste the key below, click Test endpoint, and copy the configuration for your platform.
Endpointhttps://market.oshaani.com/outlook (your default connection) or https://market.oshaani.com/outlook/<connection-id>
TransportStreamable HTTP (stateless, JSON responses). MCP protocol versions 2024-11-05 to 2025-11-25 and 2026-07-28.
AuthenticationAuthorization: Bearer <API key>, using a key from the API keys page.

Agent configuration

The default URL uses your organisation's default Outlook connection; a URL with an ID pins one connection.
Get a key
The key is filled into the snippets below. It stays in this page and is only sent with the test request.
Runs initialize and tools/list against the endpoint, exactly like an agent. No credits are charged.

Any MCP client that supports remote (Streamable HTTP) servers with custom headers.

{
  "name": "outlook",
  "transport": "streamable-http",
  "url": "https://market.oshaani.com/outlook",
  "headers": {
    "Authorization": "Bearer YOUR_API_KEY"
  }
}

Connection settings

Entered once per connection on market.oshaani.com. Secrets are encrypted and never shown again or sent to agents.

SettingTypeDescription
Directory (tenant) ID
tenant_id required
string
pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Application (client) ID
client_id required
string
pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Client secret
client_secret required secret
string App registration > Certificates & secrets
Mailbox
mailbox required
string The mailbox this connection works on, e.g. sales@contoso.com
pattern ^[^@\s/\\]+@[^@\s/\\]+\.[^@\s/\\]+$
Allow drafting, marking as read and moving emails
allow_write_actions
boolean
default false
Needs the Mail.ReadWrite application permission
Allow sending emails and replies
allow_sending
boolean
default false
Needs the Mail.Send application permission. Off by default: agents can only read until this is enabled.
Allowed recipient domains
allowed_recipient_domains
string Comma-separated, e.g. contoso.com,partner.com. Sending to any other domain is refused. Leave empty to allow any.

Tools (10)

list_folders read-only

List mail folders with unread and total counts

No arguments.

list_messages read-only

List emails in a folder, newest first, optionally only unread, from a sender or since a date

ArgumentTypeDescription
folder string
default "inbox"
Folder ID, or a well-known name: inbox, sentitems, drafts, archive, deleteditems, junkemail
pattern ^[A-Za-z0-9=_+\-]{1,400}$
unread_only boolean
default false
from_address string Only emails from this address
pattern ^[^@\s/\\]+@[^@\s/\\]+\.[^@\s/\\]+$
since string (date) Only emails received on or after this date (UTC)
top integer
default 25
Number of messages (max 100)
min 1, max 100
skip integer
default 0

min 0

search_messages read-only

Search the whole mailbox with keywords or KQL, e.g. 'invoice from:billing@acme.com'

ArgumentTypeDescription
query required string
min length 1, max length 500
top integer
default 25
Number of messages (max 100)
min 1, max 100

get_message read-only

Read an email: sender, recipients, plain-text body and attachment list

ArgumentTypeDescription
message_id required string Message ID from list_messages or search_messages
pattern ^[A-Za-z0-9=_+\-/]{10,400}$
max_body_chars integer
default 20000

min 200, max 100000

get_attachment read-only

Read a text attachment (txt, csv, json, xml...) of an email

ArgumentTypeDescription
message_id required string Message ID from list_messages or search_messages
pattern ^[A-Za-z0-9=_+\-/]{10,400}$
attachment_id required string
pattern ^[A-Za-z0-9=_+\-/]{10,800}$
max_chars integer
default 50000

min 200, max 200000

create_draft

Save a draft email in the Drafts folder for a person to review and send

ArgumentTypeDescription
to required array of string
subject required string
min length 1, max length 255
body required string
max length 200000
cc array of string
body_type "text" | "html"
default "text"

send_email destructive

Send an email from the mailbox

ArgumentTypeDescription
to required array of string
subject required string
min length 1, max length 255
body required string
max length 200000
cc array of string
bcc array of string
body_type "text" | "html"
default "text"

reply_to_message destructive

Reply to an email (or reply all), quoting the original

ArgumentTypeDescription
message_id required string Message ID from list_messages or search_messages
pattern ^[A-Za-z0-9=_+\-/]{10,400}$
comment required string Reply text placed above the quoted original
min length 1, max length 200000
reply_all boolean
default false

mark_as_read

Mark an email as read or unread

ArgumentTypeDescription
message_id required string Message ID from list_messages or search_messages
pattern ^[A-Za-z0-9=_+\-/]{10,400}$
is_read boolean
default true

move_message

Move an email to another folder, e.g. archive or deleteditems

ArgumentTypeDescription
message_id required string Message ID from list_messages or search_messages
pattern ^[A-Za-z0-9=_+\-/]{10,400}$
destination_folder required string Folder ID, or a well-known name: inbox, sentitems, drafts, archive, deleteditems, junkemail
pattern ^[A-Za-z0-9=_+\-]{1,400}$

Billing & errors

Each successful tool call costs 1 oshaani.com credit. initialize, tools/list, failed calls and timeouts are free.

JSON-RPC codeMeaning
-32054 (HTTP 401)Missing, unknown or revoked API key
-32053 (HTTP 404)No Outlook connection configured for your organisation, or the connection ID is wrong
-32055 (HTTP 403)Connection disabled or origin not allowed
-32052 (HTTP 429)Rate limit reached; retry after a minute
-32050Not enough oshaani.com credits for the call
-32051Billing temporarily unavailable; the call was not run

Errors from Outlook itself (bad IDs, permissions) come back as tool results with isError: true so the agent can read and correct them. See the Outlook API documentation.