Add a Text-Only MCP Tool to a ChatGPT App Template
Use Codex with Pomerium’s TypeScript template to add a tool. The skill explains where to define the Zod schema, register a tool for each session, and test both results and input errors.
中文Install in Codex
Use Codex in the pinned Pomerium template. Its package.json requires Node.js 24 or later. The example uses local data.
- Run git clone https://github.com/pomerium/chatgpt-app-typescript-template.git. From the checkout, run git checkout --detach 444f3cfbcc0f2cc405a01d9dc4ab2215f6e1650c.
- The checkout already includes .agents/skills/create-mcp-tool/SKILL.md in the project skills directory. Set up the template dependencies as described in the pinned README.
- Open Codex at the project root. Select the skill via /skills or $create-mcp-tool. After adding the example tool, run npm run test:server in the project.
Example task
Add a read-only glossary tool to the pinned template. Use two in-memory entries, SSE and Markdown. Search for SSE with a limit of 1, then try a limit of 0.What to check
The valid request returns only SSE. The invalid limit hits validation. Server tests cover both requests.
Original SKILL.md on GitHub · Updated
Frequently asked question
Do I need a widget for every MCP tool?
The template supports text-only tools. If you add a widget, follow the template’s widget conventions and keep a usable text response for clients without the UI.