# `Raxol.AgentClientProtocol.Schema.AgentTypes.McpServer`
[🔗](https://github.com/DROOdotFOO/raxol-agent/blob/raxol_agent_client_protocol-v0.1.0/packages/raxol_agent_client_protocol/lib/raxol/agent_client_protocol/schema/agent_types.ex#L1946)

A client-provided MCP server descriptor: tagged union of `http`, `sse`
(both discriminated by a `"type"` wire field), and the untagged `stdio`
fallback.

Ported from the MIT `f1729/agent_client_protocol` (c) 2025 f1729; see NOTICE.md.

# `t`

```elixir
@type t() ::
  {:http, Raxol.AgentClientProtocol.Schema.AgentTypes.McpServerHttp.t()}
  | {:sse, Raxol.AgentClientProtocol.Schema.AgentTypes.McpServerSse.t()}
  | {:stdio, Raxol.AgentClientProtocol.Schema.AgentTypes.McpServerStdio.t()}
```

# `from_json`

```elixir
@spec from_json(term()) :: {:ok, t()} | {:error, term()}
```

Total: never raises. Dispatches on `"type"` for the `http`/`sse` tagged
variants; anything else (including a bare map with no `"type"` at all) is
attempted as the untagged `stdio` variant, matching the wire spec (`type`
is stripped before delegating so it never leaks into the sub-struct's
`_meta`).

# `to_json`

```elixir
@spec to_json(t()) :: map()
```

---

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