harmonica-mcp CLAUDE.md

harmonica-mcp CLAUDE.md is an instructions file for coding agents from harmonicabot/harmonica-mcp. It costs 2,754 tokens per session, scanned A, original, MIT.

Project instructions for Harmonica MCP, a service that lets AI agents create and query Harmonica sessions through the Model Context Protocol.

In plain words
What is it for?
Use it when building, testing, running, versioning, or publishing the harmonica-mcp npm package.
Why use it?
It documents the commands, tests, build process, and publishing steps needed to maintain the project reliably.

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/harmonicabot/harmonica-mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/harmonicabot/harmonica-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 harmonica-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/harmonicabot/harmonica-mcp/claude-md.svg)](https://agentmods.dev/instructions/harmonicabot/harmonica-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/harmonicabot/harmonica-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/harmonicabot/harmonica-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,754 This file is loaded in full into every session.
When invoked 2,754 The same file — it is already loaded in full.
Security scan A 0 findings. 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.02754 $0.02754
Opus 5 $0.01377 $0.01377
Sonnet 5 $0.00551 $0.00551
Haiku 4.5 $0.00275 $0.00275

Measured 4d ago against content hash fe3f1af03636, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

harmonica-mcp CLAUDE.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 4d 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.

CLAUDE.md · 155 lines

How it starts

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

MCP (Model Context Protocol) server for Harmonica, enabling AI agents to create and query Harmonica sessions programmatically. Published to npm as harmonica-mcp.

Commands

npm run build   # Compile TypeScript → dist/
npm run dev     # Watch mode compilation
npm start       # Run the MCP server (requires HARMONICA_API_KEY env var)

Vitest test suite — npm test (src/client.test.ts, src/methodSpec.test.ts, src/index.test.ts). No linter configured.

npm test runs npm run build first, because index.test.ts drives the built dist/index.js over stdio rather than importing a factory — what we publish is the binary, so the tests send the same tools/list a real client sends. That also catches bootstrap failures (bad import specifier, transport wiring) a unit test would miss.

Publishing

Published to npm (harmonica-mcp). Users install via npx -y harmonica-mcp.

npm version patch|minor|major   # Bump version in package.json
npm publish                     # Runs prepublishOnly → build → publish

Architecture

AI Agent (Claude Code, etc.)
  ↕ stdio (MCP protocol)
harmonica-mcp (this project)
  ↕ HTTP (REST API)
Harmonica API (app.harmonica.chat/api/v1)
  ↕ SQL
Neon Postgres

This is a client of the Harmonica REST API (/api/v1/), which lives in harmonica-web-app/. ESM module ("type": "module" in package.json).

Source files:

  • src/index.ts — bootstrap only. Reads env, picks the transport, wires it. No tool definitions.
  • src/tools.ts — the 26 tool definitions and createServer(client, version). Pure: no env reads, no filesystem, no transport.
  • src/http.tsstartHttpServer(). node:http plus the SDK's web-standard handler. Loaded lazily, so a stdio run never pays for it.
  • src/client.ts — HTTP client wrapping the Harmonica REST API. All methods throw on HTTP errors.
  • src/methodSpec.ts — parses OFL method specs (method.md) into chain configs.

Read the full file on GitHub · 155 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. 4d ago First seen · 155 lines · 2,754 tokens per session scan A fe3f1af03636

Subscribe to this mod's changes

harmonica-mcp CLAUDE.md is an instructions file published in the GitHub repository harmonicabot/harmonica-mcp (3 stars, last pushed 15d ago), licensed MIT. It adds 2,754 tokens to every session, about $0.0138 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.