Open the Enchant setup console so the account and credits are ready before Claude starts using the server.
Install Enchant in Claude Code
Claude Code has strong support for remote MCP servers, environment-variable expansion, and OAuth callbacks. Enchant fits that flow well because the hosted MCP endpoint can either trigger OAuth or accept a bearer key when you want a more explicit setup.
Start with hosted MCP first.
Claude Code supports remote HTTP MCP servers well, including browser OAuth and a manual Authorization header fallback.
Add the hosted MCP server over HTTP.
Run the /mcp command inside Claude Code and finish the browser login.
Use Claude naturally. It can call Enchant tools for discovery, inspection, and planning when the task needs external services.
Use the exact configuration this client expects.
After adding the server, run /mcp inside Claude Code and follow the OAuth login flow in your browser.
claude mcp add --transport http enchant https://askenchant.com/mcpUse this if you want Claude Code to skip OAuth and always send a bearer key instead.
claude mcp add --transport http enchant https://askenchant.com/mcp \
--header "Authorization: Bearer ${ENCHANT_API_KEY}"Claude Code expands environment variables in URL and headers, which makes team-shared config easier.
{
"mcpServers": {
"enchant": {
"type": "http",
"url": "${ENCHANT_BASE_URL:-https://askenchant.com}/mcp",
"headers": {
"Authorization": "Bearer ${ENCHANT_API_KEY}"
}
}
}
}If you need a fixed OAuth callback or pre-registered credentials
Claude Code supports --callback-port, --client-id, and --client-secret for servers that need a fixed redirect URI or preconfigured OAuth credentials. Enchant's current hosted flow is designed to work with dynamic client registration first, so most installs should not need those flags.
Small details that make the setup reliable.
Claude Code can scope MCP servers to local, project, or user config. Use user scope for a personal Enchant install you want everywhere.
If OAuth metadata discovery ever fails, Claude Code can override the auth metadata URL, but Enchant already publishes protected-resource and authorization-server metadata.
A manual bearer-token install is still useful for CI-like setups where no browser flow is available.