# setup_mcp_parsers

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/mcp_commands/setup_mcp_parsers)

Register the `dcode mcp` command group.

## Signature

```python
setup_mcp_parsers(
    subparsers: Any,
    *,
    make_help_action: Callable[[Callable[[], None]], type[argparse.Action]],
) -> None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `subparsers` | `Any` | Yes | The `argparse` subparsers object from the top-level CLI parser, onto which the `mcp` command group is attached. |
| `make_help_action` | `Callable[[Callable[[], None]], type[argparse.Action]]` | Yes | Factory that wraps a `show_*` callable into an `argparse.Action` so `-h/--help` renders the hand-maintained help screens from `deepagents_code.ui` instead of argparse's auto-generated text. |

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/a98f0dfa8d534d8a1885b524632400e52db22ac6/libs/code/deepagents_code/mcp_commands.py#L26)