banana-image-mcp: Instructions file for Claude Code

CLAUDE.md

banana-image-mcp CLAUDE.md is an instructions file for Claude Code from xinpengfei520/banana-image-mcp. It costs 1,866 tokens per session, scanned B, original, MIT.

Repository instructions for an MCP server that generates blog cover images. They describe its image-generation, processing, cloud-upload pipeline and the settings needed to run it.

In plain words
What is it for?
Use them when developing, configuring or debugging this blog-cover image server, including Gemini access, image compression, temporary files and uploads to Qiniu Cloud or Aliyun OSS.
Why use it?
They give a coding agent the project context, architecture and commands needed to make safe changes without guessing how image generation or storage works.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code; reads ~/.codex paths.

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

Reuse

Borrowing it

Nothing to install: this file belongs to xinpengfei520/banana-image-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/xinpengfei520/banana-image-mcp/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/xinpengfei520/banana-image-mcp

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/xinpengfei520/banana-image-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/xinpengfei520/banana-image-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,866 This file is loaded in full into every session.
When invoked 1,866 The same file — it is already loaded in full.
Security scan B 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.01866 $0.01866
Opus 5.5 $0.00746 $0.00746
Sonnet 5.5 $0.00373 $0.00373
Haiku 4.5 $0.00187 $0.00187

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

Security

Grade B, and why

banana-image-mcp CLAUDE.md scanned grade B 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 2d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- JSON clients use `mcpServers`; Codex uses `~/.codex/config.toml` (`[mcp_servers.banana-image]`), edited via surgical block replace (preserves other sections/comments) with `smol-toml` for validation/detection
CLAUDE.md · 94 lines

How it starts

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

This is an MCP (Model Context Protocol) server that provides a tool for generating blog cover images. It integrates these services:

  1. Google Gemini AI - Image generation from text prompts
  2. Sharp - Image processing (resize, WebP conversion, compression)
  3. Qiniu Cloud or Aliyun OSS - CDN storage for generated images (configurable via UPLOAD_PROVIDER)

The main export is generate_blog_cover() which orchestrates the full pipeline: generate → compress → upload → cleanup.

Architecture

MCP server (index.js):

  • Exposes six MCP tools: generate_blog_cover, generate_image, upload_image, list_image_styles, save_image_style, delete_image_style
  • Preset cover styles live in styles.js. Resolution is call style, then IMAGE_STYLE, then no style. Explicit none skips the global style for that call. banana-image-mcp styles lists the presets and the global style of the current process
  • Custom styles are saved to ~/.banana-image-mcp/styles.json (custom-styles.js). That file is outside the package, so an update does not delete styles the user created. Same-name saves update one style. Built-in ids cannot be overwritten or deleted. A custom style can be a written prompt, or extracted from a local image path / http(s) URL by style-extract.js plus a Gemini vision call in index.js (GEMINI_VISION_MODEL, default gemini-2.5-flash). A written prompt wins when both are given
  • Uses ES modules (import/export syntax)
  • Temporary files stored in system temp directory (os.tmpdir()/banana-image-mcp/)
  • File naming: YYYYMMDD-{slug}.webp
  • Two optional ways to reach Gemini: a forward proxy (undici setGlobalDispatcher for the SDK's global fetch; https-proxy-agent for axios downloads) via PROXY_URL, or a reverse-proxy gateway via GEMINI_BASE_URL + GEMINI_EXTRA_HEADERS (SDK httpOptions.baseUrl/headers)

Read the full file on GitHub · 94 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. 2d ago Changed · +6 lines · +416 tokens per session 6941e96d713a
  2. 2mo ago First seen · 88 lines · 1,450 tokens per session scan B 88d340758344

Subscribe to this mod's changes

banana-image-mcp CLAUDE.md is an instructions file published in the GitHub repository xinpengfei520/banana-image-mcp (0 stars, last pushed 2d ago), licensed MIT. It adds 1,866 tokens to every session, about $0.0075 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

banana-image-mcp CLAUDE.md compared with instructions from other repositories

banana-image-mcp CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
banana-image-mcp CLAUDE.mdxinpengfei520/banana-image-mcpInstructions file02d agoMITB1,866Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot