Add MCP servers to Windsurf
Manage Windsurf’s MCP servers from one canonical config with mcpfold — the free, open-source CLI. Write your servers once and fold them out to Windsurf’s own mcpServers config, with secrets kept as references, not hardcoded values.
Set up Windsurf in 4 steps
- Install mcpfold. Install the free, open-source mcpfold CLI — no account required.
npm install -g mcpfold - Create your config. Create one canonical mcp.config.jsonc — the single source of truth mcpfold folds out to every client.
mcpfold init - Add a server. Add an MCP server from the registry (secrets stay references, versions stay pinned), or run `mcpfold import` to pull in servers you already configured.
mcpfold add <server> --from-registry - Fold it out to Windsurf. Write your servers into Windsurf's own config (/Users/you/.codeium/windsurf/mcp_config.json) under its `mcpServers` key. Then restart Windsurf so it loads the new servers.
mcpfold sync
What mcpfold writes for Windsurf
Config file
/Users/you/.codeium/windsurf/mcp_config.jsonWindows:
C:\Users\you\.codeium\windsurf\mcp_config.jsonConfig key
mcpServersSecrets
Secrets stay as `${env:…}` / `${op:…}` references; mcpfold's launcher resolves them at run time, so Windsurf's config file never contains a raw token.
Remote servers
Windsurf can call unauthenticated remotes natively; authenticated ones are bridged with a pinned `mcp-remote` launch so credentials are handled safely.
After sync
Restart Windsurf to load new or changed servers.
Looking for servers to add? Browse the MCP server directory — every entry adds in one mcpfold add. Or see the install options.
mcpfold is an independent, open-source project and is not affiliated with or endorsed by Windsurf. Names are used only to describe compatibility.