Changelog
Source:NEWS.md
mordew 0.0.0.9055
- The clients of
call_tool(),read_resource(),get_prompt(),mcp_client(),expect_hostile_safe()andrun_dev()wait 90 seconds for an answer by default, where they waited 30: the server lets a call run 60 seconds, so a call of 45 seconds failed on the side of the client.
mordew 0.0.0.9054
A request whose text is the path of a file or a URL gets -32700, as any text that is not JSON:
jsonlite::fromJSON()opened that file or that URL. The client ofmcp_client()and the channel of the notifications of the workers parse what they receive the same way.The page of
widget_page()names itself inappInfoin itsui/initialize, as the schema of MCP Apps asks: it sentclientInfoandcapabilities, which a client that validates the request refuses.A request whose handling fails in the front gets -32603, “Internal error”, and the R error goes to stderr; over HTTP, a request the server cannot read gets 500. Such a request got no response:
skills/getwithparamsthat are not an object, orresources/directory/readon a server without skills.The front keeps reading the channel of the notifications of the workers after a message it fails to forward, and writes the error on stderr: one such message stopped progress, logs and resource updates for every client until the server restarted.
create_mordew()refuses apaththat is an existing file, as it refuses a folder: withoutoverwrite = TRUE, it deleted that file.add_skill()refuses a name that is not the name of a skill, 1 to 64 lowercase letters, digits and single hyphens, and a skill that already exists: a name such as../../outsidewrote out of the skills folder, and a second call put the template back over an editedSKILL.md.The base64 of an image, of a sound, of the blob of a resource or of a file of a skill, of a file embedded in the styles of a widget and of a
requestStateis on one line:jsonlite::base64_enc()breaks it every 76 characters.A tool with
@mcpOutputthat returns an empty list, or a list without names, gets anisErrorresult: itsstructuredContentwent out as an array, against theoutputSchemaof the tool.The tests refuse a token of the same length with another content, and read
bearerin lowercase: none failed when the token was only compared by its length.The tests refuse the origins that only start like a local one, such as
http://localhost.evil.com: none failed when the end of theOriginwas not checked.expect_conformance()stops when the suite ran no check, as whennpxfails without network: it passed, with zero failed check.An eval case accepts a round number whatever its type:
1e5expected was refused against100000called by the model, since the two were compared as the texts"1e+05"and"100000".A
partial()argument of an eval case refuses a value of the model that is not one string, such as an array ornull: it stoppedrun_evals()with an error, and the results of the runs already made were lost.ask()checks the answer to a form ofinput_form()against the form, as@mcpElicitdoes: it stops on anactionthat is notaccept,declineorcancel, and on an acceptedcontentthat does not fit the fields. The function got whatever the client sent.Over stdio, the server ends the
subscriptions/listenthat are open when its input closes, and leaves: it stayed for as long as one was open.Over HTTP, the body of a request is read as UTF-8 whatever the locale, as a line is over stdio, and so are the text of a file of a skill and the instructions of the server: in a C locale,
cafécame back ascaf<c3><a9>.The client of
mcp_client()does not take a request of the server for the response it waits for when the two carry the same id: it answers the request, then gets its response.The client of
mcp_client()answers apingof the server with an empty result, and a request it does not know with -32601: both got no answer.A list of one item in the frontmatter of a
SKILL.md, such asallowed-tools: [Read], is served as a list:skills/listandskills/getsent it as the scalar"Read", which a client that compares the frontmatter with the file refuses.The roclet stops on two functions with the same name that are a tool, a resource or a prompt, as
add_tool("surfaces")thenadd_resource("surfaces")write: the last function defined answered for each of them.install_dev_deps()installs devtools and rsconnect too, whichdev/03_deploy.Rcalls, and the error ofadd_dockerfile()on a dockerfiler older than 1.0.1 says how to install it:pak::pak("ThinkR-open/dockerfiler").add_dockerfile()adds.Renvironand.envto the.dockerignore: the Dockerfile copies the folder of the package into the image, and a key kept in one of these files stayed in a layer.A request whose
paramsare not an object gets the -32602 of its method: the worker failed on it before the method checked it, and the client got “The worker running the tool stopped”, with the R error.resources/readof the text of a template itself, such asrunlog://runs/{year}, is read as any URI of that template: it got -32603, the template being taken for a plain resource.An SSE stream carries
X-Accel-Buffering: no, as the 2026-07-28 revision asks, so that a proxy such as nginx does not hold its events in a buffer.The reason of a cancellation is written on stderr on one line, without its control characters: a client could write a line of its own in the log of the server.
tasks/resultadds the ID of the task to the_metaa result already has, as the one of a tool with@mcpWidget: the result went out with the_metaof the widget alone.A number too large for a double, such as
1e999, is refused as not being a number: it reached the tool asInf.expect_hostile_safe()now tries the largest number a message carries, 1.79769313486231e308: the largest double, written with 15 significant digits, is read back as infinite.A tool with
@mcpWidgetsends its widget only to a client that declared the MCP Apps extension: every client got its scripts and styles, about 4 MB for a plotly chart.The workers no longer have
MORDEW_TOKENin their environment:run_mcp_server()takes it out before it starts them, and puts it back when it ends.-
GET /mcpwithout a session gets 405 withAllow: POST, as the specification asks of a server that offers no stream there: it got notifications/cancelledleaves a call that runs as a task alone: it failed with “attempt to apply non-function”, such a call being stopped withtasks/cancel.A 2026-07-28 request that carries an
Mcp-Session-Idthe server does not know is served, the header being ignored as that revision asks: it got 404.The page of
widget_page()writes the error in its console when the client refuses itsui/initialize: it stayed blank without a word.assert_pass_rate()stops on aminthat is not between 0 and 1, and on results without a run:min = 80gave “a pass rate of 8000%”, and no result passed in silence.add_tool(),add_resource(),add_prompt()andadd_skill()stop on apkgwithoutDESCRIPTION, before they write anything:add_tool()createdR/andtests/in a folder that was not a package.check_tools()finds a forbidden call inside a function that is called where it is written, such as(function(y) system(y))(x): it only looked at the arguments of a call.expect_resource(),expect_tool_error()andexpect_structured_output()fail on a result without text, with their message: they stopped with an R error.The client of
mcp_client()stops the server wheninitializefails: a server that did not answer in time stayed, until R collected the client.input_form()stops on a field that is not a string, a number, an integer, a boolean or choices, the only types an MCP form takes, as@mcpElicitdoes: it sent a nested object in the form.@mcpElicitkeeps a default ofNAorInfout of the form: JSON has neither, and the form went out withnull, or with the string"Inf"for a number.run_evals()skips the lines of the output ofclaudethat are not JSON objects, such as an empty line or a warning: it stopped on them with a parse error.run_dev()with ellmer calls a tool that has a parameter namedtoolorclient: such a parameter hid the variables the call needed, and the call failed.use_evals()creates thedev/folder when the package has none, and refuses an existing workflow as it refuses an existing script: it wrote one of its two files without saying that the other was missing.add_tool(),add_resource()andadd_prompt()refuse the name of a function the package already has, such asrun_mcp_server: they wrote a second function of that name.The URI of a file of a skill has its segments percent-encoded, so that
my week.mdgives a valid URI, read back to the same file, and a.json,.csvor.htmlfile of a skill has its own type, still sent as text: each wastext/plain.On Posit Connect,
launch_server()stops when the package next to_server.ymldoes not install: the server started without it, and the error that followed said nothing of the installation.tool_call()stops on an argument without a name,eval_case()on an answer that is not atool_call(), andrun_evals()on a case given without a list: the first was accepted and ignored by the comparison, the others stopped with “$ operator is invalid for atomic vectors”.The roclet stops on two
@mcpTypefor the same parameter, on a default value that its own type refuses, and on a resource whose URI has no scheme: the three were written to the registry.run_mcp_server(tasks = )is one less thanworkersby default, and at least 1, where it was 8: a task holds its worker until it ends, so four tasks held the four workers of an HTTP server and the calls of every client waited without an answer. A worker now stays free for the calls.The rates of
run_mcp_server(),tool_calls,completionsandtask_requests, count the requests of each session on their own: one count for the whole server let a session that called fast have the calls of the others refused. The requests without a session share one count.An HTTP server keeps at most 1024 sessions, the one that comes beyond ending the session seen least recently, and the last 1000 events of a stream: nothing bounded either, so a process that opened sessions, or a stream that listened for days, made the memory of the server grow.
An HTTP server answers 415 to a POST on
/mcpwhoseContent-Typeis notapplication/json: a page served on another local port, whoseOriginis local, could send a call as a form does, without the browser asking the server first.A message that is not a JSON-RPC 2.0 one gets -32600: an object without
"jsonrpc": "2.0", or with anidthat isnull, a boolean, an array, an object or a decimal number, was served, and{}was accepted without an answer.The stream of a GET of a 2025-11-25 session gets a comment every 15 seconds, as the streams of 2026-07-28 do, and a session is not idle while they go through: a session that only listened was forgotten after an hour, and a proxy could close its silent stream. A new GET of the session closes the stream of the one before, which stayed open.
A session that ends, by
DELETE, after an hour idle or as the least recently seen of 1024, has its listening stream closed and its calls stopped: a call that waited for an answer of the user stayed pending for ever.A request that says 2025-11-25 in
_meta["io.modelcontextprotocol/protocolVersion"]is served as a 2025-11-25 request: it got -32022 with 2025-11-25 among the versions supported, so a client that retried as the specification says got the same error again.An integer argument beyond R’s integer range is refused with “must be an integer between -2147483647 and 2147483647”: the error said “must be of type integer” of a value that is one.
The
requestStateof a 2026-07-28input_requiredresult is signed with a digest of the arguments of the call and an expiry an hour later, as the specification recommends: a state given for one call was accepted with other arguments of the same tool, for as long as the key lived.@mcpWidgetreads the scripts and stylesheets of a dependency that gives them with their attributes, aslist(src = "chart.js", defer = NA), leaves in a style theurl()of a file that is not there, and says of a dependency without local files that it has none: the two first stopped with “cannot open the connection”, and the last sent the widget without its scripts.The stdio client of
call_tool()andmcp_client()sendsnotifications/cancelledfor a request that got no answer in time, answers -32601 to a request of the server for a capability it did not declare, where it answered as if it had, andmcp_close()asks a server that did not stop with its input to terminate before it kills it.expect_hostile_safe()first calls the tool with its arguments as given: for a tool without a parameter, or with only booleans, enumerations, arrays or objects, it had no value to try, called nothing and passed.call_tool(),read_resource(),get_prompt(),check_tools()and theexpect_*()say to givepackagewhen they run outside the tests of a package and get none: they stopped with “attempt to use zero-length variable name”.run_evals()stops when the Claude Code session did not load the MCP server of the package, with the status the session gives for it: Claude Code skips a server that fails and goes on, so a case that expects no tool call passed without a server.The
type_*()functions refuse a bound that is not a number, a length or a number of items that is not a whole number, a minimum above its maximum, andtype_enum()an empty set of values: each was written to the schema.content_annotations()says that a missing priority is not one, andrun_mcp_server()thatworkersis at least 1 and its other numbers at least 0, where both stopped with an error of R or started.Four checks more: the text that the model of the client writes for
@mcpSampleis checked against the type of its parameter, as the answer to a form is;@mcpCsptakes origins only, where*or a word with a;went to the page;elicit_url()refuses a URL that carries credentials, as its help asks; the signature of arequestStateis compared in constant time, as the token is.An
Mcp-Param-*header that mirrors a number is compared as a number, as 2026-07-28 asks:12.0was refused for the argument 12. A 2026-07-28 request whose client capabilities are an array is refused as one without them, and an empty line over stdio is skipped, where it got a parse error.A confirmation message of
@mcpConfirmis filled in one pass: an argument whose value held{other}had it replaced by the value ofother.@mcpVisibility app appgivesapponce.An
@mcpTypeexpression that fails stops with its function and its parameter before the message of R.A server whose package has no tool, resource or prompt says so when it starts, and to run
devtools::document(): a package never documented served nothing without a word.The functions that write or read the package being developed take its folder as
mordew_wd, where they tookpkg, as golem does withgolem_wd, and default toget_mordew_wd(): themordew.wdoption, or the working directory.pkgwas close topackage, the name of an installed package thatcall_tool()andrun_mcp_server()take.
mordew 0.0.0.9053
- The test of the skills of a package compares their folder with forward slashes, as
find.package()gives it on Windows.
mordew 0.0.0.9052
The tags of the page of an MCP App fill its
_meta.ui, sent inresources/listandresources/read:@mcpCspfor the domains it may reach,@mcpPermissionfor camera, microphone, geolocation and clipboard,@mcpDomainand@mcpBorder.@mcpWidget <function>draws the value of a tool as an htmlwidget, sent in_meta["mordew/widget"]of its result with its scripts and styles embedded, for the page of its MCP App.widget_page()gives the page that draws the widget of@mcpWidget: it talks to the client with the protocol of the extension, adds the scripts and styles of the widget, draws it and sends its size.The skills of
inst/mordew/skills/are served to 2026-07-28 clients with theio.modelcontextprotocol/skillsextension:skills/listandskills/getgive the frontmatter of each skill and the digest and size of its files, read withresources/readat theirskill://URI. The server stops at start on a skill whose frontmatter is missing or wrong, or over 512 files or 16 MiB.resources/directory/readlists a folder of a skill.add_skill()creates theSKILL.mdof a skill, anddev/02_dev.Rcalls it.mcp_server(skills = )serves the skills of a folder next to a script.
mordew 0.0.0.9051
@mcpApp <ui://uri>links a tool to the page of its MCP App, in_meta.ui.resourceUriof its definition; the roclet andmcp_server()stop on a page that is not a resource of the server.@mcpVisibility model,appor both says who may call a tool: the model, the page of an MCP App, or both. A client that does not declare theio.modelcontextprotocol/uiextension gets no tool for the page only intools/list, which is then private to the client for 2026-07-28.
mordew 0.0.0.9050
- A resource with a
ui://URI and@mcpReturns htmlis the page of an MCP App: it is sent astext/html;profile=mcp-apptext.
mordew 0.0.0.9049
Over HTTP, every answer that is not a stream carries
Connection: close, since the server closes the connection after it. Without it, a client could send its next request on that connection and read the end of the previous answer, which nanonext writes twice after an empty body, as the start of its response.The registry written by the roclet keeps
propertiesan object for a tool whose parameters the user fills all: it was written aslist(), sent as[], an invalidinputSchema.dev/conformance.Rruns version 0.2.0-alpha.12 of the official MCP conformance suite against a test package built fromdev/conformance/: its 72 checks of 2025-11-25 pass.@mcpSample <param> <message>asks the model of the client for a text before the tool runs, withsampling/createMessage, and gives it to the tool as that parameter; a 2026-07-28 client gets it ininputRequests, or -32021 without thesamplingcapability.A prompt may return a list of
content_*()blocks, sent as oneusermessage per block;expect_prompt()matches the text of every message.type_enum(enum_names = TRUE)writes the titles in the deprecatedenumNames.ask()asks the client while a tool, a resource or a prompt runs, with requests made byinput_form(),input_sample()andinput_roots();can_ask()tells whether the client declared what a request needs. A 2026-07-28 client gets the requests in aninput_requiredresult, with the answers so far in arequestStatesigned with HMAC-SHA256 (the key isMORDEW_STATE_KEY, or a random one), and -32602 for arequestStatethe server did not give; a 2025-11-25 client gets each request, then the server runs the function again with the answers. mordew now imports digest.The
type_*()functions are exported, for the fields ofinput_form().For 2026-07-28:
initializegets -32601 and 404, a request withMCP-Protocol-Version: 2026-07-28and no version in its_metagets -32602 rather than -32020, and a resource not found carries its URI indata.uri, for 2025-11-25 too.dev/conformance.Rpasses every scored check of the 2026-07-28 requirements of the conformance suite, and those of the tasks extension.A server can be an R script that ends with
mcp_server(), which gathers tools, resources and prompts declared in code withmcp_tool(),mcp_resource()andmcp_prompt(), with the roxygen tags of a package written as text.run_mcp_server()serves the path of such a script over stdio or HTTP, the front and each worker sourcing it once, andcall_tool()calls its tools.mcp_client(),mcp_request()andmcp_close()talk to any MCP server over stdio.trace_context()gives a function the OpenTelemetry trace context (traceparent,tracestate,baggage) its client sent in_meta.expect_conformance()runs scenarios of the official conformance suite against the package.serverInfocarries thetitle,description,websiteUrlandiconsof the server, in the answer toinitializeandserver/discover: from the DESCRIPTION of a package and the@mcpIcontags of its"_PACKAGE"block, or from the arguments ofmcp_server().call_tool(),get_prompt()andread_resource()takesample, the text the model of the client writes, androots, the URIs of its roots, and answer the requests ofask()and@mcpSamplewith them and withanswer.@mcpSchema list(...)adds JSON Schema 2020-12 keywords ($schema,$defs,allOf,if…) to the root of the input schema of a tool.@mcpHeader <param> <Name>marks a parameter withx-mcp-header; over HTTP, a 2026-07-28 call whoseMcp-Param-<Name>header does not match the argument gets 400 and -32020. Base64 header values must be strict.dev/conformance.Rpasses all the 194 checks of 2026-07-28, pending scenarios included.A 2026-07-28 task whose tool calls
ask()waits ininput_required, its requests intasks/get, untiltasks/updateanswers them all, then runs the tool again with the answers; a key answered alone leaves the others pending. A 2025-11-25 task that asks fails.
mordew 0.0.0.9048
- Over HTTP, a 2026-07-28 request whose client closed its stream is cancelled: the server writes an SSE comment every 15 seconds on an open stream of a 2026-07-28 request, and once a write fails, it ends the subscription or stops the call, but not a call that runs as a task. 2025-11-25 streams are left as they were.
mordew 0.0.0.9047
-
subscriptions/listenfor 2026-07-28 clients: the server acknowledges the resources and the tasks it watches, then sends their updates and their status, each with the ID of the subscription in_meta. Task IDs need the tasks extension (-32021), and a malformed filter gets -32602. Over stdio,notifications/cancelledends a subscription; over HTTP, its POST gets a stream that stays open.server/discoverdeclaresresources.subscribe.
mordew 0.0.0.9046
- Tasks for 2026-07-28 clients, through the
io.modelcontextprotocol/tasksextension thatserver/discoverdeclares: a tool with@mcpTaskruns as a task for a client that declares the extension, and the call answersresultType: "task".tasks/getgives the result or the error of the tool at the end, a tool error counting ascompleted;tasks/cancelandtasks/updateanswer an empty result. A client without the extension gets -32021 for the task requests and for a tool with@mcpTask required;tasks/resultandtasks/listget -32601. - A tool that calls
elicit_url()during a 2026-07-28 task puts the task ininput_requiredwith the page;tasks/updateruns the tool again once the user accepts, and ends the task with a tool error once the user declines. - 2026-07-28
tools/listleaves outexecution, and over HTTP theMcp-Nameof a task request must be its task ID.
mordew 0.0.0.9045
- Questions to the user for 2026-07-28 clients, through Multi Round-Trip Requests: a tool with
@mcpConfirmor@mcpElicitanswersresultType: "input_required"with the form under the keymordew-question, and runs when the client calls again with the answer inparams.inputResponses.elicit_url()gives atools/call,prompts/getorresources/readaninput_requiredresult with the page under its ID instead of -32042, and an error once the user declined it; a completion that calls it gets -32603. - A 2026-07-28 client that did not declare the elicitation mode a request needs gets -32021 with
data.requiredCapabilities, 400 over HTTP, andinputResponsesthat are not an object of results get -32602.
mordew 0.0.0.9044
- Over HTTP, a 2026-07-28 request whose
Mcp-Methodheader is missing or differs from its method, or, fortools/call,prompts/getandresources/read, whoseMcp-Nameheader differs from its name or URI, gets 400 and -32020. AMcp-Namesent as=?base64?…?=is decoded before the comparison.
mordew 0.0.0.9043
- Caching hints on 2026-07-28 results:
server/discover,tools/list,prompts/list,resources/listandresources/templates/listcarryttlMs: 3600000andcacheScope: "public", since they do not change while the server runs;resources/readcarriesttlMs: 0andcacheScope: "private".
mordew 0.0.0.9042
- 2026-07-28 requests, served side by side with 2025-11-25 ones: a request that carries
_meta["io.modelcontextprotocol/protocolVersion"]needs noinitializeand no session.server/discoverreturns the supported versions, the capabilities and the instructions, and every 2026-07-28 result carriesresultType: "complete"and_meta["io.modelcontextprotocol/serverInfo"]. Another version gets -32022, a request without client capabilities -32602, a resource not found -32602, and the methods 2026-07-28 removed -32601. - A 2026-07-28 request gets logs only at the level it sets in
_meta["io.modelcontextprotocol/logLevel"], and none without one. - Over HTTP,
MCP-Protocol-Version: 2026-07-28is accepted. A header that differs from the version in_metagets 400 and -32020, another version 400 and -32022 with the supported versions, a refused 2026-07-28 request 400, and an unknown 2026-07-28 method 404.
mordew 0.0.0.9041
- The progress and the logs of a task go to its session until the task ends, on the stream of the GET over HTTP instead of the closed stream of the POST that created it, and carry the task ID in
_meta["io.modelcontextprotocol/related-task"], over stdio too. - When the worker of a task ends, or stops after
tasks/cancel, the server sendsnotifications/tasks/statusto the session that created the task, with the task astasks/getshows it.
mordew 0.0.0.9040
-
notifications/elicitation/complete: over HTTP, the session keeps the ID of each URL elicitation it gets, and a POST of{"elicitationId": "<id>"}to/elicitation/complete, with the token if there is one, sends the notification to that session alone, on the stream of its GET. The POST gets 200, 404 for an ID no session holds, 400 without an ID, and 405 for another method than POST.
mordew 0.0.0.9039
- Resource subscriptions: the server declares
resources.subscribe, and keeps for the stdio connection or the HTTP session the URIs a client follows withresources/subscribe, untilresources/unsubscribe.notify_resource_updated(uri), called while a function of the package runs, sendsnotifications/resources/updatedto every session subscribed to that URI. - Over HTTP, a GET on
/mcpwith a session and withoutLast-Event-IDopens the SSE stream of the messages the server sends outside an answer, instead of 405; without a session, it gets 400. Another method than GET, POST and DELETE gets 405 withAllow: GET, POST, DELETE.
mordew 0.0.0.9038
-
tasks/list: a task belongs to the HTTP session that created it, or to the stdio client, and another session gets “Task not found”. The server declarestasks.listand lists the tasks of the session, oldest first, by pages of 100. Without a session, a task is reached by its ID alone, andtasks/listgets -32603.
mordew 0.0.0.9037
-
log_message(data, level, logger)sends a log message to the client while a tool, a resource, a prompt or a completion function runs, under the name of the package by default. The server declares theloggingcapability; the client sets the lowest level it gets withlogging/setLevel,infountil it does, kept for the stdio connection or the HTTP session. At most ten messages per second go out for a call. - The first progress notification of a worker no longer gets lost when it goes out before the worker is connected to the front.
mordew 0.0.0.9036
- Resumable SSE streams over HTTP: in a session, the stream of a POST opens with an event that carries only an ID and numbers the events after it. After a dropped connection, a GET with
Last-Event-IDgets the events that followed, then the rest of the stream. The server keeps a stream until five minutes after its answer, and no longer fails on writing to a client that is gone.
mordew 0.0.0.9035
- Over stdio too, the server hands tool calls, resource reads, prompt gets and completions to a pool of mirai workers, as over HTTP: a thread reads stdin in the background, so the server keeps reading messages while a tool runs, and a tool that stops its R process no longer stops the server.
run_mcp_server(workers = )defaults to 1 over stdio and 4 over HTTP;timeoutandqueuenow apply to stdio as well, and tasks over stdio hold a worker of the pool. - The HTTP transport runs on the HTTP server of nanonext instead of httpuv, which leaves the dependencies. A body over 1 MiB gets a 400 from that server, where it got a 413 over 4 MB.
-
expect_hostile_safe()fails on a tool that stops the worker running it. - Sessions over HTTP: the answer to
initializecarries anMCP-Session-Idheader, which keeps what the client declared it can do; a request with an unknown session gets 404,DELETEends a session, and a session idle for an hour is forgotten. A request without a session is still served. The answer to a POST becomes an SSE stream when the server sends messages before it. -
report_progress(progress, total, message)sends a progress notification while a tool, a resource, a prompt or a completion function runs, when the client asked for the progress of the call: a line over stdio, an SSE event over HTTP. Progress must increase; at most ten notifications per second go out for a call, and none after its answer. Outside a server, the function only checks its arguments. - Cancellation:
notifications/cancelledtakes a waiting call out of the queue, or stops the worker running it, and the request gets no answer (an empty SSE stream over HTTP). The server writes the reason on stderr, and ignores a cancellation of an unknown or answered request, of another client’s request, of a request without session, and of a task. - Elicitation, in form mode:
@mcpConfirm <message>makes the server ask the user before a tool runs, with the arguments of the model in the message, and each@mcpElicit <param>adds a field the user fills instead of the model. The server checks the answer against the form and runs the tool with it; a decline, a dismissal, an answer that does not fit or a client that cannot ask ends in anisErrorresult. A cancellation of the call cancels its question, and only the client that was asked can answer.elicit_url()ends a call with the -32042 error that sends the user to a web page, for what a form must never ask.call_tool(answer = )answers the questions of a tool in tests. - Types take the constraints of MCP forms, which also check tool arguments:
type_string(format = , min_length = , max_length = ), with the formatsemail,uri,dateanddate-time;type_enum(titles = ), a title for each value; andtype_array(min_items = , max_items = ).
mordew 0.0.0.9034
- Tasks, as the experimental tasks utility of the 2025-11-25 specification:
@mcpTask optionallets a client run a tool as a task,@mcpTask requiredmakes it run only as one (-32601 otherwise). The server answers at once with the task, runs the call in a background R process, and answerstasks/get,tasks/result, which waits for the end of the task, andtasks/cancel. Task IDs come from a cryptographically secure generator; a task keeps its result for its time to live, at most an hour, andrun_mcp_server(tasks = 8)caps the tasks running at once andtask_requests = 20the task requests per second. Over HTTP, a task holds a worker of the pool until it ends. The server declares thetaskscapability, withouttasks/list. -
call_tool()runs as a task a tool that requires one, or any tool withtask = TRUE.
mordew 0.0.0.9033
-
run_mcp_server(tool_calls = 10)runs at most that many tool calls per second, over stdio and HTTP, as the tools page of the MCP specification asks; the others get anisErrorresult asking to retry later. - A list request with a cursor gets -32602: the lists of a mordew server come in one page, so a cursor is never one it gave.
- Every text sent to clients loses its terminal colours (ANSI escape sequences) and the control characters other than tab and line breaks, as the specification asks servers to sanitize tool outputs.
-
@mcpIcon <src> [mimeType=] [sizes=] [theme=]gives a tool, a resource, a resource template or a prompt its icons. The roclet stops on a source that is not an http, https or data URI, and on sizes or a theme that the specification does not allow. -
@mcpReturns content: a tool returns a list of content blocks, made bycontent_text(),content_image(),content_audio(),content_resource_link()andcontent_resource(), each with optionalcontent_annotations()(audience, priority, last change), as the tools page of the specification defines them.
mordew 0.0.0.9032
- Structured output:
@mcpOutput <type_object()>on ajsontool declares the structure of its result, sent as the tool’soutputSchema. Each result goes out asstructuredContentand as JSON text, after a check against the schema; a result that does not match it is anisErrorresult naming the field. The roclet stops on an@mcpOutputthat is not atype_object()or on a tool that does not returnjson.expect_structured_output()checks the structured content of a tool against its schema, as a client does.
mordew 0.0.0.9031
- Completion:
@mcpComplete <argument> <function>on a prompt or a resource template links an argument, or a variable of the URI, to a function of the package that returns suggestions for the text typed so far, given the arguments already filled. Clients get them withcompletion/complete: the first 100, with their total. The roclet stops on an@mcpCompletethat names no argument; an unknown prompt or template gets -32602, a completion function that fails -32603. -
run_mcp_server(completions = 10)answers at most that many completion requests per second, over stdio and HTTP, as the MCP specification asks; the others get a “retry later” error -32603. - Over HTTP, a resource read, a prompt get or a completion that finds the queue full, times out or loses its worker gets a JSON-RPC error -32603, instead of a tool result that the client could not read.
mordew 0.0.0.9030
-
read_resource()reads a resource through mordew’s MCP client over stdio, ascall_tool()calls a tool, and returns the result ofresources/read; an unknown URI, or a resource that fails, is an R error. -
expect_resource()reads a resource withread_resource()and expects its text to match a pattern. The test file thatadd_resource()creates reads the resource with it. - A resource declares what it returns with
@mcpReturns,textby default: a table is sent astext/markdowntext, JSON asapplication/jsontext, and an image as animage/pngblob in base64. - A resource whose URI has variables, such as
runlog://runs/{year}, is a resource template, listed byresources/templates/list: readingrunlog://runs/2024calls the function withyear = "2024", each variable taking one segment of the URI. The roclet stops when the arguments of a resource are not the variables of its URI, and on a variable other than name. - Prompts: a function tagged
@mcpPromptbecomes a prompt that clients list withprompts/listand get withprompts/get, over stdio and HTTP. Its arguments, strings, are those of the function, each with an@param, required when it has no default value; the function returns a character vector, sent as oneusertext message. An unknown prompt or invalid arguments get -32602, a prompt that fails -32603. The roclet writes the prompts inmordew_prompts. -
add_prompt()creates a prompt, its text ininst/mordew/prompts/<name>.mdand its test file, which gets the prompt withexpect_prompt();get_prompt()gets a prompt through mordew’s MCP client. Thedev/02_dev.Rofcreate_mordew()callsadd_prompt().
mordew 0.0.0.9029
-
add_resource()creates the file of a resource and its test file, with the URI<package>://<name>, asadd_tool()does for a tool; thedev/02_dev.Rofcreate_mordew()calls it.
mordew 0.0.0.9028
- Resources: a function tagged
@mcpResource <uri>becomes a resource that clients list withresources/listand read withresources/read, over stdio and HTTP. The registry roclet writes the resources inmordew_resources, next tomordew_registry, and stops on a resource without title or description, on an object that is not a function, and on two resources with the same URI. A resource is read as text, one element of the character vector per line; an unknown URI gets the error -32002, and a resource that fails or does not return text gets -32603.
mordew 0.0.0.9027
-
add_dockerfile()needs dockerfiler 1.0.1 or later, which computes the system requirements of a package listed inRemotes: thedev/03_deploy.Rofcreate_mordew()no longer gives them by hand.
mordew 0.0.0.9025
- Over HTTP, each tool call gives the workers the libraries of the server,
.libPaths(): on Windows, they did not find a package installed in a library added with.libPaths().
mordew 0.0.0.9024
- Over HTTP, the worker pool also reads the method and the id of a message by their exact names, for the calls it sends to a worker and for its busy and timeout answers (#9).
mordew 0.0.0.9023
A
textresult sends a character vector as one string, one element per line: MCP takes a single string (#1).run_mcp_server(token = NULL)serves without a token, astoken = ""does (#8).expect_hostile_safe()stops on a tool the package does not have, asexpect_tool_schema()does, instead of passing without a call (#7).add_mcp_client_config()andadd_connect()add their line to.gitignoreand.Rbuildignoreon a line of its own, also when the file does not end with a newline (#12).create_mordew()refuses a name that is not a valid package name, andadd_tool()a name that is not syntactic, before writing anything (#13).The server reads the fields of a message, of its
paramsand the HTTP headers by their exact names: a message withidxbut noidstays a notification (#9).The registry roclet stops on a tool without title, which clients got as
"title": null, and on@mcpToolon an object that is not a function (#14).The registry roclet writes non-ASCII characters as
\U{...}escapes, so that a package documented in another language than English passesR CMD check(#4).Over HTTP, a path other than
/mcpand/healthgets a404, and another method thanGETon/healtha405(#10).Over HTTP, a request whose
Content-Lengthis over 4 MB gets a413on its headers, before its body is read (#11).add_dockerfile()adds^Dockerfile$to.Rbuildignore(#5).The
DESCRIPTIONof a new package hasRemotes: ThinkR-open/mordew, so that it installs mordew from GitHub until mordew is on CRAN (#6).The Dockerfile of
add_dockerfile()starts the server withmordew::run_mcp_server("<package>", ...), so that the container starts whatever arguments the package’s ownrun_mcp_server()takes (#18).add_dockerfile()needs dockerfiler 1.0.0 or later, whose image build fails when a package does not install; with 0.2.5, the image lacked it (#19).call_tool(client = "inspector")runsnpxwithout Node’s compile cache, which leftnode-compile-cachein the temporary directory, and a note inR CMD check(#16).The
dev/03_deploy.Rof a new package checks the package withdevtools::check(), then writes the Dockerfile with the system requirements given by hand, until dockerfiler computes them withRemotes.call_tool(client = "inspector")stops on Windows with a message that says it is not supported there yet, instead of “Command ‘npx’ not found” (#15).A
tableresult escapes|in column names, and replaces newlines with spaces in column names and cells, so that the Markdown table keeps its columns and rows (#3).
mordew 0.0.0.9018
- mordew requires the versions of its imports it is tested with: mirai 2.5.1 did not load with the nanonext that an install from GitHub pulled.
mordew 0.0.0.9017
-
expect_hostile_safe()passes under testthat 3.3.
mordew 0.0.0.9016
- Over HTTP, the origin, the token, the method and the protocol version are checked as soon as the headers arrive, before the body is read.
GET /healthis answered there too.
mordew 0.0.0.9015
-
add_dockerfile()writes a Dockerfile from dockerfiler’sdock_from_desc(), with a non-root user, the port, a health check on/healthand a start on0.0.0.0. -
run_mcp_server()serves on another host than localhost without a token, with a warning at start-up, so that a proxy or a gateway can authenticate the clients. - A tool call whose
paramsis a scalar, or whoseargumentsis an array or a string, gets a-32602invalid params error: the tool does not run.
mordew 0.0.0.9014
-
add_connect()writes_server.ymlto serve the package on Posit Connect, which authenticates the clients. Thedev/03_deploy.Rof a new package deploys it withrsconnect::deployAPI(). - Over HTTP:
- a tool call that finds every worker busy waits in a bounded queue (
queue = 8), and the timeout counts the run, not the wait; - a worker that stops during a tool call is replaced;
-
GET /healthanswers without a token; - with a token, from
MORDEW_TOKENby default, every other request must sendAuthorization: Bearer <token>, or gets a401.
- a tool call that finds every worker busy waits in a bounded queue (
mordew 0.0.0.9013
-
run_mcp_server(transport = "http")serves the tools over Streamable HTTP. Tool calls run in a pool of mirai workers (workers), at most one per worker, and stop aftertimeoutseconds with anisErrorresult. -
call_tool(client = "inspector")makes the call through the MCP Inspector -
check_tools()looks in the tools for calls that can turn an argument into code. -
expect_hostile_safe()calls a tool with the extreme values its schema accepts. -
run_dev(client = "claude")gives the command of a Claude Code session restricted to the development version of the package. - With
ANTHROPIC_API_KEYset, as in CI, the evals leave out the developer’sCLAUDE.md, memory, hooks and plugins.
mordew 0.0.0.9012
- Evals measure whether a model calls the right tool with the right arguments, through Claude Code:
-
tool_call()describes an expected call, andpartial()accepts a value that is part of the expected one, ignoring case; -
eval_case()describes a question and its accepted answers; -
run_evals()runs the cases and flags a run that takes more calls than expected (too_many_calls); -
assert_pass_rate()stops when a case fails too often; -
use_evals()sets updev/evals.Rand a GitHub Actions workflow started by hand.
-
- When the claude CLI fails, the error shows its stderr and the result message of its stream.
mordew 0.0.0.9006
- Tools of a package with a dot in its name are allowed in the restricted Claude Code session.
-
add_mcp_client_config()adds the configuration file to.gitignore. - The
dev/02_dev.Rof a new package callsadd_mcp_client_config().
mordew 0.0.0.9005
-
add_mcp_client_config()writes the Claude Code configuration file of the package.
mordew 0.0.0.9003
- The restricted Claude Code session also leaves out the Claude in Chrome and IDE tools, and denies any call that would ask for permission.
mordew 0.0.0.9000
- First version, implementing MCP 2025-11-25.
-
create_mordew()creates an MCP server package, with itsdev/scripts, andadd_tool()adds a tool and its test.install_dev_deps()installs the development dependencies. -
registry_roclet()writes the tool registry toR/mordew_registry.Rfrom roxygen:@mcpTool,@mcpReturns,@mcpTypewithtype_string(),type_integer(),type_number(),type_boolean(),type_enum(),type_array()andtype_object(),@mcpLimit rows, and the annotation tags@mcpReadOnly,@mcpNonDestructive,@mcpIdempotentand@mcpClosedWorld.@mcpTypeis checked against the function signature. - Tool arguments are validated against the schema (unknown and missing arguments, types, enums, bounds, patterns, nested arrays and objects), then converted to R types.
- Tool results:
text,json,tableas a Markdown table, andimagefor a plot as an 800x600 PNG at 96 dpi. An error, or a value that does not match@mcpReturns, comes back as anisErrorresult. -
run_mcp_server()serves the tools over stdio. -
call_tool(),expect_tool_error()andexpect_tool_schema()test the tools with testthat through a stdio client. -
run_dev()chats with the development version through ellmer. -
mcp_client_config()gives the configuration of Claude Code and Claude Desktop.