MingaAgent.MCP.ServerConfig (Minga v0.1.0)

Copy Markdown View Source

Normalized configuration for one session-scoped MCP server.

User config may use atom or string keys. The normalized struct keeps the process launch shape explicit so the native provider and MCP client do not pass raw config maps across module boundaries.

Summary

Types

t()

One MCP stdio server declaration.

Functions

Normalizes a user config map into a ServerConfig struct.

Normalizes one or more MCP server configs, filters disabled entries, and rejects duplicate enabled server names.

Types

t()

@type t() :: %MingaAgent.MCP.ServerConfig{
  args: [String.t()],
  command: String.t(),
  enabled: boolean(),
  env: %{required(String.t()) => String.t()},
  name: String.t(),
  source: Minga.Extension.ContributionCleanup.contribution_source()
}

One MCP stdio server declaration.

Functions

normalize(config)

@spec normalize(map() | t() | nil) :: {:ok, t() | nil} | {:error, String.t()}

Normalizes a user config map into a ServerConfig struct.

normalize_list(config)

@spec normalize_list(nil | map() | t() | [map() | t()]) ::
  {:ok, [t()]} | {:error, String.t()}

Normalizes one or more MCP server configs, filters disabled entries, and rejects duplicate enabled server names.