# Maestro Parlor MCP reference

Endpoint: https://maestro.uncommonear.com/mcp
Documentation: https://maestro.uncommonear.com/developers
Transport: Streamable HTTP, stateless JSON responses. Supported baseline: MCP 2025-11-25. MCP 2026-07-28 is not yet supported; do not assume latest-version compatibility. The SDK negotiates supported protocol versions during initialization. No standalone SSE stream, sessions, subscriptions, prompts, resources, sampling, or asynchronous tasks are advertised by this application. Six read-only tools are available.

## Connect and authenticate

Add the endpoint as a remote HTTP MCP server and select OAuth/automatic authentication. Sign in with Google and approve catalog:read. Clients discover protected resource metadata at `/.well-known/oauth-protected-resource/mcp` and authorization metadata at `/.well-known/oauth-authorization-server`. Public clients register at `/oauth/register` and use authorization-code flow with S256 PKCE. Client-ID metadata documents are unsupported; use dynamic registration. Tokens expire within one hour; rotating refresh tokens last within a 30-day connection. Disconnect at `/account/developer`.

For clients without OAuth, create an API key at `/account/developer` and configure `Authorization: Bearer YOUR_API_KEY` securely. Keys expire after 90 days. Do not put credentials in URLs, prompts, checked-in configuration or logs. Website cookies alone do not authorize MCP. Native/server clients are supported; cross-origin browser connections are rejected.

VS Code `.vscode/mcp.json` (OAuth, no embedded credentials):

```json
{"servers":{"maestro-parlor":{"type":"http","url":"https://maestro.uncommonear.com/mcp"}}}
```

## Workflow and examples

1. Ask “Find short Chopin performances.” Call `search_performances` with `{"query":"Chopin","duration":"short","limit":5}`.
2. Take a returned `id`; do not invent an ID. Use `get_performance` to inspect it and `get_playback_links` to open its page or obtain MIDI/original links.
3. Ask “Show notes overlapping the first ten seconds.” Call `get_note_window` with that ID and `start:0`.
4. Follow `nextOffset` with the same filters/window until it is null. It is a result offset, not an MCP tools/list cursor.

All tool arguments are objects; unknown properties are rejected. Empty arguments are valid for search and composer listing. All successful results include `schemaVersion`, `catalogRelease`, `sourceVersion`, `attribution`, `license`, and `licenseUrl`. Results appear both in `structuredContent` and as JSON text in `content`. No outputSchema is currently advertised; clients should tolerate additional response fields.

### search_performances

Search source composer/title labels, optionally filtering availability.

| Argument | Type, default and bounds |
| --- | --- |
| query | string, default empty, at most 200 characters |
| composerIds | array of up to 5 IDs from list_composers, default empty; each at most 40 characters |
| year | optional integer 2000–2020, performance year |
| duration | optional short (under 300 s), medium (300–900 s), long (over 900 s) |
| originalAvailable | optional boolean; omit for either; requires recording storage when supplied |
| sort | relevance (default), composer, title, duration-asc, duration-desc, year-asc, year-desc |
| offset | integer 0–1276, default 0 |
| limit | integer 1–50, default 20 |

Example arguments: `{"query":"Chopin","duration":"short","sort":"year-desc","limit":5}`.
Returns `total`, `offset`, `limit`, `nextOffset`, `performances`. Each summary has `id`, `workId`, `title`, `composer`, `composerIds`, `year`, `duration` (seconds), `noteCount`, `performanceUrl`, `midiUrl`, `notesUrl`. Unknown composer IDs produce a tool error.

### list_composers

Discover exact source composer/arrangement credits and IDs. Arguments: `offset` (0–1276, default 0), `limit` (1–50, default 20).

Example: `{"limit":10,"offset":0}`.
Returns `total`, `offset`, `limit`, `nextOffset`, `composers`; each composer has `id`, `name`, `performanceCount`, `url`. Credits may contain multiple composers or arrangers; they are not necessarily individual people.

### get_performance

Required `performanceId`: an ID from search matching `p-` followed by 20 lowercase hexadecimal characters.

Example template: `{"performanceId":"<id from search_performances>"}`. Replace the placeholder before calling.
Returns `performance`: the search summary plus `workGrouping:"exact-source-label"`, `performer:null`, `exactDate:null`, `venue:null`, and `original` (object with `url`, `bytes`, or null). Null identity fields are unknown, not evidence of anonymity. Requires recording availability storage.

### get_recording_availability

Required `performanceId`, same format and discovery as above.

Example template: `{"performanceId":"<id from search_performances>"}`.
Returns `performanceId`, `originalAvailable`, and `original` (`{url,bytes}` or null). Missing storage is an error, not false availability.

### get_playback_links

Required `performanceId`, same format and discovery as above.

Example template: `{"performanceId":"<id from search_performances>"}`.
Returns `performanceId`, `pageUrl`, `midiUrl`, and `original` (`{url,bytes}` or null). Open the page for listening. This tool does not start or control a player. Original audio is WAV and supports HTTP Range; files can be large. Requires recording availability storage.

### get_note_window

| Argument | Type, default and bounds |
| --- | --- |
| performanceId | required ID from search, as above |
| start | required finite number, seconds >= 0 and less than performance duration |
| seconds | finite number 0.1–30, default 10 |
| offset | integer 0–100000, default 0, within this window's notes |
| limit | integer 1–1000, default 500 |

Example template: `{"performanceId":"<id from search_performances>","start":0,"seconds":10,"limit":100}`.
Returns `performanceId`, `start`, `end` (clipped to performance duration), `total`, `offset`, `nextOffset`, `noteFields`, `notes`, `interpretation`. Each note is `[pitch,start,duration,velocity,channel]`: MIDI pitch, onset seconds, duration seconds, MIDI key-strike velocity, MIDI channel. Notes overlap the half-open window: onset < end and onset + duration > start. Earlier sustained notes may be included; events retain original onset and duration. Velocity is not recorded loudness. Pedal/control events and sheet-music notation are not returned.

## Raw protocol examples

Use an MCP SDK for OAuth, negotiation, and lifecycle handling. For a manual API-key smoke check, set `MAESTRO_API_KEY` privately and run:

```sh
curl https://maestro.uncommonear.com/mcp \
  -H "Authorization: Bearer $MAESTRO_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  --data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"manual-check","version":"1.0.0"}}}'
```

After initialization, send `{"jsonrpc":"2.0","method":"notifications/initialized"}` in a separate POST with the same headers plus `MCP-Protocol-Version` set to the negotiated version. Accepted notifications return HTTP 202 with no body. Then send these messages separately:

```json
{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}
```

```json
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"search_performances","arguments":{"query":"Chopin","limit":2}}}
```

Successful calls return `{"jsonrpc":"2.0","id":3,"result":{"content":[{"type":"text","text":"...JSON..."}],"structuredContent":{...}}}` (illustrative shape, not literal JSON). Tool failures return `result.isError:true` with a text explanation; unknown tool names return JSON-RPC error -32602. Handle both. No retries should assume unlimited quota.

## Limits and errors

Every authenticated request passing access checks counts toward 30 requests/account/rolling minute, shared across API keys, OAuth connections and the REST API. Initialization, discovery calls, notifications and invalid requests may consume quota. HTTP 429 includes Retry-After. POST bodies are bounded to 16 KiB; JSON-RPC batches are rejected. Tools/list returns all six tools without a cursor.

HTTP transport/auth errors: 400 malformed request, batch or unsupported protocol version; 401 absent/invalid/expired credential with OAuth discovery challenge; 403 untrusted Origin/host; 405 no standalone GET stream; 406 unacceptable Accept header; 413 oversized body; 415 wrong content type; 429 quota; 503 unavailable infrastructure. Domain/input failures during tools/call use MCP tool errors, not REST 400/404 statuses. GET does not provide SSE; DELETE has no session to terminate.

## Data limitations and reuse

Read-only catalog; no private library access, playlist mutation, arbitrary URL fetches, file paths, code execution or playback control. Search labels are source labels, not reconciled works. MAESTRO v3.0.0 audio/MIDI are CC BY-NC-SA 4.0. Preserve attribution, license and source version; these are not commercially licensed production tracks. Maestro Parlor is independent of Google and the MAESTRO project. For music for projects, visit https://uncommonear.com and check each track's license.

Conformance baseline: https://modelcontextprotocol.io/specification/2025-11-25 . This reference documents intended application behavior and does not certify every client's compatibility.
