The Agentic IDE Is an API: Building a Unified Tool Registry for Claude Code, Codex, and MCP A developer published a tutorial on tamiz.pro for building a unified tool registry that lets Claude Code, Codex, and MCP clients invoke the same versioned tools through one endpoint. The registry, built with a TypeScript control plane, Fastify HTTP API, and MCP-compatible adapter, centralizes authentication, authorization policy, argument validation, and audit logging so agents never get direct access to credentials or the host filesystem. The design deliberately rejects arbitrary shell execution, running tool implementations in a separate process with a restricted environment. Originally published on tamiz.pro https://tamiz.pro/insights/unified-tool-registry-claude-code-codex-mcp . Modern coding agents do not live inside a single IDE. They run as separate processes, connect to different model providers, and discover tools through incompatible mechanisms. Claude Code uses its own tool configuration. Codex operates within its own runtime. Model Context Protocol MCP clients connect to servers over stdio or HTTP. The result is a fragmented control plane where permissions, schemas, observability, and secrets are duplicated across every integration. The architectural shift is simple: treat the agentic IDE as an API surface, not a collection of hardcoded tool menus. Every tool becomes a versioned capability with a schema, an authorization policy, an execution boundary, and a structured result. Claude Code, Codex, and MCP clients become consumers of that same registry. This tutorial builds a runnable registry with a TypeScript control plane, a Fastify HTTP API, and an MCP-compatible adapter. You will expose a filesystem tool and a calculator, register both with explicit policies, and let multiple clients invoke them through the same endpoint. Security note: The registry intentionally rejects arbitrary shell execution. Tool implementations run in a separate process with a restricted environment. In production, add container isolation, resource quotas, and a stronger identity provider. The registry sits between agents and tool implementations. Agents never receive direct access to credentials or the host filesystem. Instead, they submit a tool invocation to the registry, which authenticates the caller, authorizes the action, validates the arguments, executes the tool, and returns a normalized response. ┌───────────────┐ ┌───────────────┐ ┌────────────────┐ │ Claude Code │ │ Codex │ │ MCP Client │ └───────┬───────┘ └───────┬───────┘ └────────┬───────┘ │ │ │ │ OpenAI-style │ MCP JSON-RPC │ │ function call │ │ └───────────────────┴────────────────────┘ │ ┌───────▼────────┐ │ Tool Registry │ │ • authn │ │ • policy │ │ • validation │ │ • audit log │ └───────┬────────┘ │ ┌─────────────┼─────────────┐ ▼ ▼ ▼ ┌──────────┐ ┌──────────┐ ┌────────────┐ │ read file│ │ calculate│ │ MCP Server │ └──────────┘ └──────────┘ └────────────┘ Four layers matter: The key invariant: all clients receive the same schema and the same authorization decision. You need: Verify your environment: node --version npm --version Create the project and install dependencies: mkdir agentic-tool-registry cd agentic-tool-registry npm init -y npm install fastify @fastify/cors zod @modelcontextprotocol/sdk npm install -D typescript tsx @types/node vitest Create tsconfig.json : { "compilerOptions": { "target": "ES2022", "module": "NodeNext", "moduleResolution": "NodeNext", "strict": true, "esModuleInterop": true, "skipLibCheck": true, "outDir": "dist", "rootDir": "src" }, "include": "src/ / .ts", "test/ / .ts" } Set the package type to ES modules: npm pkg set type=module npm pkg set scripts.dev="tsx watch src/server.ts" npm pkg set scripts.start="tsx src/server.ts" npm pkg set scripts.test="vitest run" npm pkg set scripts.typecheck="tsc --noEmit" A tool contract must be machine-readable and stable. Use JSON Schema for arguments because both OpenAI function calling and MCP understand JSON Schema conventions. Create src/contracts.ts : js import { z } from "zod"; export type ToolContract = { name: string; version: string; description: string; inputSchema: Record