agentleFS
raulkiviraulkivi/sheet-music-mcp/.github/copilot-instructions.md

sheet-music-mcp

Copilot instructions4 starsChanged 2 months agoMITView on GitHub

Last changed: 2026-11-26 · Source: https://github.com/raulkivi/sheet-music-mcp Choir Music Assistant — a collection of independent MCP (Model Context Protocol) servers that together enable choir singers to digitize, practice with, and navigate sheet music. See README.md for goals, phases, and data flow. See docs/conventions.md for coding standards all servers must follow. Each server has its own local instruction file — read it before writing any code: The per-server files contain: status, key files, implemented tools, environment setup, test commands, known gotchas, and…

  • Installs packages

The file

We split this copilot-instructions.md into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Integration tests: must be @pytest.mark.integration and must not run in the default pytest invocation

    line 70
  2. Distinctive:

    Update the documents so the next person (or session) starts with accurate information:

    line 100

≈ “Common” is an estimate: at least 1 in 5 of the 3,950 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Copilot Instructions

Last changed: 2026-11-26 · Source: https://github.com/raulkivi/sheet-music-mcp

Project Overview

Choir Music Assistant — a collection of independent MCP (Model Context Protocol) servers that together enable choir singers to digitize, practice with, and navigate sheet music.

See README.md for goals, phases, and data flow. See docs/conventions.md for coding standards all servers must follow.


Working on an MCP Server

Each server has its own local instruction file — read it before writing any code:

ServerInstructionsStatus
omr-mcpomr-mcp/.github/copilot-instructions.md✅ Phase 1-4 complete; Recognition Review page built
synth-mcpsynth-mcp/.github/copilot-instructions.md✅ Phase 1 COMPLETE; Practice Player page built
render-mcprender-mcp/.github/copilot-instructions.md✅ Phase 1 COMPLETE; Score Viewer page built
musicxml-abc-mcpmusicxml-abc-mcp/.github/copilot-instructions.md✅ Phase 1 COMPLETE; ABC Workbench page built
pitch-mcppitch-mcp/.github/copilot-instructions.md✅ Phase A+B COMPLETE; Practice Coach page built
comparer-mcpcomparer-mcp/.github/copilot-instructions.md✅ Phase 4 COMPLETE; compare_scores; Diff Viewer page built

The per-server files contain: status, key files, implemented tools, environment setup, test commands, known gotchas, and the definition of done.

Also read the server's docs/HANDOVER.md, docs/PLAN.md, docs/requirements.md, and docs/architecture.md (HANDOVER.md and PLAN.md are local and gitignored; pitch-mcp also has docs/todo.md) before writing any code.


Repository Structure

sheet-music-mcp/
├── docs/
│   ├── conventions.md          # Shared conventions for all MCP servers
│   └── sources.md              # Reference links (ABC notation, etc.)
├── omr-mcp/                    # Image → MusicXML          ✅ Phase 1-4 complete
├── synth-mcp/                  # MusicXML → Audio          ✅ Phase 1 COMPLETE
├── render-mcp/                 # MusicXML → PDF/PNG        ✅ Phase 1 COMPLETE
├── musicxml-abc-mcp/           # MusicXML ↔ ABC            ✅ Phase 1 COMPLETE
├── pitch-mcp/                  # Mic audio → score pos/accuracy  ✅ Phase A+B COMPLETE
├── comparer-mcp/               # Two MusicXML → structured diff  ✅ Phase 4 COMPLETE
├── ui/                         # MCP Apps UI workspace (TypeScript): seven pages (Score Viewer, Setup Doctor, Diff Viewer, Practice Coach, ABC Workbench, Practice Player, Recognition Review), registry `ui/apps.config.mjs`, built into the servers
└── sheet-music-mcp-core/       # Shared library (errors, parts, annotations, content, wiring, score references, measures) — not a server

Each *-mcp/ directory is a self-contained Python package deployable independently.


Shared Standards (all servers)

Environment

  • Python: 3.11+ (pinned in .python-version)
  • Package manager: uv — always use uv sync / uv add, never pip install
  • Venvs: each server has its own .venv — never share between servers

Coding rules

  • engine.py must not import from mcp — keeps it unit-testable without the MCP stack
  • All tool handlers must be async def
  • All error responses: {"error": "...", "error_code": "..."} — see docs/conventions.md for all codes
  • Integration tests must be @pytest.mark.integration and must not run in the default pytest invocation
  • Shared code (errors, part selection, deprecated parameter names, tool annotations, result content, handler wiring, score references, describe_score, measure ranges) comes from sheet-music-mcp-core/, not from per-server copies. Engines may import only its MCP-free modules
  • Every tool sets a title and an annotation preset; every part parameter (part / parts) uses the shared resolver. See docs/conventions.md
  • Every score input has a path sibling (musicxml_path, exactly one of the pair required) read through references.load_score(); score producers return a path plus score_summary for large scores. See docs/conventions.md

MCP stdio startup pattern

async def _run():
    async with mcp.server.stdio.stdio_server() as (read_stream, write_stream):
        await app.run(read_stream, write_stream, app.create_initialization_options())

asyncio.run(_run())

run_server() does not exist in the installed MCP SDK — always use the context manager above.

Running tests

# From inside any *-mcp/ directory:
VIRTUAL_ENV= .venv/bin/pytest tests/ -v               # unit tests
VIRTUAL_ENV= .venv/bin/pytest tests/ -v -m integration # integration tests
uv sync                                                # install dependencies

When You Finish Work

Update the documents so the next person (or session) starts with accurate information:

  • <server>/docs/HANDOVER.md — check off done items, add new gotchas, update status (local, gitignored)
  • <server>/docs/PLAN.md — check off completed phase items, note changed decisions (local, gitignored)
  • <server>/docs/requirements.md — update if behavior or interfaces changed
  • <server>/docs/architecture.md — update if implementation structure changed
  • <server>/.github/copilot-instructions.md — update status and tool list
  • This file — update server status markers in the table above

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.