Skip to content
LangChain

ctxfw for LangChain

io.github.heuristicolab/ctxfw

Zero-egress AI Agent Firewall: SARA prompt injection defense, AST context pruning & MCP governance.

client:LangChain transport:stdio runtime:pypi

Install ctxfw in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
        "ctxfw": {
            "transport": "stdio",
            "command": "uvx",
            "args": ["ctxfw"],
        }
})

tools = await client.get_tools()

get_tools() returns the server's tools as LangChain tools, ready for an agent. LangChain docs

ctxfw in other clients