musicwire turns a complete MusicXML score into audio you can play, MIDI you can edit,
and a receipt that records the render. This page is for the agent doing the work and the
human listening to the result.
Use the MCP server when your agent supports MCP. Add this connection to its
project configuration, then configure that client with a funded x402 buyer wallet.
The public service URL is explicit so your agent reaches musicwire.
Hosted MCP clients such as Claude Connectors and Smithery connect over Streamable
HTTP at the same domain. Musicwire does not hold a buyer wallet for that endpoint.
Paid tools quote with the same x402 challenge as the HTTPS API.
https://musicwire.5432wire.com/mcp
For plain HTTPS, read the live machine-readable manifest first:
curl https://musicwire.5432wire.com/manifest
Ask for a complete score
Tell the agent what to write, or provide your own MusicXML. The free compose guide
gives an agent a versioned authoring prompt and quality bar.
Ask for mp3 so a human can listen and midi so they can
continue editing. The worked examples below use those formats.
Authorize the quoted payment
A paid request first receives an exact x402 quote. An x402-aware MCP client
handles that retry. With plain HTTPS, use an x402 buyer to sign and retry the
identical request.
Receive and listen
Poll the returned job until it is completed. Open the MP3 link in a browser or
audio player. Download the MIDI into a DAW or notation editor. Keep the receipt
with the final work.
[ WORKED EXAMPLES ]
Hear what agents can make.
Nine complete miniatures show the range from a happy solo piano piece to a house/EDM
drop. Every sample below has passed musicwire's real render and audio quality checks.
[ LISTENING GALLERY ]
Nine complete scores, ready to hear and reuse.
For humans
Press play first. Each miniature is roughly a minute of written music, with its own
musical shape and a self-hosted MP3. Download or open the score only if you want to see
how the sound was made.
For agents
Expand a score to copy the exact MusicXML, then submit it verbatim with
formats:["mp3","midi"]. These are complete testable inputs, not prompts or
partial fragments.
01 - solo
Moonlit Thread
For humans
Restless, lyrical violin in D minor - 46 seconds.
Production recipe: Chamber lyric at 84 BPM for solo violin. A
rising call opens, a higher sequential answer develops it, then the line settles
quietly home.
For agents
Compose-guide note: The minor-mode rise creates tension and the
soft return resolves it. Keep the climb, answer, and release when adapting the tempo
or key.
Production recipe: Happy salon piano at 96 BPM. A buoyant C-major
opening becomes a higher middle strain, then a familiar cadence returns with a soft
smile.
For agents
Compose-guide note: Major triads, a skip in the top voice, and a
lift in register make the optimism audible. Preserve that rising middle section
instead of looping one progression.
Warm fingerstyle classical guitar in E minor - 46 seconds.
Production recipe: Reflective E-minor fingerstyle guitar at 84 BPM.
Open-string arpeggios introduce the harmony, the answer reaches wider, and the final
E is left ringing.
For agents
Compose-guide note: Broken chords and ringing open strings fit a
guitar more naturally than piano blocks. Vary the harmonic path before the final
tonic so the ending feels earned.
Production recipe: Buoyant D-major flute at 88 BPM. A breath
precedes the opening call, the melody launches higher in the middle, and descends to
a light landing.
For agents
Compose-guide note: A rest and short phrases imply breath, while
the upper-register crest makes the title feel airborne. Retain those breathing
points when rewriting the melody.
Wordless synthesized choir voice (Ahh) in A minor - 48 seconds.
Production recipe: Still choral meditation at 80 BPM for a
synthesized Ahh sound. Two long cells establish the idea, one crest widens it, and
the final A fades.
For agents
Compose-guide note: Long legato notes make a synthesized choir
sound intentional rather than lyric-bearing. Keep it wordless and label the voice
honestly when adapting this texture.
Production recipe: G-minor string quartet at 76 BPM: two violins,
viola, and cello. A close texture supports the first motif, the center opens the
register, and all four settle to G.
For agents
Compose-guide note: Give Violin I the changing line, inner strings
harmonic motion, and cello the floor. Distinct roles make an ensemble sound like
conversation rather than four copies.
Buoyant flute, clarinet, bassoon, and piano in B-flat major - 46 seconds.
Production recipe: Neoclassical travel sketch at 84 BPM for flute,
clarinet, bassoon, and piano. The flute maps the route, winds color the middle, and
a compact tutti cadence closes.
For agents
Compose-guide note: Keep the flute light, the bassoon low, and
piano harmonic rather than melodic. The contrast of high route and low foundation
creates the sense of motion.
Driving house/EDM with synth bass, lead, pad, and drum kit in C minor - 46 seconds.
Production recipe: Dark, uplifting house/EDM at 126 BPM in C minor
for synth lead, synth bass, synth pad, and a house drum kit. Pads open the room, a
four-on-the-floor groove establishes the pulse, an ascending eight-bar build drops
to a two-bar break, then the full hook lands hard.
For agents
Compose-guide note: This is the electronic-genres proof: give the
bass and kick the same quarter-note grid, let the lead climb to create tension, and
remove that foundation briefly before restoring every layer at the drop. Keep those
roles and the contrast will survive a new key, tempo, or synth sound.
Easy-swing alto sax, piano, bass, and drumset in F major - 46 seconds.
Production recipe: Relaxed F-major easy swing at 104 BPM for alto
sax, piano, acoustic bass, and drumset. Sax states the head, rhythm section opens it
up, then it cools into F.
For agents
Compose-guide note: Give sax the hook, piano compact changes, bass
a walking line, and drums a pulse. Independent roles make the groove readable even
in a short arrangement.
When it completes, play the .mp3 and import the .midi to
continue editing the score.
[ AUDIO QUALITY ]
Natural endings are allowed. Extra audio is not.
For humans
Musicwire compares the MP3 length with the score's playback length. MuseScore adds a
small natural ending after the final note, so every MP3 has a three-second allowance
plus 10% of the score duration. Scores that name a sustained instrument or section,
including violin, cello, Wind, Woodwind, Brass, Strings, organ, or voice, receive up to
3.25 seconds instead.
This only allows a normal release tail. Audio that runs longer than that limit still
fails quality control, returns failed_not_charged, and is never captured.
For agents
Declare each part with a truthful part-name or
instrument-name. Musicwire uses those declared instruments to select the
bounded tail allowance, then rejects any MP3 longer than
score_duration + allowance + 10%.
Open the MP3 artifact URL in a browser or audio player. Download it before the job's
expires_at time.
Keep editing
Import MIDI into a DAW or notation app. MusicXML is always included as the source
score.
Keep proof
Save receipt.json with the audio. It records the paid render and its
quality outcome. NOTICE.txt carries the soundfont attribution plus the
render receipt ID and the free verification URL.
A completed job includes MusicXML, NOTICE.txt, and
receipt.json automatically. Artifact links are available until the
completed job's expires_at timestamp. Save any file you need before then.
[ VERIFY IT CAME FROM US ]
Every artifact is attributed and provable.
Every rendered artifact carries embedded musicwire attribution plus its render receipt
ID, without altering the audio samples or MIDI events:
MP3: encoded-by, comment, and copyright metadata
MIDI: copyright and text meta events
MusicXML: musicwire software metadata
Each completed render also includes NOTICE.txt with that receipt ID and the
free verification URL. Embedded tags are useful attribution but can be removed by a
determined party. The durable signed hash receipt is the provenance proof: calculate the
SHA-256 of an unmodified file and submit it to the free
POST /v1/provenance/verify endpoint. A changed file has a different hash
and cannot be verified as the original musicwire output.
shasum -a 256 output.mp3
curl -s -X POST https://musicwire.5432wire.com/v1/provenance/verify \
-H 'content-type: application/json' \
-d '{"sha256":"64-character-lowercase-hex-hash"}'
A matching response includes rendered_by_musicwire: true, the receipt ID,
render time, signed receipt, and matching artifact record. An unknown hash returns
{ "rendered_by_musicwire": false }.
[ DISCOVERY FLOW ]
Probe, get the 402 challenge, pay, get the result.
For humans
You never need to know the price in advance. Send any request without a payment to
POST /v1/validate or POST /v1/render - even with an empty or
missing body - and musicwire answers 402 Payment Required with a quote
listing the price, network, asset, and receiving address. Pay that quote with any
standard x402 client and repeat the request; the body is only validated after a payment
is presented, and a rejected body never charges you.
For agents
# Hosted MCP: initialize and list tools are free. A paid tool call
# without Payment-Signature returns HTTP 402 with the same quote as
# the HTTPS API. Retry the identical MCP request after signing.
curl -si -X POST https://musicwire.5432wire.com/mcp \
-H 'accept: application/json, text/event-stream' \
-H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
# 1. Probe a priced route. Any unpaid request returns the 402 challenge;
# the Payment-Required header carries the machine-readable quote.
curl -si -X POST https://musicwire.5432wire.com/v1/validate
# 2. Or read the requirements with standard x402 buyer tooling.
npx -y awal x402 details https://musicwire.5432wire.com/v1/validate --json
# 3. Sign the quote and retry with payment in one step.
npx -y awal x402 pay https://musicwire.5432wire.com/v1/validate \
-X POST -d '{"musicxml":"<your complete MusicXML document>"}'
# 4. Read the result. 200 means valid and settled after QC; 422 with
# status failed_not_charged means QC failed and nothing was charged.
The same flow applies to POST /v1/render. A probe without a readable score
is quoted the solo base price; probing with your real request body returns the exact
price tier your payment must match.
[ CONCISE REFERENCE ]
The endpoints you will use.
GET /v1/compose-guideLoading...
Returns the agent authoring prompt and MusicXML quality bar.
POST /v1/validateLoading...
Checks MusicXML and returns detailed errors when the score is invalid.
POST /v1/renderLoading...
Requires JSON with musicxml and a non-empty formats list.
Returns an asynchronous job.
GET /v1/jobs/{id}Loading...
Returns status, quality result, receipt, expiry, and artifact URLs.
POST /v1/provenance/verify
Free. Submit { "sha256": "..." } to check a file hash against
musicwire's signed render receipts.
POST /mcp
Streamable HTTP MCP. The same tools as npx -y musicwire-mcp: compose
guide, validate, render, job status, and provenance verify. Validate and render
return HTTP 402 until the caller retries with an x402
Payment-Signature. Poll musicwire_get_job with repeated
short calls here rather than one long wait_for_completion hold; the
gateway in front of this endpoint times out requests after roughly 29 seconds while
the render continues and stays pollable.
GET /manifest
Live machine-readable capabilities, prices, formats, and payment network.
Useful statuses and errors
Response
What to do
402
Authorize the exact quoted x402 payment, then retry the same request.
422
For validation, read the line-level errors. For a render, correct the MusicXML and
try again.
completed
Open the audio artifact and save the files you need.
failed_not_charged
The render did not pass. Read its error. Payment is not captured.
409
The Idempotency-Key was already used with a different payload. Retry
the original body or pick a new key. No payment is charged.
429
Slow down and retry after one minute.
Use an Idempotency-Key on paid requests. Reusing it with the same verified
payer and identical payload returns the original outcome and does not create another
charge or job. Read retry_policy, max_generation_seconds,
pay_with, and refund_policy from /manifest or
/.well-known/x402 before paying.