Getting Started
Installation#
agent-connector is an SDK you depend on, not a global tool your connector users install first. Add it to your MCP package, then ship a branded CLI your users drive directly (npx @acme/acme-db-mcp install). Developers use the framework command for local fallback or packaging; agent users use the global CLI for connector-free token telemetry.
Add agent-connector as a dependency of the package that holds your agent-connector.config:
npm install @ken-jo/agent-connectorThen expose every subcommand under your own brand with createConnectorCli from the @ken-jo/agent-connector/cli export — the branded-CLI flow. Each command is auto-scoped to your connector, so your users never type --connector:
#!/usr/bin/env node
// bin.mjs — your package.json "bin" target, e.g. "acme-db"
import { createConnectorCli } from "@ken-jo/agent-connector/cli";
// run() resolves to the exit code and never calls process.exit — forward it.
process.exitCode = await createConnectorCli({
// packageJson supplies public identity: name, mcpName, bin, version.
packageJson: new URL("./package.json", import.meta.url),
// connector supplies behavior: server, hooks, skills, telemetry.
// These are two layers, not duplicate id/display-name inputs.
connector: new URL("./agent-connector.config.mjs", import.meta.url),
}).run();Engines
Node>=18.17, ESM only. Runtime deps are pure-JS / WASM (gpt-tokenizer, sql.js, fzstd, @iarna/toml, yaml) — no native build. License: Apache-2.0 © KenJo.Optional: global framework CLI#
You do not need a global install for branded MCP package installs. Use the framework CLI directly for connector-free token telemetry across the agent hosts you already use. Developers can run framework tooling with npx @ken-jo/agent-connector ... from their MCP package:
# optional for agent users — connector-free token telemetry
npm i -g @ken-jo/agent-connector
agent-connector usage reportFrom source#
npm install
npm run typecheck
npm test
npm run build
npm run dev -- detect # run the CLI from source via tsx