Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

mcp

Tools from MCP servers, over stdio or HTTP.

require("mcp").setup({
  servers = {
    files = { cmd = { "npx", "-y", "@modelcontextprotocol/server-filesystem", "." } },
    linear = { url = "https://mcp.linear.app/mcp" },
  },
})

A server has cmd and optional cwd, or url and optional token. Its tools are named server__tool, and each call asks you first unless your policy allows it. /mcp add URL connects a server and signs you in when it asks, /mcp remove disconnects one, and /mcp lists them.