cost-management-mcp: Instructions file for Codex

AGENTS.md

cost-management-mcp AGENTS.md is an instructions file for Codex, OpenCode from knishioka/cost-management-mcp. It costs 5,286 tokens per session, scanned C, original, MIT.

Repository-wide development instructions for a TypeScript server that lets AI clients query and analyze costs from AWS, OpenAI, Anthropic, and other APIs. MCP, or Model Context Protocol, is a way for AI applications to call external tools.

In plain words
What is it for?
Use it when developing, testing, reviewing, or committing changes to the cost-management-mcp repository.
Why use it?
It gives contributors the project's structure, supported technologies, testing rules, security checks, and contribution practices in one place.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/knishioka/cost-management-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/knishioka/cost-management-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,286 This file is loaded in full into every session.
When invoked 5,286 The same file — it is already loaded in full.
Security scan C 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.05286 $0.05286
Opus 5 $0.02643 $0.02643
Sonnet 5 $0.01057 $0.01057
Haiku 4.5 $0.00529 $0.00529

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

Security

Grade C, and why

cost-management-mcp AGENTS.md scanned grade C 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 11d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **原因**: `npm run clean` が `rm -rf` を使用。
AGENTS.md · 332 lines

How it starts

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

AGENTS | cost-management-mcp

適用範囲 / Scope

  • このファイルはリポジトリ直下 (/) に配置され、リポジトリ全体へ適用されます。
  • 将来的にパッケージ配下へ AGENTS.md が追加された場合は、"近接優先" ルールに従い、より深い階層の指示を優先してください (Closest file wins)。
  • 現在このリポジトリは単一パッケージ構成であり、追加のローカル AGENTS.md は存在しません。

1. Overview | 概要

1.1 Mission Statement | 目的

  • このリポジトリは Model Context Protocol (MCP) サーバーを実装し、AWS / OpenAI / Anthropic など複数クラウド・API のコストを統合的に分析・可視化します。
  • TypeScript (Node.js) ベースで、MCP クライアント (例: Claude Desktop) からの自然言語クエリに応答するツール群を提供します。
  • 既存のCI/CD (GitHub Actions) と連携し、品質 (Lint/Typecheck/Test) とセキュリティ (Audit/Secret scan) を自動化しています。

1.2 Architecture Snapshot | アーキテクチャ概観

  • ランタイム: Node.js >= 18 (CIでは 18.x / 20.x をサポート)。
  • 言語: TypeScript 5.x。CommonJS 出力 (type: "commonjs")。
  • フレームワーク: MCP SDK (@modelcontextprotocol/sdk) を用いたツール定義。
  • テスト: Jest (ts-jest) によるユニット/統合テスト。カバレッジ収集は Codecov へ送信。
  • Lint/Format: ESLint + Prettier (lint-staged と Husky でプリコミット適用)。
  • キャッシュ層: node-cache (in-memory)、オプションで Redis (REDIS_URL) を使用可能。
  • Secrets 管理: .env or MCP config (例: .mcp.json) を通じて環境変数で渡す。リポジトリには秘匿情報を含めない。

1.3 Directory Map | 主要ディレクトリ

  • /src : ソースコード (MCP ツール、サービス、キャッシュ実装)。
  • /tests : Jest テストケース。__snapshots__ 等がある場合はここに格納。
  • /node_modules : インストール済み依存。原則編集禁止。
  • /dist : npm run build で生成される出力。Git管理外。
  • /configs ディレクトリは存在しませんが、tsconfig.json / jest.config.js / eslint.config.js / .prettierrc がリポジトリ直下にあります。
  • /.github/workflows : GitHub Actions 定義 (ci.yml, release.yml, security.yml 等)。
  • .env.example : 必須環境変数のサンプル。実値は追加しないでください。
  • mcp-config-example.json, .mcp.json.example : MCP クライアント用設定例。

1.4 Key Entry Points | 重要エントリポイント

  • src/index.ts : MCP サーバーの起動ポイント。npm run dev / npm run start で参照。
  • src/tools/* : 個別ツール定義 (cost_get, provider_list, etc.)。
  • src/services/* : 各クラウド/ベンダーとの通信ロジック。
  • src/utils/* : 共通ユーティリティ (キャッシュ、フォーマッタなど)。
  • tests/**/*.test.ts : Jest テスト。

1.5 Documentation Cross-Links | 追加資料

  • README.md : 機能概要、利用例、バッジ。
  • CONTRIBUTING.md : 貢献ガイドライン (コミット規約はConventional Commits推奨)。
  • openai-analysis-report.md, billing-apis-research.md : ドメイン調査メモ。
  • TEST_RESULTS.md : 過去テスト実行レポート (参考程度)。

Read the full file on GitHub · 332 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. 11d ago First seen · 332 lines · 5,286 tokens per session scan C bd8361a982da

Subscribe to this mod's changes

cost-management-mcp AGENTS.md is an instructions file published in the GitHub repository knishioka/cost-management-mcp (0 stars, last pushed 11d ago), licensed MIT. It adds 5,286 tokens to every session, about $0.0264 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.

Related

Other instructions, from other repositories

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,126 tokens

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

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

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