agentleFS
477174477174/interface-mcp-agent-creator/.claude/skills/mcp-tool-generator/SKILL.md

mcp-tool-generator

Skill0 starsChanged 8 months agoMITView on GitHub

Generate a TypeScript MCP server with frontend tools for each discovered application feature. Uses @modelcontextprotocol/ext-apps for tool registration and @mcp-ui/server for UI content. Reads feature maps from feature-mapper and optionally code maps from code-correlator. Use when asked to: generate MCP tools, create frontend MCP, build MCP server, create tools for this app, generate mcp-ui tools, build tool server.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. patonkikh/APES★ 3same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 5 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If no feature map is found, stop and instruct the user to run feature-mapper first.

    line 24
  2. Very specific:

    If available, load code map JSON from .claude/artifacts/code-map-*/.

    line 25
  3. Distinctive:

    If code map is missing, continue without code references.

    line 26
  4. Very specific:

    Follow patterns in references/server-scaffold.md.

    line 57
  5. Very specific:

    Use registerAppTool() and registerAppResource() for each feature UI.

    line 62
  6. Very specific:

    Use createUIResource() with only:

    line 63
  7. Very specific:

    Run tsc --noEmit against generated output.

    line 69
  8. Distinctive:

    Ensure imports resolve and generated types are valid.

    line 70
  9. Distinctive:

    Write generated server into:

    line 74
  10. Distinctive:

    Use for form confirmations, action status, compact tables, and small result panes.

    line 90
  11. Distinctive:

    Use for dashboards, full-page workflows, and complex interactive views.

    line 93
  12. Very specific:

    When feature handlers need browser interaction (form fill, click, navigation), generate compatibility-safe Chrome MCP calls.

    line 98

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

MCP Tool Generator

Overview

This skill generates a complete TypeScript MCP server from feature documentation created by feature-mapper. It uses @modelcontextprotocol/ext-apps for tool and resource registration and @mcp-ui/server for UI content generation. The output contains one tool per discovered feature, with content limited to rawHtml and externalUrl.

Prerequisites

  • Feature map exists at .claude/artifacts/feature-map-*/ (required).
  • Code map exists at .claude/artifacts/code-map-*/ (optional enrichment).
  • Node.js + TypeScript environment is available for generated server validation.
  • Pipeline 1 -> 2 -> 4 is supported (you can skip code-correlator).

Generation Workflow

Step 1: Read Input

  • Load feature map JSON from .claude/artifacts/feature-map-*/.
  • If no feature map is found, stop and instruct the user to run feature-mapper first.
  • If available, load code map JSON from .claude/artifacts/code-map-*/.
  • If code map is missing, continue without code references.

Step 2: Categorize Features

  • Group features by behavior type:
    • form submission
    • navigation
    • data display
    • action trigger

Step 3: Determine Content Types

  • Apply mapping rules from references/input-format.md:
    • dashboard / reporting -> externalUrl
    • form / crud / settings -> rawHtml
    • navigation / search -> externalUrl
    • other -> externalUrl (safe default)

Step 4: Generate Tool Definitions

  • For each feature, generate:
    • tool name from feature.id
    • tool description from feature name + description
    • inputSchema from feature.actions
    • handler definition with selected content type
  • Enforce a hard cap of 50 tools per generated server.

Step 5: Generate Server Scaffold

  • Copy scaffold files from assets/mcp-server-template/.
  • Inject generated registrations into src/index.ts.
  • Follow patterns in references/server-scaffold.md.

Step 6: Generate Tool Handlers

  • Generate one handler per tool using references/tool-templates.md.
  • Use registerAppTool() and registerAppResource() for each feature UI.
  • Use createUIResource() with only:
    • rawHtml
    • externalUrl

Step 7: Validate

  • Run tsc --noEmit against generated output.
  • Ensure imports resolve and generated types are valid.

Step 8: Save Output

  • Write generated server into:
    • .claude/artifacts/mcp-server-{timestamp}/

API Overview

  • McpServer from @modelcontextprotocol/sdk: base MCP server instance.
  • registerAppTool() from @modelcontextprotocol/ext-apps: registers tool definitions with app-aware metadata.
  • registerAppResource() from @modelcontextprotocol/ext-apps: registers UI resources for host retrieval.
  • createUIResource() from @mcp-ui/server: constructs UI resources from allowed content types.

For full signatures and examples, read references/mcp-ui-api.md.

Content Types

  • rawHtml
    • Inline HTML rendered in chat.
    • Use for form confirmations, action status, compact tables, and small result panes.
  • externalUrl
    • iframe-based URL rendering.
    • Use for dashboards, full-page workflows, and complex interactive views.
  • remoteDom is not used by this skill.

Chrome MCP Integration

When feature handlers need browser interaction (form fill, click, navigation), generate compatibility-safe Chrome MCP calls. Do not hardcode tool prefixes. Use references/chrome-mcp-compat.md for runtime mapping across available Chrome MCP variants.

Output

Generated MCP server output is written to .claude/artifacts/mcp-server-{timestamp}/.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.