canvas-mcp CLAUDE.md

canvas-mcp CLAUDE.md is an instructions file for coding agents from vishalsachdev/canvas-mcp. It costs 10,262 tokens per session, scanned A, original, MIT.

A repository guide for developers working on Canvas MCP, a server that connects AI tools to Canvas. It explains setup, commands, configuration, and the project’s folder structure.

In plain words
What is it for?
Use it when developing or troubleshooting Canvas MCP, including setting environment variables, starting the server, running tests, and finding its main components.
Why use it?
It gives coding agents the project-specific instructions needed to install, test, configure, and navigate the codebase correctly.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/vishalsachdev/canvas-mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/vishalsachdev/canvas-mcp

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 canvas-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/vishalsachdev/canvas-mcp/claude-md.svg)](https://agentmods.dev/instructions/vishalsachdev/canvas-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/vishalsachdev/canvas-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/vishalsachdev/canvas-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 10,262 This file is loaded in full into every session.
When invoked 10,262 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
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 $0.10262 $0.10262
Opus 5 $0.05131 $0.05131
Sonnet 5 $0.02052 $0.02052
Haiku 4.5 $0.01026 $0.01026

Measured today against content hash 2fcc97c6afd9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

canvas-mcp 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 today.

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.

so in any working config egress falls back to the in-process Node guard, which `child_process`
CLAUDE.md · 473 lines

How it starts

The opening of the file, as written. The whole thing — 473 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.

Note: This guide is for developers working ON the Canvas MCP codebase. If you're an AI agent USING the MCP server, see AGENTS.md instead.

Canvas MCP Development Guide

Environment Setup

  • Install uv package manager: pip install uv
  • Install dependencies: uv pip install -e .
  • Create .env file with CANVAS_API_TOKEN and CANVAS_API_URL
  • Server installed as CLI command: canvas-mcp-server

Commands

  • Start server: canvas-mcp-server (or ./start_canvas_server.sh for legacy setup)
  • Test server: canvas-mcp-server --test
  • View config: canvas-mcp-server --config
  • MCP client config: Update your MCP client's configuration file (e.g., ~/Library/Application Support/Claude/claude_desktop_config.json for Claude Desktop)

Repository Structure

canvas-mcp/
├── src/canvas_mcp/        # Main application code
│   ├── core/             # Core utilities (client, config, validation)
│   ├── tools/            # MCP tool implementations (up to 101 tools across 20 files)
│   ├── resources/        # MCP resources and prompts
│   └── server.py         # FastMCP server entry point
├── skills/               # Agent skills for skills.sh (8 skills)
├── tests/                # 900+ tests (pytest + pytest-asyncio)
├── docs/                 # GitHub Pages site + guides
├── tools/                # Tool documentation (README.md, TOOL_MANIFEST.json)
├── archive/              # Legacy code (git-ignored)
└── .env                  # Configuration (CANVAS_API_TOKEN, CANVAS_API_URL)

Architecture Overview

FastMCP server; type-driven validation via @validate_params; dual-layer course code↔ID caching; flexible identifiers (get_course_id()); ISO-8601 dates. Tools use a List→Details→Content→Analytics progressive-disclosure pattern, grouped by Canvas entity, named {action}_{entity}. All Canvas calls route through make_canvas_request() with async I/O, automatic pagination, and configurable anonymization.

Read the full file on GitHub · 473 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. today Changed · +18 lines · +389 tokens per session 2fcc97c6afd9
  2. 5d ago First seen · 455 lines · 9,873 tokens per session scan A fbc747e69f01

Subscribe to this mod's changes

canvas-mcp CLAUDE.md is an instructions file published in the GitHub repository vishalsachdev/canvas-mcp (228 stars, last pushed today), licensed MIT. It adds 10,262 tokens to every session, about $0.0513 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-30.