Skip to content
LangChain

SMTP for LangChain

io.github.ni-c/smtp-mcp

MCP server that sends mail over SMTP, gated behind an allowlist and a human confirmation

client:LangChain transport:stdio runtime:npm

Install SMTP in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
        "smtp-mcp": {
            "transport": "stdio",
            "command": "npx",
            "args": ["-y", "@ni-c/smtp-mcp"],
        }
})

tools = await client.get_tools()

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

SMTP in other clients