Mcp manager

From clacky-ai/openclacky · View interactive version

Mcp manager is an AI agent skill from the GitHub repository clacky-ai/openclacky. Manage MCP (Model Context Protocol) servers for openclacky: add, list, probe, remove, reconfigure. Edits ~/.clacky/mcp.json so the user never writes JSON by hand. Trigger on: add mcp, install mcp, setup mcp, configure mcp, mcp list, mcp remove, mcp probe, mcp reconfigure.

How to use this skill

Skill file

MCP Manager Skill

Manage MCP servers for openclacky. The user's MCP configuration lives at

~/.clacky/mcp.json (the same format Claude Desktop and Cursor use). You never

ask the user to edit it by hand — you do it for them through the local clacky

HTTP API.


Command Parsing

| User says | Subcommand |

|---|---|

| add mcp, install mcp, connect <something>, "I want clacky to read my files / access github / query my db / search the web" | add |

| mcp list, mcp status, "what mcps do I have" | list |

| mcp probe <name>, "what tools does <name> have" | probe |

| mcp remove <name>, mcp delete <name> | remove |

| mcp reconfigure <name>, mcp fix <name> | reconfigure |

If the intent is unclear, default to add — it's the most common ask.


Server Coordinates

All API calls go to the local clacky server. The host and port are exposed via

environment variables:

HOST="${CLACKY_SERVER_HOST:-127.0.0.1}"
PORT="${CLACKY_SERVER_PORT:-7070}"
BASE="http://${HOST}:${PORT}"

All write operations require requests to come from 127.0.0.1 or ::1. They

will, because we're running locally.


API Cheat Sheet

| Action | Call |

|---|---|

| List configured servers | curl -s ${BASE}/api/mcp |

| Add a server | curl -s -X POST ${BASE}/api/mcp -H 'Content-Type: application/json' -d '{...}' |

| Update a server | curl -s -X PUT ${BASE}/api/mcp/<name> -H 'Content-Type: application/json' -d '{...}' |

| Remove a server | curl -s -X DELETE ${BASE}/api/mcp/<name> |

| Probe tools | curl -s -X POST ${BASE}/api/mcp/<name>/probe |

Request body for create/update — stdio (local process, default):

{
  "name": "filesystem",
  "command": "npx",
  "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/Documents"],
  "env": { "API_KEY": "xxx" },
  "description": "Read/write files in ~/Documents"
}

Request body for create/update — http (remote server, streamable-http):

{
  "name": "linear",
  "type": "http",
  "url":  "https://mcp.linear.app/sse",
  "headers": { "Authorization": "Bearer lin_api_xxx" },
  "description": "Linear issues and projects"
}

If type is omitted but url is present, the server treats it as http.


Known-Good Server Catalog

When the user describes what they want, match it to one of these and propose it.

Each entry: package, what it does, required params, recommended description.

1. `filesystem` — read/write local files

2. `github` — GitHub repos, issues, PRs

3. `fetch` — fetch HTTP URLs as markdown

4. `memory` — persistent knowledge graph

5. `postgres` — query a Postgres database

6. `slack` — Slack messages

7. `brave-search` — web search via Brave API

8. `puppeteer` — browser automation

Custom (anything else)

If the user names a package or path you don't recognize, take the spec from them

verbatim and pass it through. Always confirm command, args, and env back

in plain language before saving.

Remote / HTTP servers (streamable-http)

Some MCP servers are hosted services and don't ship as a CLI — you connect over

HTTPS instead. Trigger when the user gives you a URL ending in /mcp,

/sse, or hosted on *.mcp.* / mcp.*.app, or says "the server is at

https://...".

Examples of remote MCP servers in the wild:

When the user pastes a URL, ask:

  1. What service is this? (so you can pick a name and description)
  2. Does it need an authorization header? If yes, paste the token.

Save with type: "http". The local clacky never spawns a process for these —

it just POSTs JSON-RPC over HTTPS.

⚠️ Wrapping a regular CLI tool: if the user gives you a CLI command that is

not a stdio MCP server (e.g. mcp-cli, some-api-cli login), do NOT save

it as a stdio MCP entry — it won't speak JSON-RPC over stdin. Tell them: *"This

looks like a regular CLI, not an MCP server. Does the service offer an HTTPS

endpoint instead?"*


Subcommand: `add` — the primary flow

Goal: the user describes what they want, you produce a working MCP entry +

confirm it works. Keep questions minimal.

Step 1 — Identify intent

pick that catalog entry directly.

able to do? (e.g. read your files, access GitHub, search the web)"*

with one-line descriptions and let them pick.

Step 2 — Environment preflight

Before asking for parameters, check the runtime is installed:

# For npx-based servers
which npx >/dev/null 2>&1 || echo "MISSING_NPX"

# For uvx-based servers
which uvx >/dev/null 2>&1 || echo "MISSING_UVX"

If missing, tell the user how to install (brew install node for npx,

brew install uv for uvx) and stop. Do not proceed.

Step 3 — Collect parameters

Ask only for the business-meaningful params from the catalog entry:

to an absolute path before saving.

ask them to paste it.

Never invent values. If you don't have a sensible default, ask.

Step 4 — Confirm

Show the user the spec you're about to save, in plain language:

I'll add a server called filesystem that runs npx -y @modelcontextprotocol/server-filesystem /Users/me/Documents. It'll let me read and write files in your Documents folder. OK?

For secrets (tokens, passwords), echo only the last 4 characters: ***...abcd.

Step 5 — Save

For stdio:

curl -s -X POST ${BASE}/api/mcp \
  -H 'Content-Type: application/json' \
  -d '{
        "name":        "filesystem",
        "command":     "npx",
        "args":        ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/Documents"],
        "description": "Read/write files in ~/Documents"
      }'

For http:

curl -s -X POST ${BASE}/api/mcp \
  -H 'Content-Type: application/json' \
  -d '{
        "name":        "linear",
        "type":        "http",
        "url":         "https://mcp.linear.app/sse",
        "headers":     { "Authorization": "Bearer lin_api_xxx" },
        "description": "Linear issues and projects"
      }'

If the response has "ok": false, show the error and ask the user how to

proceed (retry, edit, abort).

Step 6 — Probe

Immediately verify the server starts and exposes tools:

curl -s -X POST ${BASE}/api/mcp/filesystem/probe

> Done. filesystem is working — Clacky now has 11 new tools (read_file, write_file, list_directory, ...). Try asking me to list files in your Documents folder.

Step 7 — Hint at next steps

End with a one-line nudge: how the user can use the new MCP next. Examples:


Subcommand: `list`

curl -s ${BASE}/api/mcp

Render as a short table. If configured: false, say so and offer to run add.

| Name         | Command | Args summary           | Has env |
|--------------|---------|------------------------|---------|
| filesystem   | npx     | @modelcontextprotocol… | no      |
| github       | npx     | @modelcontextprotocol… | yes     |

Don't show full args if they contain absolute paths — collapse them with ….


Subcommand: `probe <name>`

curl -s -X POST ${BASE}/api/mcp/<name>/probe

If ok: true, list every tool with a one-line description. If ok: false, run

the same error-fixing flow as in add step 6.


Subcommand: `remove <name>`

  1. Confirm with the user first: *"Remove <name>? Its tools will no longer

be available to Clacky. (Y/n)"*

  1. On yes:

```bash

curl -s -X DELETE ${BASE}/api/mcp/<name>

```

  1. Confirm completion in one line.

Subcommand: `reconfigure <name>`

  1. Fetch current spec from /api/mcp and show it back.
  2. Ask which fields to change (path / token / args).
  3. Build the new spec and PUT /api/mcp/<name>.
  4. Probe to verify, same as add step 6.

General Rules

google them.

unrelated work, hand back to the main agent.

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.