Mcp installer

From fritzprix/libr-agent · View interactive version

Mcp installer is an AI agent skill from the GitHub repository fritzprix/libr-agent. Registers, verifies, or imports MCP (Model Context Protocol) servers in LibrAgent or Claude Desktop. Use when users share MCP connection info (npm/npx/PyPI package, MCP server GitHub repo, config JSON, server URL), want a capability that needs a new MCP server (\"I want stock data\"), or want to imp

How to use this skill

Skill file

MCP Installer

This skill registers MCP servers into the current LibrAgent session or the user's Claude Desktop configuration. It covers both direct installation (from packages or URLs) and import/sync (from other AI editors).

🚀 Workflow

Step 0: Determine Input Path

| User intent | Path |

| --- | --- |

| "Import from Cursor", "sync my MCP servers", "what's installed elsewhere?" | Import → below |

| npm/PyPI package, MCP server GitHub repo, server URL, or pasted JSON config | Direct install → below |

| GitHub URL whose repo or subpath contains SKILL.md | Not an MCP server → use skill-deployer |

| GitHub URL and you cannot tell | Inspect it first (README, package.json/pyproject.toml, SKILL.md), then pick the path. Ask the user only if it is still unclear. |

| A capability with no package, URL, or config ("I want stock data", "connect Slack") | Catalog → below |

| "Install it" with no package, URL, config, or capability | Ask what to install. Do not guess a package. |

Catalog Workflow

  1. Search the curated catalog — Call tool__listServers({"scope":"catalog","query":"<keyword>"}) with a short keyword from the request (e.g. stock, slack, search). Omit query to see every preset.
  2. Pick a preset — If one matches, use it as is: it comes from LibrAgent's official list. If it is marked registered, it is already installed; do not register it again (use tool__updateServer to change it).
  3. Collect required inputs — For each entry in requiredVariables, replace the matching placeholder (e.g. YOUR_GITHUB_PAT) in the preset's transport. For a secret (API key, token, password), write {{secret:NAME}} (NAME in UPPER_SNAKE_CASE, e.g. Bearer {{secret:GITHUB_PAT}} or ?exaApiKey={{secret:EXA_API_KEY}}); LibrAgent asks the user for the value in a secure prompt when you register. Never ask for a secret in chat. Ask in chat only for non-secret values.
  4. Register and verify — Call tool__registerServer with the preset name, description, transport (and authentication when present), then run Step 3 of the direct install workflow. If each secret input is a {{secret:NAME}} template and every other value stays as the preset gives it, the install needs no user approval. Changing a non-secret value (for example a server URL), the command, args, or URL, adding env/header keys, or passing authentication makes it a normal approval-gated install. Presets that track @latest run new upstream releases without asking again.
  5. No match — Only then search the web or npm for a package. Tell the user the source is not curated by LibrAgent before you register it.

Import Workflow

  1. Identify sources — Consult app_paths.md for config locations.
  2. Scan — Read detected config files. Resolve environment variables (%APPDATA%, %USERPROFILE%, ~) before reading. If a project-level config (e.g., .cursor/mcp.json) exists in the current workspace, prioritize it.
  3. Compare — List all found MCP servers. Use tool__listServers to compare with LibrAgent's current registrations. Mark servers as new or already registered.
  4. Select — Present the list to the user. Ask which servers to import (all or specific ones).
  5. Register — Use tool__registerServer for each selected server. Skip duplicates (same name and command). Each call asks the user for approval (see Step 2 below).
  6. Verify — Run Step 3 below for each registered server.
  7. (Optional) — Offer to update claude_desktop_config.json as well.

Schema notes: VS Code Copilot uses servers as the root key; Zed uses context_servers. Normalize entries before registration.

Direct Install Workflow

1. Analyze Information

Identify the source and transport details.

2. Register in LibrAgent

Use the tool__registerServer tool to add the MCP server. Never hand-edit LibrAgent config files or the database.

tool__registerServer (except an unchanged catalog preset) and tool__updateServer always pause for the user's approval, even in YOLO mode, because a stdio server runs an arbitrary command. The saved server records its source (catalog preset or external); the success message shows it. Before you call it, tell the user in one line what will run (command and args, or URL) and which env variables it needs. If the user rejects it, stop and ask what to change; do not retry the same call.

Example Task:

"Register the 'everything' MCP server using npx."

Execution:

{
  "name": "everything",
  "description": "MCP server with all capabilities",
  "transport": {
    "type": "stdio",
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-everything"]
  }
}
3. Verify (required)

Installation is not done until the server is verified.

  1. Call tool__verifyServer with the server name.
  2. On success, report the tools it exposes, then go to Step 3a. Saving a server does not make it callable in any session yet.
  3. On failure, report the real error and the next step:
3a. Offer to attach (required after a successful verify)
  1. Ask: "Attach <server> to this assistant so it can use these tools?" Use the agent id from ## Agent Runtime Identity.
  2. Yes → read the assistant's current externalMcpServers with agent__listAgents({ type: "configs", query: "<agent id>", verbose: true }), then call agent__updateAgent(id: "<agent id>", externalMcpServers: [...current ids, "<server id>"]). The list is replaced, not merged, so always include the existing ids. Then tell the user: "Start a new session to use the <server> tools. The current session cannot load them."
  3. No → tell the user the server is saved but not attached, and that they can attach it later to any assistant (by name) in Settings or by asking you.
4. Claude Desktop (Optional)

If the user specifically asks to install it in Claude Desktop:

  1. Locate claude_desktop_config.json (see app_paths.md).
  2. Read the current configuration.
  3. Append the new server entry.
  4. Save the file and notify the user to restart Claude Desktop.

🛠 Guidelines

Reference

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.