# run_mcp_login_list

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/client/commands/mcp/run_mcp_login_list)

List configured OAuth servers without stored tokens.

Servers are drawn from the same trust-gated resolution as `run_mcp_login`,
so untrusted project-level entries are excluded from the scan.

A server counts as needing login when it opted into OAuth and has no
stored token at all. Expiry is deliberately not consulted, matching the
runtime's upfront gate in `resolve_and_load_mcp_tools`.

## Signature

```python
run_mcp_login_list(
    *,
    config_path: str | None,
) -> int
```

## Returns

`int`

Process exit code: 0 when every configured server's login state was
determined — including when some of them need login, which is
informational rather than a failure; 1 when the config could not
be resolved or any server's state is unknown (unreadable token
state, unresolvable config, or a config file that failed to
load); or 2 when no config file was found.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/2069079e09546060f5b52b2cd4f0e3c813e820f3/libs/code/deepagents_code/client/commands/mcp.py#L91)