mcp-modal: Instructions file for Claude Code

CLAUDE.md

mcp-modal CLAUDE.md is an instructions file for Claude Code from george-bobby/mcp-modal. It costs 2,983 tokens per session, scanned A, original, MIT.

Project instructions for mcp-modal, a local server with tools for managing and running Modal cloud applications. Modal is a service for deploying and running code in the cloud.

In plain words
What is it for?
Use them when developing, building, running, or checking the mcp-modal server and its Modal command handling.
Why use it?
They document setup, commands, credential requirements, and how to verify changes when no automated test suite is available.

Instructions file for Claude Code

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

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

Reuse

Borrowing it

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/george-bobby/mcp-modal/claude-md.svg)](https://agentmods.dev/instructions/george-bobby/mcp-modal/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/george-bobby/mcp-modal/claude-md"><img src="https://agentmods.dev/badge/instructions/george-bobby/mcp-modal/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,983 This file is loaded in full into every session.
When invoked 2,983 The same file — it is already loaded in full.
Security scan A 1 finding. 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.02983 $0.02983
Opus 5 $0.01491 $0.01491
Sonnet 5 $0.00597 $0.00597
Haiku 4.5 $0.00298 $0.00298

Measured 3d ago against content hash 57fdec1e60e5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

mcp-modal CLAUDE.md scanned grade A with 1 finding 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 3d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- `run_modal_command` — blocking `subprocess.run(check=True)`. Use for commands that terminate on their own (list, create, delete, history, rollback, …).
CLAUDE.md · 132 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project

mcp-modal is an MCP (Model Context Protocol) server that exposes 12 tools and 4 prompts for managing Modal (apps, containers, volumes, secrets) and for deploying/running Modal apps. It is published to PyPI as mcp-modal and is meant to be launched by MCP clients via uvx mcp-modal.

Common commands

# Install/sync deps (creates .venv/)
uv sync

# Run the server locally (stdio transport — for testing it speaks MCP)
uv run mcp-modal

# Build the wheel/sdist (hatchling backend)
uv build

# Smoke-test against a real Modal account — the server shells out to the local
# `modal` CLI, so credentials must already be configured:
modal setup            # one-time login → ~/.modal.toml
modal profile current  # verify which workspace you're using

There is no test suite, linter config, or CI in this repo. Don't claim a change is verified by tests — exercise it by running the server against a real Modal account, or by inspecting the constructed CLI commands in the returned command field.

Architecture

The whole server is one file: src/mcp_modal/server.py (~1900 lines, 12 @mcp.tool() functions plus 4 @mcp.prompt() functions). Everything else is packaging.

Tool grouping (why there are 12 tools, not 28)

Every tool schema is loaded into the client's context for the entire session, so the tool surface is a standing token cost and a standing "which of these near-identical tools do I want?" problem for the model. Related CLI subcommands are therefore grouped behind an action/resource argument:

  • list_modal_resources(resource=...) — every read-only lookup (apps, app_history, containers, volumes, volume_files, secrets, environments, profile).
  • manage_modal_app (stop/rollback), manage_modal_container (exec/stop), manage_modal_volume (create/delete/rename), modal_volume_files (put/get/cp/rm), manage_modal_secret (create/delete).
  • deploy_modal_app, run_modal_app, get_modal_logs, search_modal_logs, analyze_modal_costs, inspect_modal_secret keep their own tools — distinct enough that folding them in would only make the schemas harder to read.

Read the full file on GitHub · 132 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. 3d ago Changed · +48 lines · +1,591 tokens per session 57fdec1e60e5
  2. 7d ago First seen · 84 lines · 1,392 tokens per session scan A 34206ab5b165

Subscribe to this mod's changes

mcp-modal CLAUDE.md is an instructions file published in the GitHub repository george-bobby/mcp-modal (2 stars, last pushed 4d ago), licensed MIT. It adds 2,983 tokens to every session, about $0.0149 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.