Skip to contents

mordew 0.0.0.9055

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 of mcp_client() and the channel of the notifications of the workers parse what they receive the same way.

  • The page of widget_page() names itself in appInfo in its ui/initialize, as the schema of MCP Apps asks: it sent clientInfo and capabilities, 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/get with params that are not an object, or resources/directory/read on 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 a path that is an existing file, as it refuses a folder: without overwrite = 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 ../../outside wrote out of the skills folder, and a second call put the template back over an edited SKILL.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 requestState is on one line: jsonlite::base64_enc() breaks it every 76 characters.

  • A tool with @mcpOutput that returns an empty list, or a list without names, gets an isError result: its structuredContent went out as an array, against the outputSchema of the tool.

  • The tests refuse a token of the same length with another content, and read bearer in 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 the Origin was not checked.

  • expect_conformance() stops when the suite ran no check, as when npx fails without network: it passed, with zero failed check.

  • An eval case accepts a round number whatever its type: 1e5 expected was refused against 100000 called 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 or null: it stopped run_evals() with an error, and the results of the runs already made were lost.

  • ask() checks the answer to a form of input_form() against the form, as @mcpElicit does: it stops on an action that is not accept, decline or cancel, and on an accepted content that does not fit the fields. The function got whatever the client sent.

  • Over stdio, the server ends the subscriptions/listen that 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 as caf<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 a ping of 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 as allowed-tools: [Read], is served as a list: skills/list and skills/get sent 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") then add_resource("surfaces") write: the last function defined answered for each of them.

  • install_dev_deps() installs devtools and rsconnect too, which dev/03_deploy.R calls, and the error of add_dockerfile() on a dockerfiler older than 1.0.1 says how to install it: pak::pak("ThinkR-open/dockerfiler").

  • add_dockerfile() adds .Renviron and .env to 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 params are 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/read of the text of a template itself, such as runlog://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/result adds the ID of the task to the _meta a result already has, as the one of a tool with @mcpWidget: the result went out with the _meta of the widget alone.

  • A number too large for a double, such as 1e999, is refused as not being a number: it reached the tool as Inf. 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 @mcpWidget sends 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_TOKEN in their environment: run_mcp_server() takes it out before it starts them, and puts it back when it ends.

  • GET /mcp without a session gets 405 with Allow: POST, as the specification asks of a server that offers no stream there: it got

  • notifications/cancelled leaves a call that runs as a task alone: it failed with “attempt to apply non-function”, such a call being stopped with tasks/cancel.

  • A 2026-07-28 request that carries an Mcp-Session-Id the 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 its ui/initialize: it stayed blank without a word.

  • assert_pass_rate() stops on a min that is not between 0 and 1, and on results without a run: min = 80 gave “a pass rate of 8000%”, and no result passed in silence.

  • add_tool(), add_resource(), add_prompt() and add_skill() stop on a pkg without DESCRIPTION, before they write anything: add_tool() created R/ and tests/ 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() and expect_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 when initialize fails: 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 @mcpElicit does: it sent a nested object in the form.

  • @mcpElicit keeps a default of NA or Inf out of the form: JSON has neither, and the form went out with null, or with the string "Inf" for a number.

  • run_evals() skips the lines of the output of claude that 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 named tool or client: such a parameter hid the variables the call needed, and the call failed.

  • use_evals() creates the dev/ 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() and add_prompt() refuse the name of a function the package already has, such as run_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.md gives a valid URI, read back to the same file, and a .json, .csv or .html file of a skill has its own type, still sent as text: each was text/plain.

  • On Posit Connect, launch_server() stops when the package next to _server.yml does 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 a tool_call(), and run_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 @mcpType for 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 than workers by 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, completions and task_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 /mcp whose Content-Type is not application/json: a page served on another local port, whose Origin is 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 an id that is null, 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 requestState of a 2026-07-28 input_required result 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.

  • @mcpWidget reads the scripts and stylesheets of a dependency that gives them with their attributes, as list(src = "chart.js", defer = NA), leaves in a style the url() 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() and mcp_client() sends notifications/cancelled for 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, and mcp_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 the expect_*() say to give package when 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, and type_enum() an empty set of values: each was written to the schema. content_annotations() says that a missing priority is not one, and run_mcp_server() that workers is 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 @mcpSample is checked against the type of its parameter, as the answer to a form is; @mcpCsp takes 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 a requestState is 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.0 was 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 @mcpConfirm is filled in one pass: an argument whose value held {other} had it replaced by the value of other. @mcpVisibility app app gives app once.

  • An @mcpType expression 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 took pkg, as golem does with golem_wd, and default to get_mordew_wd(): the mordew.wd option, or the working directory. pkg was close to package, the name of an installed package that call_tool() and run_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 in resources/list and resources/read: @mcpCsp for the domains it may reach, @mcpPermission for camera, microphone, geolocation and clipboard, @mcpDomain and @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 the io.modelcontextprotocol/skills extension: skills/list and skills/get give the frontmatter of each skill and the digest and size of its files, read with resources/read at their skill:// URI. The server stops at start on a skill whose frontmatter is missing or wrong, or over 512 files or 16 MiB. resources/directory/read lists a folder of a skill.

  • add_skill() creates the SKILL.md of a skill, and dev/02_dev.R calls 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.resourceUri of its definition; the roclet and mcp_server() stop on a page that is not a resource of the server.

  • @mcpVisibility model, app or both says who may call a tool: the model, the page of an MCP App, or both. A client that does not declare the io.modelcontextprotocol/ui extension gets no tool for the page only in tools/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 html is the page of an MCP App: it is sent as text/html;profile=mcp-app text.

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 properties an object for a tool whose parameters the user fills all: it was written as list(), sent as [], an invalid inputSchema.

  • dev/conformance.R runs version 0.2.0-alpha.12 of the official MCP conformance suite against a test package built from dev/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, with sampling/createMessage, and gives it to the tool as that parameter; a 2026-07-28 client gets it in inputRequests, or -32021 without the sampling capability.

  • A prompt may return a list of content_*() blocks, sent as one user message per block; expect_prompt() matches the text of every message.

  • type_enum(enum_names = TRUE) writes the titles in the deprecated enumNames.

  • ask() asks the client while a tool, a resource or a prompt runs, with requests made by input_form(), input_sample() and input_roots(); can_ask() tells whether the client declared what a request needs. A 2026-07-28 client gets the requests in an input_required result, with the answers so far in a requestState signed with HMAC-SHA256 (the key is MORDEW_STATE_KEY, or a random one), and -32602 for a requestState the 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 of input_form().

  • For 2026-07-28: initialize gets -32601 and 404, a request with MCP-Protocol-Version: 2026-07-28 and no version in its _meta gets -32602 rather than -32020, and a resource not found carries its URI in data.uri, for 2025-11-25 too.

  • dev/conformance.R passes 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 with mcp_tool(), mcp_resource() and mcp_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, and call_tool() calls its tools.

  • mcp_client(), mcp_request() and mcp_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.

  • serverInfo carries the title, description, websiteUrl and icons of the server, in the answer to initialize and server/discover: from the DESCRIPTION of a package and the @mcpIcon tags of its "_PACKAGE" block, or from the arguments of mcp_server().

  • call_tool(), get_prompt() and read_resource() take sample, the text the model of the client writes, and roots, the URIs of its roots, and answer the requests of ask() and @mcpSample with them and with answer.

  • @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 with x-mcp-header; over HTTP, a 2026-07-28 call whose Mcp-Param-<Name> header does not match the argument gets 400 and -32020. Base64 header values must be strict.

  • dev/conformance.R passes all the 194 checks of 2026-07-28, pending scenarios included.

  • A 2026-07-28 task whose tool calls ask() waits in input_required, its requests in tasks/get, until tasks/update answers 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/listen for 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/cancelled ends a subscription; over HTTP, its POST gets a stream that stays open. server/discover declares resources.subscribe.

mordew 0.0.0.9046

  • Tasks for 2026-07-28 clients, through the io.modelcontextprotocol/tasks extension that server/discover declares: a tool with @mcpTask runs as a task for a client that declares the extension, and the call answers resultType: "task". tasks/get gives the result or the error of the tool at the end, a tool error counting as completed; tasks/cancel and tasks/update answer an empty result. A client without the extension gets -32021 for the task requests and for a tool with @mcpTask required; tasks/result and tasks/list get -32601.
  • A tool that calls elicit_url() during a 2026-07-28 task puts the task in input_required with the page; tasks/update runs the tool again once the user accepts, and ends the task with a tool error once the user declines.
  • 2026-07-28 tools/list leaves out execution, and over HTTP the Mcp-Name of 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 @mcpConfirm or @mcpElicit answers resultType: "input_required" with the form under the key mordew-question, and runs when the client calls again with the answer in params.inputResponses. elicit_url() gives a tools/call, prompts/get or resources/read an input_required result 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, and inputResponses that are not an object of results get -32602.

mordew 0.0.0.9044

  • Over HTTP, a 2026-07-28 request whose Mcp-Method header is missing or differs from its method, or, for tools/call, prompts/get and resources/read, whose Mcp-Name header differs from its name or URI, gets 400 and -32020. A Mcp-Name sent 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/list and resources/templates/list carry ttlMs: 3600000 and cacheScope: "public", since they do not change while the server runs; resources/read carries ttlMs: 0 and cacheScope: "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 no initialize and no session. server/discover returns the supported versions, the capabilities and the instructions, and every 2026-07-28 result carries resultType: "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-28 is accepted. A header that differs from the version in _meta gets 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 sends notifications/tasks/status to the session that created the task, with the task as tasks/get shows 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 with resources/subscribe, until resources/unsubscribe. notify_resource_updated(uri), called while a function of the package runs, sends notifications/resources/updated to every session subscribed to that URI.
  • Over HTTP, a GET on /mcp with a session and without Last-Event-ID opens 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 with Allow: 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 declares tasks.list and lists the tasks of the session, oldest first, by pages of 100. Without a session, a task is reached by its ID alone, and tasks/list gets -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 the logging capability; the client sets the lowest level it gets with logging/setLevel, info until 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-ID gets 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; timeout and queue now 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 initialize carries an MCP-Session-Id header, which keeps what the client declared it can do; a request with an unknown session gets 404, DELETE ends 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/cancelled takes 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 an isError result. 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 formats email, uri, date and date-time; type_enum(titles = ), a title for each value; and type_array(min_items = , max_items = ).

mordew 0.0.0.9034

  • Tasks, as the experimental tasks utility of the 2025-11-25 specification: @mcpTask optional lets a client run a tool as a task, @mcpTask required makes it run only as one (-32601 otherwise). The server answers at once with the task, runs the call in a background R process, and answers tasks/get, tasks/result, which waits for the end of the task, and tasks/cancel. Task IDs come from a cryptographically secure generator; a task keeps its result for its time to live, at most an hour, and run_mcp_server(tasks = 8) caps the tasks running at once and task_requests = 20 the task requests per second. Over HTTP, a task holds a worker of the pool until it ends. The server declares the tasks capability, without tasks/list.
  • call_tool() runs as a task a tool that requires one, or any tool with task = 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 an isError result 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 by content_text(), content_image(), content_audio(), content_resource_link() and content_resource(), each with optional content_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 a json tool declares the structure of its result, sent as the tool’s outputSchema. Each result goes out as structuredContent and as JSON text, after a check against the schema; a result that does not match it is an isError result naming the field. The roclet stops on an @mcpOutput that is not a type_object() or on a tool that does not return json. 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 with completion/complete: the first 100, with their total. The roclet stops on an @mcpComplete that 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, as call_tool() calls a tool, and returns the result of resources/read; an unknown URI, or a resource that fails, is an R error.
  • expect_resource() reads a resource with read_resource() and expects its text to match a pattern. The test file that add_resource() creates reads the resource with it.
  • A resource declares what it returns with @mcpReturns, text by default: a table is sent as text/markdown text, JSON as application/json text, and an image as an image/png blob in base64.
  • A resource whose URI has variables, such as runlog://runs/{year}, is a resource template, listed by resources/templates/list: reading runlog://runs/2024 calls the function with year = "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 @mcpPrompt becomes a prompt that clients list with prompts/list and get with prompts/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 one user text message. An unknown prompt or invalid arguments get -32602, a prompt that fails -32603. The roclet writes the prompts in mordew_prompts.
  • add_prompt() creates a prompt, its text in inst/mordew/prompts/<name>.md and its test file, which gets the prompt with expect_prompt(); get_prompt() gets a prompt through mordew’s MCP client. The dev/02_dev.R of create_mordew() calls add_prompt().

mordew 0.0.0.9029

mordew 0.0.0.9028

  • Resources: a function tagged @mcpResource <uri> becomes a resource that clients list with resources/list and read with resources/read, over stdio and HTTP. The registry roclet writes the resources in mordew_resources, next to mordew_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 in Remotes: the dev/03_deploy.R of create_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 text result 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, as token = "" does (#8).

  • expect_hostile_safe() stops on a tool the package does not have, as expect_tool_schema() does, instead of passing without a call (#7).

  • add_mcp_client_config() and add_connect() add their line to .gitignore and .Rbuildignore on 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, and add_tool() a name that is not syntactic, before writing anything (#13).

  • The server reads the fields of a message, of its params and the HTTP headers by their exact names: a message with idx but no id stays a notification (#9).

  • The registry roclet stops on a tool without title, which clients got as "title": null, and on @mcpTool on 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 passes R CMD check (#4).

  • Over HTTP, a path other than /mcp and /health gets a 404, and another method than GET on /health a 405 (#10).

  • Over HTTP, a request whose Content-Length is over 4 MB gets a 413 on its headers, before its body is read (#11).

  • add_dockerfile() adds ^Dockerfile$ to .Rbuildignore (#5).

  • The DESCRIPTION of a new package has Remotes: ThinkR-open/mordew, so that it installs mordew from GitHub until mordew is on CRAN (#6).

  • The Dockerfile of add_dockerfile() starts the server with mordew::run_mcp_server("<package>", ...), so that the container starts whatever arguments the package’s own run_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") runs npx without Node’s compile cache, which left node-compile-cache in the temporary directory, and a note in R CMD check (#16).

  • The dev/03_deploy.R of a new package checks the package with devtools::check(), then writes the Dockerfile with the system requirements given by hand, until dockerfiler computes them with Remotes.

  • 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 table result 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.9022

  • A table result keeps one row per row of the data frame when a column is named sep, collapse or recycle0, like an argument of paste() (#2).

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

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 /health is answered there too.

mordew 0.0.0.9015

  • add_dockerfile() writes a Dockerfile from dockerfiler’s dock_from_desc(), with a non-root user, the port, a health check on /health and a start on 0.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 params is a scalar, or whose arguments is an array or a string, gets a -32602 invalid params error: the tool does not run.

mordew 0.0.0.9014

  • add_connect() writes _server.yml to serve the package on Posit Connect, which authenticates the clients. The dev/03_deploy.R of a new package deploys it with rsconnect::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 /health answers without a token;
    • with a token, from MORDEW_TOKEN by default, every other request must send Authorization: Bearer <token>, or gets a 401.

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 after timeout seconds with an isError result.
  • 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_KEY set, as in CI, the evals leave out the developer’s CLAUDE.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, and partial() 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 up dev/evals.R and 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

mordew 0.0.0.9005

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 its dev/ scripts, and add_tool() adds a tool and its test. install_dev_deps() installs the development dependencies.
  • registry_roclet() writes the tool registry to R/mordew_registry.R from roxygen: @mcpTool, @mcpReturns, @mcpType with type_string(), type_integer(), type_number(), type_boolean(), type_enum(), type_array() and type_object(), @mcpLimit rows, and the annotation tags @mcpReadOnly, @mcpNonDestructive, @mcpIdempotent and @mcpClosedWorld. @mcpType is 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, table as a Markdown table, and image for a plot as an 800x600 PNG at 96 dpi. An error, or a value that does not match @mcpReturns, comes back as an isError result.
  • run_mcp_server() serves the tools over stdio.
  • call_tool(), expect_tool_error() and expect_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.