- Home
- Skills
- Agents & Orchestration
- Desktop App MCP Bridge over a Named Pipe (.NET)
Desktop App MCP Bridge over a Named Pipe (.NET)
Users want their assistant to read what is in the app and leave notes, and the app must not become a network service, hand its keys to another process, or act while locked.
$35
Works with the AI Agents you already use
Desktop App MCP Bridge over a Named Pipe (.NET)
Example session with this skill installed
I need to connect my WPF CRM app to Claude Desktop so I can query customer notes. How do I set up the bridge and what does the configuration look like?
- Read your context and instructions
- Compiled the desktop app mcp
The bridge is ready for implementation. I have generated the IToolBackend implementation for your CRM and the corresponding Claude Desktop configuration JSON.
Native App MCP Integration
// 1. Implementation in your WPF App
public class CrmToolBackend : IToolBackend
{
private readonly ICrmService _crm;
public CrmToolBackend(ICrmService crm) => _crm = crm;
public async Task<ToolReply> ExecuteAsync(string tool, JsonElement args)
{
try
{
if (tool == "get_customer_notes")
{
var id = args.GetProperty("customerId").GetString();
var notes = await _crm.GetNotesAsync(id);
return ToolReply.Success(new { notes = notes.Redacted() });
}
throw new ToolException("UNKNOWN_TOOL", $"Tool {tool} not found");
}
catch (Exception ex)
{
throw new ToolException("BACKEND_ERROR", ex.Message);
}
}
}
// 2. Start the bridge in App.xaml.cs
var server = new PipeBridgeServer(
() => isLocked ? BackendState.Refuse("LOCKED", "Unlock app") : BackendState.Ready(new CrmToolBackend(service)),
PipeBridge.Name("CrmApp"),
logger
);
server.Start();
// 3. Claude Desktop Configuration (~/AppData/Roaming/Claude/claude_desktop_config.json)
{
"mcpServers": {
"crm-bridge": {
"command": "C:\\Path\\To\\App\\crm-mcp-shim.exe",
"args": [],
"env": {}
}
}
}
Next steps
- Run the 25-check self-test utility to verify pipe connectivity.
- Update
tools.jsonwith theget_customer_notesschema. - Add the
crm-mcp-shim.exeto your application installer package.
Connects securely to your tools. The creator never sees your data.
About this skill
Users want their assistant to read what is in the app and leave notes, and the app must not become a network service, hand its keys to another process, or act while locked. This bridge is the shape that works.
McpServer (McpServer.cs): the Model Context Protocol over stdio as Claude Desktop, Claude Code, Codex and the ChatGPT desktop app speak it: newline-delimited JSON-RPC 2.0, protocol version negotiation with fallback, tools with annotations and output schema, optional prompts, instructions, each request on its own task so a ping is answered during a long call, a write gate that keeps output lines whole, results as structuredContent plus pretty text, backend faults mapped to isError with a code.
PipeBridge (PipeBridge.cs): the per-user named pipe (CurrentUserOnly on both ends) between the shim and the running application. The server runs one tool at a time against the app's current backend, refuses with the app's own LOCKED or TURNED_OFF sentence when the state function says so, logs client and tool to your activity log, and answers CLOSING on shutdown. The client reports NOT_RUNNING when nothing listens, reconnects only when a request could not be sent at all, and reports CONNECTION_LOST rather than retrying a call that may have acted.
Shim (McpBridge.Shim): the executable the assistant launches, with the tool catalog in tools.json (a template with status, list, get and note tools), optional instructions.txt, --version and --check.
Self-test (McpBridge.SelfTest, no test framework): 25 checks across the protocol (initialize, versions, client naming, tools/list annotations, tools/call with structured content and refusals, ping, prompts, unknown method and tool, notifications, invalid messages), the pipe (NOT_RUNNING, LOCKED, TURNED_OFF, a result through the pipe, activity log, structured refusal, malformed line) and the stdio loop (a ping answered before a slow call, protocol lines only).
reference/design.md: why a pipe and not a port, the protocol details that break clients, the pipe contract, what the app implements, the Claude Desktop configuration entry and the privacy rule of thumb. .NET 8+, no packages, no network.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.
Windows-only security guarantees for pipes. Single application instance per user. Requires .NET 8 runtime. Linux/macOS require custom socket checks.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 17 days ago
- Software
- .NET 8 SDK+