mcp-safari: Instructions file for Claude Code

CLAUDE.md

mcp-safari CLAUDE.md is an instructions file for Claude Code from axivo/mcp-safari. It costs 3,851 tokens per session, scanned A, original, BSD-3-Clause.

A set of Claude Code instructions for a Safari automation server from axivo/mcp-safari. The instructions describe the project structure, its collaborator, preferences, and how the server communicates with Safari.

In plain words
What is it for?
Guiding work on an MCP server that controls the user's Safari session through Apple Events, using the project's architecture and preferences.
Why use it?
They give the coding agent project-specific context so it can work consistently with the existing design and expectations.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions Claude Code.

This is axivo/mcp-safari's own configuration. It tells Claude Code how to work on mcp-safari 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-safari configures →

Reuse

Borrowing it

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

Made for: Claude Code.

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-safari CLAUDE.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/axivo/mcp-safari/claude-md"><img src="https://agentmods.dev/badge/instructions/axivo/mcp-safari/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,851 This file is loaded in full into every session.
When invoked 3,851 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.03851 $0.03851
Opus 5 $0.01925 $0.01925
Sonnet 5 $0.00770 $0.00770
Haiku 4.5 $0.00385 $0.00385

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

Security

Grade A, and why

mcp-safari CLAUDE.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.

CLAUDE.md · 177 lines

How it starts

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

Project Instructions

A MCP (Model Context Protocol) server bridging Safari with Claude agents. Published to npm as @axivo/mcp-safari and consumed by MCP-capable hosts (Claude Code, Claude Desktop) via stdio transport.

Collaborator

  • Name: Floren Munteanu
  • Work: Engineering

Personal Preferences

I'm a site reliability engineer specialized in:

  • Advanced GitHub actions based on JS code
  • Helm charts
  • IaC for Kubernetes clusters
  • Next.js/Nextra static websites

Architecture

A small TypeScript server that translates MCP tool calls into Safari automation. There is no daemon, no listening socket, no HTTP server - the host (e.g., Claude Code) spawns the server as a child process, communicates over stdio, and tears it down when the host exits. The server controls the user's actual Safari session through Apple Events (AppleScript and JXA), so cookies, login state, and browsing history are preserved across calls.

The server's job is small and focused: accept a tool call from the host, drive Safari to perform it, return a structured response. No state is persisted across server restarts. There is no authentication layer between host and server because there is no transport-level access - whoever controls the MCP client controls the server entirely. Security relies on the host enforcing tool boundaries and on the user trusting the MCP client they configure.

Directory Tree

.
├── package.json                          npm metadata, runtime deps: @modelcontextprotocol/sdk, sharp, zod
├── tsconfig.json                         strict TypeScript, ES2022 target, NodeNext modules, DOM lib for browser-side scripts
├── CHANGELOG.md                          Keep a Changelog format, semver
├── README.md                             user-facing install + tool reference
├── SECURITY.md                           threat model, supply-chain integrity policy
├── LICENSE                               BSD-3-Clause
├── .github/
│   ├── workflows/package.yml             trusted-publish to npm on `v*` tag push (no PAT, OIDC provenance)
│   ├── renovate.json5                    dependency dashboard config
│   └── pull_request_template.md
├── .vscode/
│   ├── settings.json                     editor formatting, 2-space indent, format-on-save
│   └── extensions.json                   recommended extensions
└── src/
    ├── index.ts                          entry point - stdio transport + Mcp class instantiation, EPIPE handling
    ├── server/
    │   ├── mcp.ts                        Mcp class - registers tools via McpServer.registerTool, owns dispatch
    │   ├── tool.ts                       McpTool class - tool definitions (Zod input/output schemas, _meta.usage, annotations)
    │   └── client.ts                     Client class - working tab capture, act/observe target dispatch, AppleScript/JXA invocation, response normalization
    └── lib/
        ├── automation.ts                 Automation class - AppleScript template strings parsed into a Map at construction
        └── browser.ts                    Browser class - JavaScript scripts (function bodies serialized via fn.toString()) for `do JavaScript` execution

Read the full file on GitHub · 177 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 · 177 lines · 3,851 tokens per session scan A 9cdad1d19d59

Subscribe to this mod's changes

mcp-safari CLAUDE.md is an instructions file published in the GitHub repository axivo/mcp-safari (0 stars, last pushed 1mo ago), licensed BSD-3-Clause. It adds 3,851 tokens to every session, about $0.0193 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