agent-connectorlisted
Install: claude install-skill ken-jo/agent-connector
# agent-connector
agent-connector is middleware that solves two problems every MCP/agent-tooling dev
hits: (1) each agent host re-invents MCP registration + lifecycle hooks with
incompatible config files, root keys, formats (JSON/JSONC/TOML/YAML/exported TS),
and event names; (2) no host reports per-tool token usage back to an MCP server.
Write the integration once; the CLI renders it into each installed host's native
dialect and measures your server's own token footprint locally.
## When to reach for it
- A dev wants to ship ONE MCP server (and/or hooks / slash commands / Agent Skills /
subagents) across many agent CLIs without hand-authoring N config dialects.
- A dev asks "which of my tools cost the most context?" → per-tool token telemetry.
- A dev wants to compare token spend across the agent CLIs on their machine →
`usage` + `leaderboard`.
Do NOT use it to author a brand-new MCP server protocol — it deploys + measures an
existing server command/URL and wraps lifecycle hooks; it does not implement tools.
## Write once: defineConnector({...})
Create `agent-connector.config.mjs` (or `.js` / `.json`) at the project root:
```ts
import { defineConnector } from "@ken-jo/agent-connector";
export default defineConnector({
id: "acme-db", // required, kebab-case ^[a-z0-9][a-z0-9-]*$
displayName: "Acme DB Tools",
version: "1.0.0",
// MCP server — declared once, transport-polymorphic. Omit for a hooks-only connector.
server: {
transport: "s