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,050 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,050 This file is loaded in full into every session.
When invoked 1,050 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.01050 $0.01050
Opus 5 $0.00525 $0.00525
Sonnet 5 $0.00210 $0.00210
Haiku 4.5 $0.00105 $0.00105

Measured 10d ago against content hash 0af66a3288fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 10d 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.pySettings (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.pyAPIError 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.pyFastMCP app entrypoint (stdio or sse transport)
  • 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. 10d 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 (5 stars, last pushed 12d ago), licensed MIT. It adds 1,050 tokens to every session, about $0.0052 per session on Opus 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

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens