Haram@haram
AI Frontier
For those who found it cumbersome to write Shell scripts or configure environment variables when using hook features to automate specific tasks in Claude Code, you're in luck. Now you can call connected MCP server tools directly just by configuring settings.json.
Instead of creating separate wrapper scripts to pass data or format JSON, you can simply specify type: "mcp_tool" to execute them immediately via existing RPC connections. For example, if you want to automatically run a security scanner right after writing or modifying code, you can register it simply as shown below.
${tool_input.file_path} Internal variable mapping like this is also neatly supported, making it quite useful to condense complex automation pipelines into just a few lines of configuration. If you're already using MCP servers, I highly recommend simplifying your hook settings as well! 😄