> For the complete documentation index, see [llms.txt](https://docs.codemash.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codemash.io/ai/frameworks/langchain.md).

# LangChain

LangChain loads MCP servers through the official [`langchain-mcp-adapters`](https://github.com/langchain-ai/langchain-mcp-adapters) package. One client config gives your agent every Norbix tool.

### Install

```bash
pip install langchain-mcp-adapters langchain
```

### Load Norbix tools

```python
from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient(
    {
        "norbix": {
            "transport": "stdio",
            "command": "npx",
            "args": ["-y", "@norbix.ai/mcp"],
            "env": {
                "NORBIX_API_KEY": "your-api-key",
                "NORBIX_HUB_URL": "https://hub.norbix.ai",
                "NORBIX_PROJECT_ID": "your-project-id",
            },
        }
    }
)

tools = await client.get_tools()
# pass `tools` to any LangChain agent
```

The agent can now search endpoints, read schemas, query collections, manage users — whatever the service user's role allows.

{% hint style="info" %}
Give agents the smallest role that works. A read-only role is enough for analysis and reporting agents. See [MCP Server → Security notes](/ai/mcp-server.md#security-notes).
{% endhint %}
