MCP tools
claudius is an MCP server: an assistant connected to it makes, edits, renders and judges songs with the tools below, on the same session the studio shows. Working with an assistant is the short version of this page.
There are two ways to reach it:
- stdio: the client starts
claudius mcpand talks to it over stdin and stdout. This is what desktop clients do. - Streamable HTTP: the client connects to
http://127.0.0.1:7878/mcpwhileclaudius studioorclaudius serveruns.
Setting up a client
Claude Desktop
claudius connect claude-desktop
This adds an entry to Claude Desktop’s configuration, keeps the old file as claude_desktop_config.json.bak, and
asks you to quit and reopen Claude Desktop. claudius connect claude-desktop --remove takes it out again. On a Mac,
the release’s claudius-<version>.mcpb does it as an extension instead: open it, and Claude Desktop installs it,
starting the app’s program (its Claudius program setting).
By hand, add this to the configuration file (in Claude Desktop’s Settings, Developer, Edit Config opens it), with the
absolute path of your claudius (which claudius prints it; Claude Desktop does not see your shell’s PATH):
{ "mcpServers": { "claudius": { "command": "/Users/you/.local/bin/claudius", "args": ["mcp"] } } }
| system | configuration file |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json |
Claude Desktop starts its local servers itself, so --http is refused for it.
Claude Code
claudius connect claude-code # runs: claude mcp add --scope user claudius -- /path/to/claudius mcp
claudius connect claude-code --http # runs: claude mcp add --scope user --transport http claudius http://127.0.0.1:7878/mcp
The plugin brings the skills along: claude plugin marketplace add devlato/claudius, then
claude plugin install claudius@claudius. When the claude command is not on your PATH, connect prints the
command for you to run where it is. Claude Code’s own command does the same, with the claudius on your PATH:
claude mcp add --scope user claudius -- claudius mcp. Without --scope user, Claude Code adds it to the folder you
run that in only.
Cursor
claudius connect cursor # "claudius": { "command": "/path/to/claudius", "args": ["mcp"] }
claudius connect cursor --http # "claudius": { "url": "http://127.0.0.1:7878/mcp" }
Both edit mcpServers in ~/.cursor/mcp.json and keep a .bak copy. A project’s .cursor/mcp.json takes the same
entry. Cursor’s install link adds it as well, after asking:
Add claudius to Cursor
starts the claudius on your PATH; claudius connect print prints a link with its full path.
Codex
claudius connect codex
This adds [mcp_servers.claudius] to ~/.codex/config.toml, with the absolute path of claudius and args = ["mcp"], and leaves the rest of the file as it was (comments included), with a config.toml.bak copy. Codex starts
local servers itself, so --http is refused for it. Codex’s own codex mcp add claudius -- claudius mcp writes the
same table, with the claudius on your PATH.
Skills
claudius connect also installs claudius’ skills for the clients that
read them from a folder (Claude Code, Cursor, Codex), and writes them as zips for the Claude apps. --no-skills
leaves them out.
Any other client
claudius connect print prints each assistant’s own command (claude mcp add, codex mcp add, Cursor’s install
link) with the full path of this claudius, the stdio configuration as JSON for Claude Desktop and any other client, and
the HTTP address. --port (or CLAUDIUS_PORT) changes the port in the HTTP address.
ChatGPT and other assistants in the cloud
An assistant that runs on someone else’s computer cannot start claudius mcp or reach 127.0.0.1. It needs a public
HTTPS address, so put claudius behind a tunnel and require a token:
TOKEN=$(openssl rand -hex 16); echo "$TOKEN"
claudius serve --public --token "$TOKEN"
cloudflared tunnel --url http://127.0.0.1:7878
--public makes claudius answer requests addressed to the tunnel’s host name; it still listens on 127.0.0.1. In
ChatGPT’s developer mode, add a custom connector with the URL https://<tunnel>/mcp?token=<token>. Clients that can
send headers can use Authorization: Bearer <token> instead of the query string. Open
https://<tunnel>/?token=<token> in a browser to use the studio through the same tunnel.
--public always runs with a token. Without --token it makes a new random one at every start and prints it, which
is enough for a browser but means updating the connector after each restart; a token of your own, as above, stays
the same. A shared claudius reads and writes files only in its own folders; the security
model explains what the token, --public and those folders protect.
The studio and the assistant on one song
claudius mcp first asks http://127.0.0.1:<port>/api/hello (or --url) whether a claudius is running:
claudius studio (or serve) on :7878
session: song, undo, renders
/ | \
studio window browser tab claudius mcp <-- stdio -- Claude Desktop
(HTTP client)
- A studio is running: every tool call becomes a request to its HTTP API. The assistant edits the song you have open, you hear each render in the studio, and you can change things yourself between its calls. Undo in the studio takes back the assistant’s changes too.
- A claudius that asks for a token is running (
serve --token, or--public), andclaudius mcpwas not given that token: it stops withthe claudius at http://127.0.0.1:7878 asks for a token: pass --token or set CLAUDIUS_TOKEN (a wrong one is refused too)rather than quietly working on a song of its own. - Nothing is running:
claudius mcpstarts a session of its own and serves the web studio on--port. Openhttp://127.0.0.1:7878to see and hear what the assistant does. If the port is taken by another program, the session still works but has no web studio.
So open the studio before you start the assistant’s chat. With --url http://host:port and --token, claudius mcp
drives a claudius elsewhere, and fails if none answers there.
A client connected over HTTP (/mcp) always works on that server’s session; there is nothing to decide.
The tools
A tool that edits the song waits until the change is rendered and judged, then answers with the song and the
verdict, so the assistant hears the result of every change. An assistant’s link gives up on a call after a minute or
so (the desktop app’s after about 80 s), so a tool whose work takes longer than 45 s (remaking or sampling a long
recording, rendering a long song, a mutation, an evolution, a save) answers then that it is still going, and the work
goes on. status says how it goes, and gives its answer once it is done: each one’s, in the order they were called,
when the work of more than one call goes on.
| tool | parameters | what it does |
|---|---|---|
new_song | genre (required), seed, bpm, key, loops (false), sampled (as the genre is), sample_search, complexity (0 to 1; the genre’s own) | composes a new song in a genre, renders and judges it; sampled builds it on samples from free libraries and sample_search names the kind of record its phrase is searched for (Songs built on samples); complexity says how layered it is, from 0 (the genre’s core) to 1 (instruments doubled on instruments, a counter-melody, more percussion) |
arrange | brief (required), pick | a change asked for in the person’s words (“make the drop longer”, “the hats quieter in the intro”), read as the studio’s palette reads it (its rules, and its small model where they read nothing): makes the surest reading as one change that undo takes back whole, renders and judges it, and answers with what it read, what it did and the other readings, numbered, for pick after an undo; a brief read as no change says so |
make_song | brief (required), seed | makes a song from what the person asked for in their words (“a chill lo-fi beat around 80 bpm in D minor, minimal”): reads the genre (two joined by “with”, “and” or “meets” are a fusion, the first leading), the tempo, the key, how full or sparse it is and whether it is built on samples, as new_song takes them, and answers with what it read, the song in plain words and the song; a brief that names no genre gets the nearest by what it describes, said so, or an error that says to ask the person |
examples | name | the example songs, by decade, then the classics remade, the songs built of layered sounds and the studies of famous records: each one’s name, title, style and the artists the style is heard on (of a classic, the piece; of a study, the record); with a name, how that one is made and its script; read only |
open_example | name (required) | opens an example song as the song, renders and judges it, and answers with it in plain words; undo brings back the song before |
get_song | the open song in plain words for the person (what it is, how it goes, what plays, what the critic would fix first), then the song and its verdict, and the whole song as a script | |
run_script | code (required), listen (true) | edits the song with a script |
script_reference | the script language reference (markdown) | |
guide | topic (none: the list) | the skills built into claudius, for an assistant that has none installed: songs, remix or setup (a skill), or script, verdict, genres or tools (the songs skill’s references); read only |
listen | stems (false) | renders the song if it changed and returns the verdict |
quick_fix | target (an issue’s, as the verdict’s quick fix (<target>) lines name it; none: all) | makes the verdict’s quick fixes, the issues one change fixes, as one edit |
mutate | count (4, 1 to 32), keep_best (true) | tries variations steered by the critic’s issues and keeps the best if it beats the song |
evolve | generations (3, 1 to 20), children (6, 2 to 32) | runs an evolutionary search from the song and keeps the best candidate if it beats the song |
status | a tool’s work that went on past its call: how long it has gone on, or its answer once it is done (given once); then idle or busy (with progress), the last 25 log lines, the latest verdict | |
version | which claudius the assistant talks to: these tools’ version, the claudius they drive and where it answers, and whether a studio follows it (one that asked for the song in the last minute); a claudius before 0.11 has no version tool | |
undo, redo | takes back or brings back the last change, then renders | |
stop | stops a mutation after the candidate in progress, an evolution after its generation, or a pack download after the pack in progress; a render always finishes | |
catalog | the genres by family, with their other names and tempo ranges, drum names, synth presets, installed instruments and every pack with its licence | |
find_genre | query (required) | the genres that answer what the person asks for, best first: a genre’s name or another name for it, an era, a scene, an artist or a sound (90s, west coast, r&b, dusty), then those near what the words mean once the embedding model is there (“something to study to”), as the studio’s genre search finds them |
save | path (optional), stems (optional, off) | writes the song folder: blueprint.json and song.rhai at once, then, from a render of the song as it is then, the whole folder claudius make writes, and with stems each track on its own in stems/ (a gigabyte or more for a song); a save asked for during a job waits for it, and one the disk has no room for is refused before it writes the audio |
export | formats (required, such as ["mp3", "flac:16"]), path (optional) | writes the song in those formats into its folder or path, named after the song; renders first when the song changed since its last render. project writes the song itself as a project file instead, with the recordings it plays and its release, and needs no render |
publish | what the person said: artist, title, version, featuring, album, genre, subgenre, date, label, writers, producers, owner, isrc, upc, explicit, made, artwork (a file); write, path | checks the song for release as stores do and, with write, writes the release kit; what is left out stays as it was, and the assistant is told never to choose made |
open | path (required) | opens a song folder, a blueprint.json, a .rhai script (which runs on the open song), or a project the online demo saved (a .claudius file, or the .zip an earlier demo saved, unpacked into a song folder of its own under ~/Music/claudius) |
analyze | path (required) | tempo, key, progressions, the song’s own sections (verse, pre-chorus, chorus, bridge … each with the letter of the music it plays and where it builds), the phrases sung to the beat, drum grid and bass style of an audio file |
tune | track (required), strength, speed_ms, humanize, vibrato, scale, off | a tuner first in the track’s chain, or the one there changed, or taken out (Tuning a voice) |
assess_voice | take, or path and key | how a take or a recording is sung: how many notes land within 25 and 50 cents of the note meant, the furthest off, and the singer’s range, sharpness or flatness by register, scatter, settling and vibrato (Your voice); read only |
remake | path (required), genre, seed, bpm, sampled (true), flip (false), rebuild (false) | a rework of an audio file in a genre that stays recognizable: all of it plays through, its voice and chords as they are without its drums and its bass (separated from the rest with the ears), in its own sections and on its chords, with the genre’s drums, bass and mix under it (Remaking a song from audio); flip: true makes a new song of the genre on its hook and passage after passage of it, each section on as many of its bars on end as it has, its voice in them, its drums and a flip of it; rebuild: true the song itself, every part of it played on claudius’s sounds as the notes and hits it plays, its voice kept; sampled: false a new song on its skeleton only |
song_like | genre, seed | a new song like the recording analyze heard last, in the genre (the open song’s by default): its tempo, halved or doubled into the genre’s range when it is outside, its key, progressions, form and swing, and none of its sound; quicker than remake with sampled: false, which listens to the file again |
change_genre | genre (required; any number fused with +), seed | the open song in another genre, as one change undo takes back: its form, chords and key, the recordings it plays, the notes written on its parts, its lead’s melody and its pattern tracks kept; the genre’s drums, bass, parts, sounds, swing and mix playing it, each section by the genre’s tracks of the kinds that played there; its tempo kept when recordings play in it, else the nearest the genre plays; says what it kept |
harmonize | part (required), style, sound, name | adds chords under a part’s melody, a new part that harmonizes it: a chord under each of its notes (block, on its own sound), in a chord style’s rhythm or as a genre’s comping idiom, fitting its notes and the song’s chords, in the sections it plays in; then listens |
generate_track | what (required: drums, percussion, bass, chords, keys, pad, strings, lead, arp), genre, replace, name, listen (true) | writes a track the way a genre plays it, into the open song: a part in that genre’s idiom, on its sounds, in its register and mix (a new track, or in place of replace), its drums in place of the song’s lanes of their names, or its percussion beside them; the genre can be any, so a song gets a reggae bass or trap hats. Each call is another take |
vary_track | track (required), take, listen (true) | a variation of a part’s or a drum lane’s take (the same rhythm, other details; a lane’s strong hits kept), or with take another take |
set_layers | track, layers (1 to 8: sound, bank, band, level, pan, transpose, duck, fx), listen (true) | plays a track with several sounds at once, each its own layer of the track’s notes: the band of frequencies it keeps, its level against the others, its pan, transpose, duck under the kick and effects, summed before the track’s own effects; a part, a drum lane or a pattern track’s sound. get_song shows a track’s layers as this takes them; undo brings the sound back |
swap_sound | track, to, only (drums or parts), listen (true) | swaps a sound: a part or a drum lane onto the next sound that fits it (its genre’s own first, then what its genre draws for the role, then further afield, never one another part plays) or onto to; a part played by a rack swaps the sound it is heard by and keeps its other layers (the sub under a stacked bass); with no track, the whole song: the drums onto the next kit and each part onto its next sound. Says what else the track could play; undo swaps back |
add_take | path, from (required), name, role | adds a recording as a take that plays once from the start of section from, and listens |
search_recordings | query (required), limit | searches the free online libraries and lists each recording as library:<id>, which add_take, sample_song, analyze and remake take as a path |
trim_take | track (required), start, end (seconds into its recording) | trims a take to that much of its recording, and listens; undo brings it back whole |
graph | the song as a graph of its signal, in words: each track through its effects into its bus (its sends, its ducking, its sections), the buses and returns into the master, the master’s chain out; read only | |
sample_pieces | path (required), seed, count, bars, find, kinds | offers the auto-sampler’s pieces of a recording, its phrases and a loop of its hook and of another passage, its break and its bass line, and more of the kinds producers sample most where they differ (a sparse groove and a busy one), each as it was cut and treated, with what it scored for and where to hear it, before any goes into the song |
redraw_pieces | seed | draws the pieces of the same recording again: another take, of other pieces than the last where there are any |
keep_pieces | keep (required: [{id, treated, chopped}]), sections, every | samples the pieces chosen into the song, each as it was cut or treated, whole or chopped onto pads, coming round as every says (as the song suits by default), then listens |
sample_song | path (required), count, bars, find, sections, how, every, kinds | samples a recording’s vocals into the song: finds its best phrases sung whole (those sample_pieces offers first), cleans them of its drums, fits them to the song’s tempo and key, places them where they agree with its chords and mixes them as vocals, then listens; or another way (how), or the best piece of each of kinds, kept as its kind plays |
transcribe_drums | take or path, bars, variant, bpm, keep_take | turns a beat, played or beatboxed into the song’s kick, snare (or clap) and hat lanes, then listens: a take of the song (muted after, unless keep_take) or a recording (a drum loop, a break) |
extract_groove | path (required), name, lanes, bpm | takes the groove of a recording’s drums: where each sixteenth of the bar lands against the grid and how hard. Keeps it with the song, puts the drum lanes in it (lanes, or all), then listens. Give bpm when the tempo is known; heard, a loop’s can come out twice or half what it is |
request_pitch_check | low, high, note | asks the person for a pitch check: six phrases to sing back in the studio’s Record window; answers at once with the check’s id and a link that opens the studio |
wait_for_pitch_check | id (required), seconds | waits for the check to be sung, and says what claudius heard: how many notes, how near, in which octave, steps against leaps, and the voice, which tune then sings takes as; read only |
wait_for_message | after (the last message’s id seen), seconds (50, 1 to 300) | what the person writes to you in the studio’s chat after message after (none: from now on), with the messages before it, as soon as they write; else, after seconds, that they have not: call it again to keep listening. While you wait, and for 20 s after, the studio says you listen (Talking to your assistant); read only |
send_message | text (required), reply_to | writes to the person in the studio’s chat, as your client calls itself, in answer to their message reply_to; the studio notifies them when it is in the background. Returns the message’s id |
request_take | from (required), role, name, note | asks the person to record a take: the studio’s Record window opens for it, showing note; answers at once with the request’s id and a link that opens the studio |
wait_for_take | id (required), seconds (50, 1 to 300) | waits for the take asked for: what claudius made of it once the person sends it, or that they will not record it; after seconds, says they are still at it |
transcribe_take | take, sounds (required), name, role, chromatic, keep_take, style | turns a take’s melody into the notes of a new part for each sound, as it was sung or in a style, and listens |
add_notes | from, notes ([{t, d, p, v}]), sounds (required), name, role, style | writes notes, a melody, a bass line or chords, into a new part for each sound, and listens |
install_packs | names (from catalog; none: the default packs that are missing, or lack instruments added since they were installed) | downloads and installs sample packs in the background, as the studio’s Download the packs does; status follows it, and a claudius shared over a network does not download them |
command | command (required, an object), listen (true), explain (false) | sends one raw API command, checked first: one claudius has no name for, or with a field it does not take, is not sent, and the answer says what it takes and the name nearest the one written; explain only says what the command takes |
Details that matter when you read an assistant’s transcript:
listen: falseonrun_scriptandcommandskips the wait, so an assistant can batch several edits and listen once. The studio still renders each change unless it runs with--no-auto-render.request_takedoes not wait for the person. The assistant callswait_for_takeuntil the take arrives: it returns as soon as the person sends it or says Not now, and an assistant whose calls time out can ask for fewersecondsand call it more often.- Past 45 s, a call answers that its work is still going, and
statusgives the answer. Behind that,listenfollows the render for up to 240 s,save240 s,evolve280 s andmutate300 s.mutateandevolveanswer with the log lines the job wrote (one per candidate and its score) and then the song. - A
seedis optional everywhere. Without one, the session picks one from the clock;new_songnames it in its message andget_songshows it in the script’s first line, so the song can be made again. savewithout a path writes to the folder the song lives in under~/Music/claudius(the one it was opened from or saved to), else to~/Music/claudius/<genre>-<title>-<seed>.rename_song {title}(throughcommand) renames a song, and the folder claudius named for it moves with its history. Paths are on the computer running claudius, and a shared claudius refuses paths outside its folders.- Everything the studio does, an assistant can do: each of the studio’s controls sends one command, and each
command has a tool of its own or goes through
command(a test keeps it so).commandcovers the edits the studio makes that have no tool:set_tempo,set_key,set_swing,set_progression,add_section,remove_section,move_section,split_section,toggle_layer,set_section(includingprog),set_drum_step,set_drum_pattern,set_trig,set_lane,set_part(includingreseed),add_trackandremove_track(a drum lane or a part of any role, as the arrangement’s + Add a track adds),set_notes(a part’s notes over a progression written out, as the studio’s Notes tab does),set_mix(includingsolo),set_fx,open_text,add_hits(drums played on pads, folded into the lanes they strike),add_scratch(a scratch on a bar or a few of one of the song’s tracks, or of the whole mix, kept as a take), andcancel_take_requestandcancel_pitch_checkfor a request no longer wanted. The songs skill’s tools pair each control with its tool and command. - A raw command is checked against its schema before it goes, because a field written wrong would otherwise be dropped and the command sent without it:
set_mix takes no "lvl_db" (did you mean "level_db"?), so nothing was sent.
set_mix takes:
track (string, needed)
level_db (number)
pan (number)
...
- A failed edit changes nothing and comes back as a tool error (
isError: true) with claudius’ message, the same text the studio shows:
Runtime error: track 'x': unknown sound 'nope' (drums: bd kick sd snare cp clap hh ch hat oh ohat rd ride cr crash lt mt ht tom rim rs sh shaker cb cowbell snap perc; synths: sub_bass 808 reese acid saw_bass pluck_bass organ_bass wobble log_drum pluck supersaw pad warm_pad stab epiano keys bell organ strings square_lead chip fm_bass rubber_bass moog_bass dist_bass deep_bass saw_lead pwm_lead whistle soft_lead glide_lead brass_lead fm_lead vox_lead solina glass_pad pwm_pad air_pad vowel_pad swell_pad tine_piano clav house_piano brass_stab rock_organ fm_marimba fm_kalimba harp_pluck mallet cowbell_lead; sampled: piano upright rhodes wurlitzer hammond string_ensemble violins cellos pizzicato brass trumpet flute harp marimba vibes kalimba upright_bass guitar choir sax ... (claudius-packs aliases)) (line 1, position 1)
What the assistant reads back
This is listen after tempo(122); mix("lead", #{ level: -2 }); on a house song made with seed 9, in a session on
port 7931:
Crimson Tide — house at 122 BPM in G dorian, swing 0.53, 72 bars (2:22)
progression A: i7 IV9 i7 VIImaj7 i7 IV9 i7 V7
progression B: i7 ii7 i7 VIImaj7
form:
0. intro (intro) bar 0 +8, energy 0.36, drums 'sparse' [filter_in]: kick hat perc
1. groove (groove) bar 8 +32, energy 0.66, drums 'main': kick clap hat ohat perc bass chords top
2. break (break) bar 40 +8, energy 0.35, drums 'main' [build, gap]: pad lead chords
3. drop (drop) bar 48 +16, energy 0.99, drums 'main' [impact]: kick clap hat ohat shaker perc bass chords lead arp top
4. outro (outro) bar 64 +8, energy 0.20, drums 'sparse': hat perc
tracks:
kick [drum kick] sampled bd (tr909:bd); level +0.0 dB, pan +0.00, reverb 0.00, delay 0.00, duck 0.00, -13.1 LUFS
clap [drum clap] sampled cp (tr909:cp); level +0.0 dB, pan +0.00, reverb 0.18, delay 0.00, duck 0.00, -15.1 LUFS
...
lead [part lead] synth patch 'brass_lead'; level -2.0 dB, pan +0.00, reverb 0.21, delay 0.34, duck 0.20, -20.6 LUFS
arp [part arp] synth patch 'bell'; level +0.0 dB, pan +0.20, reverb 0.29, delay 0.18, duck 0.30, -21.1 LUFS
fx [fx fx] risers, impacts, crashes; level +0.0 dB, pan +0.00, reverb 0.25, delay 0.00, duck 0.00
render: -10.1 LUFS, true peak -1.0 dBTP, 142 s
verdict 93.3/100: 93/100 (arc 0.88, mix 0.92, theory 1.00). Fix first: nearly mono (correlation 0.97): widen pads, chords and effects
scores: arc 0.88, mix 0.92, theory 1.00
loudness by section (LUFS): intro -11.8, groove -9.5, break -12.4, drop -9.0, outro -20.7
issue (0.35): nearly mono (correlation 0.97): widen pads, chords and effects — fix: width+
audio: http://127.0.0.1:7931/api/audio/8.wav (the studio at http://127.0.0.1:7931 plays it)
get_song adds the song as a script in a js block. A verdict of a song with several sections also has a
loudness by section (LUFS): line, each section’s median loudness in the order they play, which shows whether the
drop is really the loudest part. With earshot’s models loaded, the verdict has a line that starts with ears:, and
up to eight issues follow, each with where its fix lives (issue (0.24): dull 4-8 kHz: ... — fix: band:presence-). The critic and the ears
explains them.
Prompts that work
The assistant does better with what you want to hear than with what to type. Some that work well:
- “Make a deep house track at 122 BPM in F minor. Keep the intro sparse and make the drop hit hard. Listen to it and tell me the two biggest problems before you change anything.”
- “Read the script reference, then replace the chords with a Rhodes playing i9 VImaj9 iv9 v7, two bars each.”
- “The breakdown is too busy. Take the lead out of it and lower the pad by 3 dB. Undo if the verdict gets worse.”
- “Try eight mutations and keep the best one. Then tell me what changed, in musical terms.”
- “Remake ~/Music/reference.mp3 as lofi, keep its progression, and put the drums on the 808 kit.”
- “Write the hats yourself as a pattern track: sixteenths, with an open hat on every offbeat and a roll before each drop.”
- “Save it to ~/Music/claudius/night-drive.”
Two habits help: ask the assistant to get_song before it edits a song you made in the studio, so it starts from
what is there, and ask it to say what it changed in musical words, since you hear the result and it reads numbers.
MCP over HTTP
The endpoint at /mcp is MCP’s Streamable HTTP transport. Every request is a POST with
Content-Type: application/json and Accept: application/json, text/event-stream; replies come as server-sent
events. The first request is initialize, whose reply carries an mcp-session-id header that later requests send
back. The endpoint sits behind the same guards as the rest of the server: loopback host names only unless --public,
and the token when one is set.
curl -si http://127.0.0.1:7878/mcp -H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}'
HTTP/1.1 200 OK
content-type: text/event-stream
mcp-session-id: 67068efb-d5e6-4618-84eb-326443bc774c
...
A request without the session id gets 422 Unexpected message, expect initialize request; one without both Accept
types gets 406 Not Acceptable.