create-mcp-tool

create-mcp-tool is a skill for Claude Code, Codex from pomerium/mcp-app-typescript-template. It costs 80 tokens per session (1,240 once invoked), scanned A, original, Apache-2.0.

A guide for adding tools to a server that follows the Model Context Protocol, a standard way for AI applications to call external tools. It covers both text-only tools and tools with a React-based interface in this template.

In plain words
What is it for?
Use it to add an MCP tool, create a tool with a widget, define its input and output types, register it in the server, or connect it to the template’s widget build system.
Why use it?
It explains where this template expects server code, data types, and widget files, reducing the chance of placing new code in the wrong part of the project.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to add an MCP tool, create a tool with a widget, define its input and output types, register it in the server, or connect it to the template’s widget build system.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pomerium/mcp-app-typescript-template/create-mcp-tool
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pomerium/mcp-app-typescript-template --skill create-mcp-tool
Clone the repo
git clone --depth 1 https://github.com/pomerium/mcp-app-typescript-template

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for create-mcp-tool

README.md
[![agentmods](https://agentmods.dev/badge/skills/pomerium/mcp-app-typescript-template/create-mcp-tool/github.svg)](https://agentmods.dev/skills/pomerium/mcp-app-typescript-template/create-mcp-tool)
Your own site
<a href="https://agentmods.dev/skills/pomerium/mcp-app-typescript-template/create-mcp-tool"><img src="https://agentmods.dev/badge/skills/pomerium/mcp-app-typescript-template/create-mcp-tool/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for create-mcp-tool

Your own site · 80×15
<a href="https://agentmods.dev/skills/pomerium/mcp-app-typescript-template/create-mcp-tool"><img src="https://agentmods.dev/badge/skills/pomerium/mcp-app-typescript-template/create-mcp-tool.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,240 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 14
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00080 $0.01240
Opus 5.5 $0.00032 $0.00496
Sonnet 5.5 $0.00016 $0.00248
Haiku 4.5 $0.00008 $0.00124

Measured 1mo ago against content hash f3186c69e2b3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

create-mcp-tool scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Add tests in `server/tests/`. Follow the pattern of existing test files. `server/tests/server.test.ts` shows how to exercise the real handler end-to-end — call `createHandler().fetch(request)` with a modern 2026-07-28 re
.agents/skills/create-mcp-tool/SKILL.md · 153 lines

How it starts

The opening of the file, as written. The whole thing — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Add an MCP Tool to This Template

Fetch the upstream add-app-to-server skill for core SDK patterns, then apply them using the template-specific conventions below:

https://raw.githubusercontent.com/modelcontextprotocol/ext-apps/main/plugins/mcp-apps/skills/add-app-to-server/SKILL.md

Use WebFetch to retrieve that skill now. The steps below cover what is different in this template.


How This Template Differs from the Generic SDK Examples

Generic ext-apps approach This template
Edit server.ts directly Edit server/src/server.ts inside the createMcpServer() function
Inline Zod schemas in the tool handler Define schemas in server/src/types.ts, import into server.ts
vite-plugin-singlefile for UI Widget build system in widgets/ — see the add-widget skill if you want a UI
Single-file server createMcpHandler creates a fresh McpServer for each request

All tools must be registered inside createMcpServer() in server/src/server.ts. This function is called once per request, so each request gets its own isolated McpServer instance. Do not add session managers or rely on transport session state; state that must survive a request belongs in explicit tool arguments or an external store.


Step 1: Define the Schema and Types

Edit server/src/types.ts. Every tool input must have a Zod schema and an inferred TypeScript type:

export const MyToolInputSchema = z.object({
  query: z.string().describe('The search query'),
  limit: z.number().int().min(1).max(50).optional().describe('Max results'),
});
export type MyToolInput = z.infer<typeof MyToolInputSchema>;

export interface MyToolOutput {
  results: string[];
  count: number;
  [key: string]: unknown;
}

Read the full file on GitHub · 153 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +3 lines f3186c69e2b3
  2. 1mo ago First seen · 150 lines · 80 tokens per session scan A 08e5856a98bd

Subscribe to this mod's changes

create-mcp-tool is a skill published in the GitHub repository pomerium/mcp-app-typescript-template (21 stars, last pushed yesterday), licensed Apache-2.0. It adds 80 tokens to every session and 1,240 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.