Skip to contents

Serves the development version of the package's MCP server to a model. With client = "ellmer", connects an ellmer chat to the server and opens the chat. With client = "claude", writes a temporary MCP configuration and gives the command of a Claude Code session restricted to the server. The model sees the tools exactly as any MCP client sends them, and each tool call is shown with its arguments. Changing a tool means restarting run_dev().

Usage

run_dev(
  client = c("ellmer", "claude"),
  chat,
  ui = c("console", "browser"),
  mordew_wd = get_mordew_wd(),
  timeout = 90
)

Arguments

client

Client to chat through: "ellmer", or "claude" for the claude CLI and its login.

chat

An ellmer chat, such as ellmer::chat_anthropic(). The server's instructions are added to its system prompt.

ui

"console" for ellmer::live_console(), "browser" for ellmer::live_browser().

mordew_wd

Path to the package, get_mordew_wd() by default.

timeout

Seconds to wait for each answer of the server.

Value

The chat, or the claude command, invisibly.

Examples

if (FALSE) { # \dontrun{
# In the folder of a package made by create_mordew(), with Claude Code:
run_dev(
  "claude"
)
} # }