Skip to content
LangChain

Filesystem for LangChain

io.github.modelcontextprotocol/server-filesystem

Reference server for local file operations, scoped to directories you pass as arguments. Read, write, edit, search and inspect files and directory trees.

client:LangChain transport:stdio runtime:npm tools:11

Install Filesystem in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
        "server-filesystem": {
            "transport": "stdio",
            "command": "npx",
            "args": ["-y", "@modelcontextprotocol/server-filesystem"],
        }
})

tools = await client.get_tools()

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

What LangChain can do once it is connected

Filesystem in other clients