Skip to content

Reference

alter init

Add the Alter Docs MCP server to a project's MCP client config.

alter init writes the hosted Alter Docs MCP server into the project’s MCP client configuration, so a coding agent (Claude Code, Cursor) can guide the integration end to end — classify the use case, walk the setup or modification flow, wire the SDK, and point at the verification gates.

alter init [--client claude|cursor] [--url <url>] [--name <name>] [--dir <path>] [--force]

The onboarding MCP serves guidance only — it is unauthenticated and holds no credentials, so this command touches no secrets.

FlagDefaultDescription
--client <client>auto-detectclaude writes .mcp.json; cursor writes .cursor/mcp.json. Auto-detect picks cursor when a .cursor/ directory exists.
--url <url>https://mcp.alterauth.com/mcpEndpoint to register (override for staging/self-hosted); must be a valid HTTP or HTTPS URL.
--name <name>alter-onboardingThe non-empty server entry name in the config; surrounding whitespace is trimmed.
--dir <path>.Project root to write into.
--forceoffReplace an existing entry with the same name. Other entries are always preserved.

Existing config files are merged, never clobbered: other MCP server entries are kept as-is, an invalid JSON file is refused rather than overwritten, and replacing an existing same-name entry requires --force (exit code 5 otherwise). After writing, restart the MCP client and ask the coding agent to call the server’s get_started tool.

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.