One-click install for Claude, Cursor, and Cline — the architecture
We write four config files in three different formats. Here is how a single Install button covers Claude Desktop, Claude Code, Cursor, and Cline without breaking existing setups.
The four files
When you click Install on Unyly, the CLI writes (or merges) up to four files:
- Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json(mac) or%APPDATA%\Claude\claude_desktop_config.json(Windows) - Claude Code:
~/.claude/.mcp.jsonand (optionally)<project>/.claude/.mcp.json - Cursor:
~/.cursor/mcp.json - Cline:
<vscode-globalStorage>/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
All four use the same mcpServers shape, but differ in transport defaults, env handling, and JSON style (some are commented JSON, some are strict).
Merge, don't overwrite
The hard part isn't writing — it's merging. Users have existing servers from previous installs. We:
- Read the existing JSON (gracefully handle malformed files with
json5). - Merge our new server into
mcpServers, preserving everything else. - Write atomically (
writeFileto.tmp,renameto target). - Show a diff in the CLI before applying.
Detection > guessing
We don't ask users which clients they have. We probe filesystem on install — clients absent get skipped silently. This means the same Install button does the right thing whether you have 1 or 4 clients.
Feedback
The CLI is bundled with the platform. Feature requests / new client formats — email [email protected].