- Home
- Skills
- Agents & Orchestration
- Desktop App to the User's Own AI Assistant Connector
Desktop App to the User's Own AI Assistant Connector
Most users of a desktop application already pay for an assistant.
$39
Works with the AI Agents you already use
Desktop App to the User's Own AI Assistant Connector
Example session with this skill installed
I need to add a button to my Electron app that registers our local MCP server with the user's Claude Desktop installation. Show me the implementation.
- Read your context and instructions
- Compiled the desktop app to
The implementation uses the connectClaudeDesktop utility to safely modify the user's local configuration. It handles path discovery for standard and Microsoft Store versions, ensures a backup is created, and injects the server entry idempotently.
MCP Connector Implementation
import {
claudeDesktopConfigPaths,
connectClaudeDesktop,
connectionStatus
} from './scripts/assistant-connectors.mjs';
/**
* Registers the app's local MCP server with Claude Desktop.
* @param {string} exePath - The absolute path to your MCP server executable.
*/
async function handleConnectClaude(exePath) {
const configs = claudeDesktopConfigPaths();
for (const path of configs) {
try {
// Registers 'myapp' as a server in the config
await connectClaudeDesktop(path, 'myapp', {
command: exePath,
args: []
});
console.log(`Connected successfully at: ${path}`);
} catch (err) {
if (err.code === 'CONFIG_UNREADABLE') {
console.error(`Skipped unreadable config: ${path}`);
} else {
throw err;
}
}
}
}
// Check status for UI state
const status = connectionStatus('myapp');
console.log('Current Connection Status:', JSON.stringify(status, null, 2));
Next steps
- Define an execution alias in your Microsoft Store manifest to ensure the registered path survives app updates.
- Implement the
readOnlyHintin your MCP tools as per the reference design to prevent unauthorized modifications. - Test the connection idempotency using the provided test suite in
scripts/connectors.test.mjs.
Connects securely to your tools. The creator never sees your data.
About this skill
Most users of a desktop application already pay for an assistant. The app can give that assistant hands without calling any AI service itself: ship one small MCP server next to the app and offer Connect buttons that register it with the assistants on the machine. The assistant is the brain and the app decides exactly what it can see and do.
assistant-connectors.mjs: Claude Desktop (claude_desktop_config.json in %APPDATA%\Claude, and the Microsoft Store build's copy under %LOCALAPPDATA%\Packages\Claude_*, plus macOS and Linux locations): one mcpServers entry added or updated, every other server and preference kept, comments and trailing commas tolerated on read, an unreadable file left alone and reported, a one-time <file>.<name>-backup, idempotent, clean disconnect. Codex CLI, Codex IDE extension and the ChatGPT desktop app (~/.codex/config.toml or $CODEX_HOME): one [mcp_servers.<name>] table with its .env sub-table spliced by header, quoted and unquoted names recognised, other tables untouched, generous startup and tool timeouts. Claude Code and other clients: the exact line to paste. resolveServerExecutable prefers an environment variable in development and the package's execution alias when the app runs from a Store package folder, which changes with every update. connectionStatus for the settings screen.
example-mcp-server.mjs: a dependency-free stdio MCP server (newline-delimited JSON-RPC: initialize, ping, tools/list, tools/call, prompts/list, prompts/get) shaped as a desktop app should expose itself: three read tools and one write tool with readOnlyHint annotations, opaque job ids instead of personal details, a signed-off record that refuses changes with a message that says why, no tool for the human's own actions, logs on stderr only.
Reference: the two roads (the user's assistant vs an API key), which assistants connect how and why web ChatGPT cannot, the eight connector rules, the Store execution-alias rule, tool-surface design (reads vs writes, masking and paging, working for long jobs) and the security model. 7 tests including a real stdio session against the server. Node 20+, no packages.
Does not preserve JSON comments on write. Assumes 2026-era config locations for assistants. Requires Node 20+ environment.
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 any payment.
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 18 days ago
Requires