ClaudeWrapper.Commands.Mcp (ClaudeWrapper v0.4.0)

Copy Markdown View Source

MCP (Model Context Protocol) server management commands.

Wraps claude mcp add|remove|list|get|serve|reset-project-choices.

Summary

Functions

Add an MCP server from a JSON configuration.

Get details for a specific MCP server.

List configured MCP servers.

Remove an MCP server.

Reset project choices for MCP servers.

Types

scope()

@type scope() :: :local | :user | :project

Functions

add(config, name, command, command_args \\ [], opts \\ [])

@spec add(ClaudeWrapper.Config.t(), String.t(), String.t(), [String.t()], keyword()) ::
  {:ok, String.t()} | {:error, term()}

Add a stdio MCP server.

add_json(config, name, json, opts \\ [])

@spec add_json(ClaudeWrapper.Config.t(), String.t(), String.t(), keyword()) ::
  {:ok, String.t()} | {:error, term()}

Add an MCP server from a JSON configuration.

get(config, name, opts \\ [])

@spec get(ClaudeWrapper.Config.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, term()}

Get details for a specific MCP server.

list(config, opts \\ [])

@spec list(
  ClaudeWrapper.Config.t(),
  keyword()
) :: {:ok, [map()]} | {:error, term()}

List configured MCP servers.

remove(config, name, opts \\ [])

@spec remove(ClaudeWrapper.Config.t(), String.t(), keyword()) ::
  {:ok, String.t()} | {:error, term()}

Remove an MCP server.

reset_project_choices(config)

@spec reset_project_choices(ClaudeWrapper.Config.t()) ::
  {:ok, String.t()} | {:error, term()}

Reset project choices for MCP servers.