Quick start
The fastest way to connect your AI to Flexweg: run the @flexweg/mcp-cli installer. It asks for your API key, writes the right config file for your client, and you're done.
Prerequisites
- Node.js ≥ 18 (for
npx) - A Flexweg API key — grab one at Account → API. If you'd rather not create a permanent key, the CLI can generate a temporary one (24h max) directly from your email/password.
Authentication options
When you run the CLI for the first time, it offers three ways to authenticate:
- Use existing API key — paste your permanent key from the account dashboard.
- Generate temporary key — log in with email + password; the CLI issues a 24-hour key.
- Open dashboard — the CLI opens Account → API in your browser so you can copy the key.
If the agent ever leaks the key, the blast radius is limited to 24 hours at most. Prefer them over permanent keys whenever possible.
Install for your client
Pick your AI client below. Each tab shows the one-line command to set it up.
- Claude Code
- Codex
- Cursor
- VS Code / Copilot
- Windsurf
Run this command inside your project directory:
npx -y @flexweg/mcp-cli init
The CLI walks you through authentication and writes the MCP config to .mcp.json in the current directory. Restart Claude Code and Flexweg's 27 tools are available.
npx -y @flexweg/mcp-cli init codex
Optionally add --trust-project to mark the project as trusted from the start:
npx -y @flexweg/mcp-cli init codex --trust-project
User-level config (applies to every project):
npx -y @flexweg/mcp-cli init cursor
Config is written to ~/.cursor/mcp_config.json.
Project-level config (per-repo):
npx -y @flexweg/mcp-cli init vscode
Config is written to .vscode/settings.json and picked up automatically by GitHub Copilot in that workspace.
User-level config:
npx -y @flexweg/mcp-cli init windsurf
Config is written to ~/.windsurf/mcp_config.json.
Multiple sites
If you manage several Flexweg sites, rerun init with a unique name for each site. The CLI creates separate MCP servers (flexweg-site-1, flexweg-site-2, …), each with its own API key — your AI picks the right one based on what you ask.
See Manual configuration → multiple sites for the JSON shape if you prefer editing the config by hand.
Resources
Not using one of these clients?
The CLI covers the five most common AI coding assistants. For Claude Desktop, ChatGPT, Google Gemini or any other MCP client, follow the manual configuration guide.