Tutorial Articles
3 articles across AI Catchup's news, guides, tutorials, and comparisons.
All Tutorial articles
Claude Code Hooks: A Practical Guide With Six Recipes
Claude Code hooks run your own shell commands, HTTP endpoints, MCP tools, prompts, or agents at fixed points in a session. You define them in settings.json, narrow them with matchers, and block actions with exit code 2 or JSON. Exit 0 is not approval, and a hook allow never loosens your deny rules.
How to Build a Claude Code Mod: Files, Hooks, State, and Testing
A Claude Code mod is a plugin whose JavaScript or TypeScript hooks run inside your session. Ask Claude to write one, or create plugin.json, hooks/hooks.json, and a module that exports register. Load it with --plugin-dir, keep state in $.state, then check it with claude plugin validate and claude plugin test.
How to Build Your Own MCP Server: A Beginner's Guide
To build an MCP server in TypeScript, install the v2 SDK package @modelcontextprotocol/server with Zod v4, register each tool with server.registerTool and a Zod input schema, serve it over stdio, then add it to Claude Code with claude mcp add or a .mcp.json entry. A one-tool server is about 50 lines.