purple-mcp: Instructions file for Codex

AGENTS.md

purple-mcp AGENTS.md is an instructions file for Codex, OpenCode from wojtekkura/purple-mcp. It costs 4,651 tokens per session, scanned A, a copy of purple-mcp AGENTS.md, MIT.

A set of instructions for AI agents working on the Purple MCP Python project, including its tools, libraries, testing, and security rules.

In plain words
What is it for?
Use it when contributing to Purple MCP, especially for choosing the right package commands, separating business logic from MCP adapters, running tests, and checking code quality.
Why use it?
It gives agents project-specific guidance so their changes follow the repository’s structure, coding checks, and development practices.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/wojtekkura/purple-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/wojtekkura/purple-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,651 This file is loaded in full into every session.
When invoked 4,651 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 86% copy Near-identical to another mod 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.04651 $0.04651
Opus 5 $0.02325 $0.02325
Sonnet 5 $0.00930 $0.00930
Haiku 4.5 $0.00465 $0.00465

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

Security

Grade A, and why

purple-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 9d 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.

Origin

This is a copy

86% identical to purple-mcp AGENTS.md — 267 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

AGENTS.md · 653 lines

How it starts

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

AI Agent Guidelines for Purple MCP

This document provides essential guidelines for AI agents contributing to the Purple MCP codebase. For comprehensive details, see CONTRIBUTING.md.

Quick Reference

  • Language: Python >=3.10
  • Package Manager: uv (never use pip install or uv pip)
  • Code Quality: Must pass uv run ruff format, uv run ruff check --fix, and uv run mypy
  • Testing: Comprehensive tests required (unit + integration)
  • Architecture: Strict separation between libs/ (business logic) and tools/ (MCP adapters)

Project Overview

Purple MCP is a Model Context Protocol (MCP) server providing access to SentinelOne Purple AI and Singularity Data Lake capabilities. The project emphasizes:

  • Simplicity, readability, maintainability over cleverness
  • Clean separation of concerns (Tools vs Libraries)
  • Security-first development (HTTPS required, no secrets in code)
  • Comprehensive testing (unit + integration with real API validation)

Current Tools and Libraries

The project provides the following MCP tools (in src/purple_mcp/tools/):

  • purple_ai: Natural language queries to Purple AI
  • sdl: Singularity Data Lake query execution and timestamp utilities
  • alerts: Security alerts management (list, search, get details, notes, history)
  • misconfigurations: Cloud/Kubernetes misconfiguration management
  • vulnerabilities: Vulnerability management and tracking
  • inventory: Unified Asset Inventory management
  • purple_utils: Utility tools for Purple AI (status checks, available tools)

Each tool has a corresponding library in src/purple_mcp/libs/ with standalone, reusable business logic.

Critical Architecture Pattern: Tools vs Libraries

This is the most important architectural concept in the codebase:

Libraries (src/purple_mcp/libs/)

Libraries implement standalone, reusable business logic:

# ✅ CORRECT: Library with explicit configuration
import uuid
from purple_mcp.libs.purple_ai import (
    PurpleAIConfig,
    PurpleAIUserDetails,
    PurpleAIConsoleDetails,
    ask_purple,
)

user_details = PurpleAIUserDetails(
    account_id="account-123",
    team_token="team-token",
    session_id=uuid.uuid4().hex,
    email_address="[email protected]",
    user_agent="purple-mcp/1.0",
    build_date="2024-01-01",
    build_hash="abc123",
)

console_details = PurpleAIConsoleDetails(
    base_url="https://your-console.sentinelone.net",
    version="1.0.0",
)

config = PurpleAIConfig(
    graphql_url="https://your-console.sentinelone.net/web/api/v2.1/graphql",
    auth_token="your-auth-token",
    timeout=120.0,
    user_details=user_details,
    console_details=console_details,
)

response_type, message = await ask_purple(config, "Is Salt Typhoon in my environment?")

Read the full file on GitHub · 653 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. 9d ago First seen · 653 lines · 4,651 tokens per session scan A d02133c811fb

Subscribe to this mod's changes

purple-mcp AGENTS.md is an instructions file published in the GitHub repository wojtekkura/purple-mcp (0 stars, last pushed 4mo ago), licensed MIT. It adds 4,651 tokens to every session, about $0.0233 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to purple-mcp AGENTS.md, differing in 267 lines, and is treated as a copy.

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