mcp: Instructions file for Codex

AGENTS.md

mcp AGENTS.md is an instructions file for Codex, OpenCode from appwrite/mcp. It costs 2,785 tokens per session, scanned A, original, MIT.

Repository instructions for an MCP server that exposes Appwrite's API to AI clients. Appwrite is a backend platform, and MCP is a standard way for an AI client to call tools provided by a server.

In plain words
What is it for?
Use them when developing or reviewing the Appwrite MCP server, its HTTP or local transport, OAuth authentication, health checks, telemetry, or API tools.
Why use it?
They explain the server's hosted and self-hosted modes, authentication settings, architecture, and tool responsibilities before code is changed.

Instructions file for CodexOpenCode ✓ vendor

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

This is appwrite/mcp's own configuration. It tells Codex and OpenCode how to work on 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 mcp configures →

About the project

Appwrite MCP is a Model Context Protocol server that exposes Appwrite backend APIs for databases, users, functions, teams, and storage as tools for MCP clients. It is for coding agents and other MCP-enabled clients that need to operate Appwrite projects through authenticated tool calls. The catalogue entries provide instructions and MCP integration for using Appwrite with agents.

appwrite/mcp · 72 stars · on GitHub · appwrite.io

Reuse

Borrowing it

Nothing to install: this file belongs to appwrite/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/appwrite/mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/appwrite/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 mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/appwrite/mcp/agents-md/github.svg)](https://agentmods.dev/instructions/appwrite/mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/appwrite/mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/appwrite/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 mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/appwrite/mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/appwrite/mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,785 This file is loaded in full into every session.
When invoked 2,785 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.02785 $0.02785
Opus 5.5 $0.01114 $0.01114
Sonnet 5.5 $0.00557 $0.00557
Haiku 4.5 $0.00279 $0.00279

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

Security

Grade A, and why

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 2d 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 · 206 lines

How it starts

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

AGENTS.md

Guidance for AI agents and human contributors working in this repository.

What this repo is

mcp-server-appwrite is a Model Context Protocol server for Appwrite. It exposes Appwrite's API to MCP clients as a small set of operator-style tools, supporting two deployments from one codebase:

  • Cloud (hosted HTTP): a Starlette ASGI app that acts as an OAuth 2.1 Resource Server. It validates the client's bearer token and forwards it to the Appwrite REST API. Served primarily at mcp.appwrite.io/, with /mcp also available as a conventional alias.
  • Self-hosted (stdio): runs locally and authenticates with a project API key (APPWRITE_PROJECT_ID, APPWRITE_API_KEY, APPWRITE_ENDPOINT, and optionally APPWRITE_ENVIRONMENT_ID for a project environment).

Python ≥ 3.12, packaged with hatchling, managed with uv.

Architecture

Source lives in src/mcp_server_appwrite/:

File Responsibility
__main__.py / server.py Entry point, CLI args, transport selection (--transport stdio|http), service registration, low-level MCP server.
http_app.py Hosted Streamable-HTTP transport: / plus the /mcp alias, RFC 9728 protected-resource metadata, /healthz.
auth.py OAuth 2.1 resource-server layer — bearer-token validation against the project's Appwrite authorization server.
flags.py Central registry of tester/testing flags (CLI arg + env var per flag). Enabling and testing them is documented in docs/flags.md.
service.py Service base class: introspects an Appwrite SDK service and turns its methods into MCP tool definitions.
tool_manager.py Registry of all services and their generated tools.
operator.py The compact "operator" surface — appwrite_search_tools, appwrite_call_tool / appwrite_call_write_tool, tool annotations, result/resource storage, write confirmation.
instructions.py serverInfo.description and the server instructions sent on initialize, rendered from assets/instructions.json (a description plus ordered, transport/docs-conditional Markdown sections). Edit the JSON to change the wording; keep the pyproject.toml description in sync (a test enforces it).
context.py appwrite_get_context — workspace summary (project, services, account/org for OAuth, a focused project's environments).
headers.py Per-call request headers: X-Appwrite-Environment (a project environment, next to the project's ID) and X-Appwrite-Reason (why a write is made, validated and percent-encoded as Appwrite expects).
docs_search.py In-process semantic docs search (appwrite_search_docs) over a prebuilt index.
docs_source.py Fetches the published docs (/docs/llms.txt + per-page .md exports on appwrite.io) and chunks them for the index build.
docs_index.py Writes the index artifact deterministically and atomically: page and chunk hashes, reuse of cached chunk vectors, build lock, and the added/changed/removed page report.
events/ MCP Events (behind flags.EVENTS, HTTP only): catalog.py (event catalog), protocol.py (capability, events/list and the subscribe methods), subscriptions.py + webhooks.py (events/subscribe / events/unsubscribe: one managed Appwrite webhook per subscription), envelope.py (subscription state sealed with the mcp-event-subscriptions JWE profile), egress.py + delivery.py (SSRF-safe signed delivery), projection.py + ingress.py (Appwrite webhook ingress at /appwrite/webhooks/{id}), streams.py + bus.py (push delivery: events/stream, behind flags.EVENTS_PUSH, with events routed between replicas over Redis pub/sub). See docs/events.md.
apps/ MCP Apps (behind flags.APPS): protocol.py (the io.modelcontextprotocol/ui extension and per-client gating), views.py (appwrite_show and the view-only appwrite_view_write), resource.py (ui://appwrite/view, served from assets/view.html: plain JavaScript, no build step). See docs/apps.md.
telemetry.py OpenTelemetry metrics layer (OTLP/HTTP). No-op unless an OTLP endpoint is configured and the transport is http.
data/ Committed docs index artifact (docs_index.npz: vectors, chunk map, chunk hashes, embedded meta.json), shipped in the wheel/image.

Read the full file on GitHub · 206 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. 2d ago Changed · +3 lines · +100 tokens per session f7b5b203854b
  2. 8d ago Changed · +6 lines · +160 tokens per session 0947c52c68e8
  3. 9d ago Changed · +3 lines · +71 tokens per session eabaab51b37e
  4. 22d ago Changed · +1 lines · +67 tokens per session 765bcfe2b910
  5. 24d ago Changed · +2 lines · +79 tokens per session 3860f63040dd
  6. 25d ago Changed · +15 lines · +342 tokens per session 7678a2a01dac
  7. 2mo ago Changed · +2 lines · +90 tokens per session d94f16c8995c
  8. 2mo ago First seen · 174 lines · 1,876 tokens per session scan A 411fcfbeb059

Subscribe to this mod's changes

mcp AGENTS.md is an instructions file published in the GitHub repository appwrite/mcp (72 stars, last pushed yesterday), licensed MIT. It adds 2,785 tokens to every session, about $0.0111 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-30.

Related

mcp AGENTS.md compared with instructions from other repositories

mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mcp AGENTS.mdappwrite/mcpInstructions file72yesterdayMITA2,785Codex, 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