outlook-ews-mcp: Instructions file for Codex

AGENTS.md

outlook-ews-mcp AGENTS.md is an instructions file for Codex, OpenCode from viartemev/outlook-ews-mcp. It costs 1,073 tokens per session, scanned A, original, MIT.

Engineering guidance for an MCP server that exposes on-premises Microsoft Exchange through Exchange Web Services, the interface used to access mail, calendars, and contacts. It describes project structure, preferred libraries, and rules for solving bugs and making changes.

In plain words
What is it for?
Use it when changing email, calendar, contact, authentication, configuration, or MCP behavior in the outlook-ews-mcp project.
Why use it?
It gives coding agents a clear way to work with the server without adding unnecessary abstractions or preserving compatibility that the beta project does not require. It also points them toward the existing components for authentication and Exchange access.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is viartemev/outlook-ews-mcp's own configuration. It tells Codex and OpenCode how to work on outlook-ews-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything outlook-ews-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to viartemev/outlook-ews-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/viartemev/outlook-ews-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/viartemev/outlook-ews-mcp

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for outlook-ews-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/viartemev/outlook-ews-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/viartemev/outlook-ews-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/viartemev/outlook-ews-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/viartemev/outlook-ews-mcp/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for outlook-ews-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/viartemev/outlook-ews-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/viartemev/outlook-ews-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,073 This file is loaded in full into every session.
When invoked 1,073 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01073 $0.01073
Opus 5.5 $0.00429 $0.00429
Sonnet 5.5 $0.00215 $0.00215
Haiku 4.5 $0.00107 $0.00107

Measured 8d ago against content hash 6230af4b2d62, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

outlook-ews-mcp AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 36 lines

How it starts

The opening of the file, as written. The whole thing — 36 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Engineering rules

  • Do not preserve backward compatibility unless explicitly asked — this is a pre-1.0 beta project, rename/break freely.
  • Choose the simplest implementation that fully meets the current requirements. No speculative abstractions, feature flags, or hooks for hypothetical future needs.
  • Prefer established, well-maintained libraries over custom implementations (e.g. exchangelib, pydantic, mcp — don't hand-roll what they already solve).
  • Fix the root cause, not the symptom. If a bug points at a deeper design issue, say so instead of patching around it.
  • Suggest best practices even if they require refactoring — flag them rather than silently working around bad structure.

Project shape

MCP server exposing on-prem Exchange (EWS) to LLM clients. Source lives under src/outlook_mcp/:

  • config.py — Settings (pydantic-settings, reads .env, EXCHANGE_* / MCP_* env vars)
  • auth.py — NTLM/Basic credential wiring for exchangelib
  • exchange_client/ — the Exchange abstraction, split by domain: base.py (session/TLS setup), backend.py (EWSExchangeBackend, build_default_backend), email.py, calendar.py, contacts.py, protocol.py (ExchangeBackend interface), unconfigured.py (fallback when no credentials), facade.py (ExchangeClient, the single entry point everything else uses)
  • models.py — pydantic request/response models for every MCP tool
  • errors.py — APIError and subclasses (ExchangeUnavailableError, AuthFailedError, ...); .to_dict() feeds MCP isError=true responses
  • tools/ — MCP tool definitions by domain (email.py, calendar.py, contacts.py, system.py), registered via mcp_tools.py
  • server.py — FastMCP app entrypoint (stdio, or streamable-http/sse served via uvicorn behind BearerTokenMiddleware)
  • smoke.py — privacy-safe manual smoke check against a real mailbox (OUTLOOK_MCP_SMOKE_INCLUDE_DATA=true to see real data)

Package/CLI/repo are all outlook-ews-mcp now — outlook-mcp was already taken on PyPI, so the PyPI distribution, the two console scripts, and the GitHub repo itself were renamed to match. The Python import path stays outlook_mcp (unrenamed, and not worth churning across every file).

Read the full file on GitHub · 36 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago Changed · +23 tokens per session 6230af4b2d62
  2. 2mo ago First seen · 36 lines · 1,050 tokens per session scan A 0af66a3288fc

Subscribe to this mod's changes

outlook-ews-mcp AGENTS.md is an instructions file published in the GitHub repository viartemev/outlook-ews-mcp (16 stars, last pushed yesterday), licensed MIT. It adds 1,073 tokens to every session, about $0.0043 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

outlook-ews-mcp AGENTS.md compared with instructions from other repositories

outlook-ews-mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
outlook-ews-mcp AGENTS.mdviartemev/outlook-ews-mcpInstructions file16yesterdayMITA1,073Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode