# Declare MCP servers once for every harness
> Declare MCP servers in ivar.json once, write each harness's native config with ivar sync, and authenticate with one command.
Source: https://ivar.run/docs/recipes/shared-mcp-servers

You need a hall and an MCP server URL. This example declares Figma.

Add the server to `ivar.json`:

```json
{
  "mcp": [
    { "name": "figma", "type": "http", "url": "https://mcp.figma.com/mcp" }
  ]
}
```

Then write the harness configs and authenticate:

```sh
ivar sync
ivar mcp auth figma --all-providers
ivar mcp status
```

## What happens

- `ivar sync` rewrites each provider's native file from the declaration: `.mcp.json` for Claude Code, `opencode.json` for OpenCode and `.omp/mcp.json` for OMP.
- `ivar mcp auth` resolves the server from `ivar.json`, stores the OAuth client secret in `.ivar/secrets/mcp.env` and hands off to each provider's login path. With `--all-providers` it attempts every provider the hall lists and reports which failed.
- `ivar mcp status` reports credential status for each declared server and provider.
- Every session you start afterwards reads the same servers, whichever harness runs it.

A second server is one more entry in the `mcp` array and another `ivar sync`. A token never goes into `ivar.json`: the client secret lives in `.ivar/secrets/mcp.env`, which stays out of git, so the declaration is safe to commit and share with the team.

Run `ivar mcp auth` once per server, not once per harness. When a harness registers its own clients and the server rejects dynamic registration, `ivar` pre-registers a client for that provider first and reports the registration separately from the authentication.

## Read the full walkthrough

[Configure Figma MCP for OpenCode in one step](/blog/figma-mcp-opencode) shows the block and the auth step. The [MCP guide](/docs/guide/mcp) covers transports and OAuth, and each harness has its own page: [Claude Code](/docs/guide/mcp/providers/claude-code), [OpenCode](/docs/guide/mcp/providers/opencode) and [OMP](/docs/guide/mcp/providers/omp).
