inventree-mcp-plugin: Instructions file for Claude Code

CLAUDE.md

inventree-mcp-plugin CLAUDE.md is an instructions file for Claude Code from eljefedelrodeodeljefe/inventree-mcp-plugin. It costs 1,539 tokens per session, scanned A, original, MIT.

Repository instructions for an InvenTree MCP plugin, which connects the InvenTree inventory system to AI assistants through the MCP protocol.

In plain words
What is it for?
Developing, testing, and maintaining the plugin that exposes InvenTree inventory data through authenticated HTTP requests.
Why use it?
They explain the plugin’s Django structure, setup commands, checks, tests, authentication, and integration environment so changes fit the project.

Instructions file for Claude Code

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/eljefedelrodeodeljefe/inventree-mcp-plugin/claude-md"><img src="https://agentmods.dev/badge/instructions/eljefedelrodeodeljefe/inventree-mcp-plugin/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,539 This file is loaded in full into every session.
When invoked 1,539 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.01539 $0.01539
Opus 5 $0.00770 $0.00770
Sonnet 5 $0.00308 $0.00308
Haiku 4.5 $0.00154 $0.00154

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

Security

Grade A, and why

inventree-mcp-plugin 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 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

An `inventree` MCP server is configured in `.mcp.json` and points to the local integration test stack (`http://localhost:8000`). When the stack is running, the following tools are available directly — use them instead of
CLAUDE.md · 123 lines

How it starts

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

CLAUDE.md

Project

MCP (Model Context Protocol) server plugin for InvenTree. Runs inside InvenTree as a Django plugin; exposes inventory data via stateless Streamable HTTP to MCP clients (Claude, etc.).

Commands

# Setup
uv sync --dev
prek install          # install git hooks

# Lint
uv run ruff check .
uv run ruff format --check .
uv run mypy inventree_mcp_plugin

# Unit tests (no InvenTree required — all deps are mocked)
uv run pytest -v

# Integration tests (requires Docker)
./scripts/integration-test.sh up       # start stack, seed data, create MCP users
./scripts/integration-test.sh smoke    # run authenticated end-to-end smoke tests
./scripts/integration-test.sh token    # print mcp-service API token
./scripts/integration-test.sh down     # tear down + delete volumes

Architecture

HTTP request (MCP client)
  → Django URL router
  → MCPView (mcp_transport.py)        — auth check, ASGI scope construction
  → StreamableHTTPSessionManager
  → FastMCP server (mcp_server.py)    — stateless, JSON responses
  → @mcp.tool() functions (tools/)    — Django ORM queries
  → JSON-RPC response

Key files:

File Purpose
inventree_mcp_plugin/core.py Plugin entry point, URL registration, REQUIRE_AUTH setting
inventree_mcp_plugin/mcp_server.py FastMCP instance, imports all tool modules to register them
inventree_mcp_plugin/mcp_transport.py MCPView — bridges Django HTTP ↔ MCP ASGI
inventree_mcp_plugin/tools/simple/ One module per domain (parts, stock, locations, categories, orders, bom, builds)
inventree_mcp_plugin/tools/combinatory/ Tools that compose multiple simple operations (empty — add new tools here)
inventree_mcp_plugin/tools/complex/ Multi-step orchestration tools (empty — add new tools here)
tests/conftest.py Stubs Django/InvenTree modules so tools can be imported without InvenTree

Conventions

  • Tools: each tool is a standalone function decorated with @mcp.tool(). Docstrings drive MCP schema generation — keep them accurate.
  • ORM access: tools query InvenTree models directly (not via the REST API). request.user auth is handled upstream in MCPView.
  • Types: strict mypy. All parameters and return types must be annotated.
  • Line length: 120 characters (ruff).
  • Python: 3.11+ only. No backcompat shims.
  • Dependencies: mcp>=1.9 is the only production dependency. Django and InvenTree are provided by the plugin host environment — do not add them to pyproject.toml.
  • Unit tests: mock the entire InvenTree/Django module tree via conftest.py. Tests must run with uv run pytest and no InvenTree instance.
  • Tool list sync: when adding, removing, or renaming tools, always update the tool list in both README.md and the "Working with the live InvenTree instance" section of this file.

Read the full file on GitHub · 123 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 · 123 lines · 1,539 tokens per session scan A a6227ab5a645

Subscribe to this mod's changes

inventree-mcp-plugin CLAUDE.md is an instructions file published in the GitHub repository eljefedelrodeodeljefe/inventree-mcp-plugin (5 stars, last pushed 6mo ago), licensed MIT. It adds 1,539 tokens to every session, about $0.0077 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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