Repl.Mcp
0.11.0-dev.124
See the version list below for details.
dotnet add package Repl.Mcp --version 0.11.0-dev.124
NuGet\Install-Package Repl.Mcp -Version 0.11.0-dev.124
<PackageReference Include="Repl.Mcp" Version="0.11.0-dev.124" />
<PackageVersion Include="Repl.Mcp" Version="0.11.0-dev.124" />
<PackageReference Include="Repl.Mcp" />
paket add Repl.Mcp --version 0.11.0-dev.124
#r "nuget: Repl.Mcp, 0.11.0-dev.124"
#:package Repl.Mcp@0.11.0-dev.124
#addin nuget:?package=Repl.Mcp&version=0.11.0-dev.124&prerelease
#tool nuget:?package=Repl.Mcp&version=0.11.0-dev.124&prerelease
Repl.Mcp
Website: repl.yllibed.org
MCP server integration for Repl Toolkit — expose your command graph as AI agent tools, resources, prompts, and MCP Apps UI via the Model Context Protocol.
Use Repl.Mcp when you already have, or want to build, a Repl command graph and make the same operations available to AI agents without writing a separate MCP server by hand.
Install
dotnet add package Repl.Mcp
One line to add
using Repl.Mcp;
app.UseMcpServer();
Your commands become MCP tools. Route constraints become JSON Schema. Annotations become safety hints.
myapp mcp serve # AI agents connect here
myapp # still a CLI / interactive REPL
IReplInteractionChannel user feedback maps to MCP-native transports:
- progress → progress notifications
- notice / warning / problem feedback → MCP message notifications
Keep operator logging on ILogger; do not rely on user-facing interaction as a logging sink.
Agent configuration
Most MCP clients use the same shape:
{
"mcpServers": {
"myapp": {
"command": "myapp",
"args": ["mcp", "serve"]
}
}
}
Use the executable that matches your app packaging. For local project samples, build once and use dotnet run --no-build --project ... -- mcp serve so host startup does not rebuild or write build output to stdout.
MCP Apps
Repl.Mcp can also expose MCP Apps UI resources:
This support is experimental in the current version. AsMcpAppResource() handlers should return generated HTML as string, Task<string>, or ValueTask<string>; richer return shapes and asset helpers may be added later.
app.Map("contacts dashboard", (ContactStore contacts) =>
$"<!doctype html><html><body>{contacts.All.Count} contacts</body></html>")
.WithDescription("Open the contacts dashboard")
.AsMcpAppResource()
.WithMcpAppBorder()
.WithMcpAppDisplayMode(McpAppDisplayModes.Fullscreen);
Clients with MCP Apps support render the generated ui:// resource. Other MCP clients still receive the command's normal launcher text instead of raw HTML.
What agents see
| You write | Agents get |
|---|---|
.ReadOnly() |
readOnlyHint — call autonomously |
.Destructive() |
destructiveHint — ask for confirmation |
.Idempotent() |
retry-safe hint |
.OpenWorld() |
external-system hint |
.LongRunning() |
long-running-operation hint |
.AsResource() |
MCP resource with repl:// URI |
.AsMcpAppResource() |
MCP Apps HTML resource with ui:// URI |
.WithMcpAppBorder() |
MCP Apps border/background preference |
.WithMcpAppDisplayMode(McpAppDisplayModes.Fullscreen) |
MCP Apps display preference |
.AsPrompt() |
MCP prompt template |
.AutomationHidden() |
Not visible to agents |
{id:guid} |
{ "type": "string", "format": "uuid" } |
[Description("...")] |
Schema description field |
Safety guidelines
Annotate every command that is visible to agents:
app.Map("contacts list", handler).ReadOnly();
app.Map("contacts import {file}", handler)
.OpenWorld()
.LongRunning();
app.Map("contacts delete {id:int}", handler)
.Destructive();
app.Map("debug reset", handler)
.AutomationHidden();
Unannotated tools force agents to assume the worst. Use .ReadOnly() for safe queries, .Destructive() for important mutations, .OpenWorld() for external systems, .LongRunning() for operations that should use call-now / poll-later patterns, and .AutomationHidden() for commands that should stay available to humans but invisible to MCP automation.
Prefer returning JSON-friendly objects instead of writing prose-only output. Structured results are easier for agents to inspect, retry, test, and summarize.
Works with
Claude Desktop, Claude Code, VS Code Copilot, Cursor, and any MCP-compatible agent.
MCP Apps host support varies. VS Code currently renders MCP Apps inline; hosts that support display mode requests can honor preferredDisplayMode.
Docs
- MCP Mode — quick start, annotations, mental model
- MCP In Depth — interaction degradation, client compatibility, agent configuration
- Agent-Native Development — designing commands for AI consumption
- For coding agents — decision rules and copyable instructions for coding agents
- Cookbook: MCP Server — resources, tools, prompts, annotations, and MCP Apps UI in action
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- ModelContextProtocol (>= 1.2.0)
- Repl.Defaults (>= 0.11.0-dev.124)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.11.0-dev.126 | 37 | 7/9/2026 |
| 0.11.0-dev.125 | 36 | 7/9/2026 |
| 0.11.0-dev.124 | 36 | 7/9/2026 |
| 0.11.0-dev.123 | 45 | 7/9/2026 |
| 0.11.0-dev.108 | 46 | 7/8/2026 |
| 0.11.0-dev.68 | 47 | 7/5/2026 |
| 0.11.0-dev.67 | 49 | 7/4/2026 |
| 0.11.0-dev.63 | 78 | 6/26/2026 |
| 0.11.0-dev.56 | 55 | 6/24/2026 |
| 0.11.0-dev.51 | 5,983 | 5/9/2026 |
| 0.11.0-dev.6 | 5,512 | 5/2/2026 |
| 0.11.0-dev.4 | 51 | 5/1/2026 |
| 0.11.0-dev.3 | 103 | 4/25/2026 |
| 0.10.0 | 1,008 | 4/25/2026 |
| 0.10.0-dev.83 | 67 | 4/25/2026 |
| 0.10.0-dev.77 | 1,009 | 4/20/2026 |
| 0.10.0-dev.76 | 69 | 4/19/2026 |
| 0.10.0-dev.59 | 72 | 4/13/2026 |
| 0.10.0-dev.58 | 3,165 | 4/7/2026 |
| 0.10.0-dev.52 | 62 | 4/7/2026 |