# `Wardrik.MCPServers`

Operations on the MCP servers an org or person adds for their agents at runtime.

    Wardrik.MCPServers.add(scope, owner: "acme", name: "docs", url: "https://docs.example.com/mcp", auth: %{none: %{}})
    #=> {:ok, %Wardrik.MCPServerAdded{server: "docs", connected: true, authorization: nil}}

# `add`

```elixir
@spec add(Wardrik.Scope.t(), term()) :: term() | :ok | {:error, Wardrik.Error.t()}
```

Add an MCP server for an owner's agents

An org's server serves its own agents and every agent of its people; a person's serves their agents alone. Its tools reach them from their next turn.

`POST /v1/servers`

# `list`

```elixir
@spec list(Wardrik.Scope.t(), term()) :: term() | :ok | {:error, Wardrik.Error.t()}
```

List the MCP servers an owner added

`GET /v1/servers`

# `remove`

```elixir
@spec remove(Wardrik.Scope.t(), String.t() | struct(), term()) ::
  term() | :ok | {:error, Wardrik.Error.t()}
```

Remove an MCP server

Its tools leave its agents from their next turn, and the sign-ins to it are forgotten.

`DELETE /v1/servers/{server}`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
