Skip to content

MCP & hooks

Nori is an MCP client. Configure servers under [mcp_servers.<name>] in config.toml; manage connections in the TUI with /mcp.

[mcp_servers.github]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]
[mcp_servers.internal]
url = "https://mcp.example.com"
bearer_token_env_var = "INTERNAL_MCP_TOKEN"

Both stdio and streamable-HTTP transports are supported, with per-server enabled, startup/tool timeouts, and enabled_tools/disabled_tools filters.

[hooks] runs your scripts at eight lifecycle boundaries — session_start, session_end, pre_user_prompt, post_user_prompt, pre_tool_call, post_tool_call, pre_agent_response, post_agent_response — each with an async_-prefixed fire-and-forget variant.

[hooks]
session_start = ["~/.nori/hooks/announce.sh"]
async_post_tool_call = ["~/.nori/hooks/log-tools.py"]

The interpreter follows the extension (.sh → bash, .py → python3, .js → node); ~ expands; synchronous hooks time out after script_timeout (default 30 s).

this page as markdown: /cli/guides/mcp-and-hooks.md· index for agents: /llms.txt