mcp-tool-factory-ts: Instructions file for Claude Code

CLAUDE.md

mcp-tool-factory-ts CLAUDE.md is an instructions file for Claude Code from HeshamFS/mcp-tool-factory-ts. It costs 1,372 tokens per session, scanned A, original, MIT.

Repository instructions for MCP Tool Factory, a project that generates MCP servers from natural-language descriptions, API specifications, database schemas, GraphQL schemas, or ontologies. MCP lets AI assistants use connected tools and data.

In plain words
What is it for?
Use them when developing or maintaining the factory, running its tests, checking types and lint, or building its TypeScript package.
Why use it?
They explain the project's architecture and commands, making it easier to install dependencies, build generated-server templates, test changes, and check types or style.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is HeshamFS/mcp-tool-factory-ts's own configuration. It tells Claude Code how to work on mcp-tool-factory-ts itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mcp-tool-factory-ts configures →

Reuse

Borrowing it

Nothing to install: this file belongs to HeshamFS/mcp-tool-factory-ts. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/HeshamFS/mcp-tool-factory-ts/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/HeshamFS/mcp-tool-factory-ts

Made for: Claude Code.

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 mcp-tool-factory-ts CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/heshamfs/mcp-tool-factory-ts/claude-md/github.svg)](https://agentmods.dev/instructions/heshamfs/mcp-tool-factory-ts/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/heshamfs/mcp-tool-factory-ts/claude-md"><img src="https://agentmods.dev/badge/instructions/heshamfs/mcp-tool-factory-ts/claude-md/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 mcp-tool-factory-ts CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/heshamfs/mcp-tool-factory-ts/claude-md"><img src="https://agentmods.dev/badge/instructions/heshamfs/mcp-tool-factory-ts/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,372 This file is loaded in full into every session.
When invoked 1,372 The same file — it is already loaded in full.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.01372 $0.01372
Opus 5 $0.00686 $0.00686
Sonnet 5 $0.00274 $0.00274
Haiku 4.5 $0.00137 $0.00137

Measured 10d ago against content hash 0c3a70d94d8b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

mcp-tool-factory-ts CLAUDE.md 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 10d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

Tests use vitest. Integration tests require API keys to be set. Generated server tests use `InMemoryTransport` (not child_process spawn). The server template exports a `createServer()` factory function to support this pa
CLAUDE.md · 132 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

MCP Tool Factory generates production-ready MCP (Model Context Protocol) servers from natural language descriptions, OpenAPI specs, database schemas, GraphQL schemas, or ontologies. It supports multiple LLM providers (Anthropic Claude, Claude Code OAuth, OpenAI, Google Gemini) and is itself an MCP server that can be used with Claude to generate servers on-the-fly.

Commands

# Install dependencies
pnpm install

# Build (uses tsup, copies templates to dist)
pnpm run build

# Run tests (vitest)
pnpm test
pnpm test:watch              # Watch mode
pnpm test path/to/file.test.ts  # Single test file

# Type check
pnpm run typecheck

# Lint
pnpm run lint
pnpm run lint:fix

Architecture

Core Flow

Input (description/OpenAPI/database/GraphQL/ontology) → ToolFactoryAgent → Generators → GeneratedServer
  1. ToolFactoryAgent (src/agent/agent.ts) - Main orchestrator that:

    • Takes input (natural language, OpenAPI spec, database path, GraphQL SDL, or ontology)
    • Uses LLM to extract tool, resource, and prompt specifications from descriptions
    • Generates implementations (parallel or sequential)
    • Coordinates generators to produce all output files
  2. LLM Providers (src/providers/) - Pluggable provider system:

    • BaseLLMProvider - Abstract base with caching, streaming, error handling
    • Implementations: AnthropicProvider, OpenAIProvider, GoogleProvider, ClaudeCodeProvider
    • Auto-detection from environment variables via createProvider()
  3. Generators (src/generators/) - Produce output artifacts:

    • ServerGenerator - Main server code, package.json, Dockerfile, GitHub Actions, server.json
    • DocsGenerator - README, skill.md, changelog, API docs
    • TestsGenerator - Vitest test files
  4. MCP Server Mode (src/server/index.ts) - The factory itself as an MCP server exposing:

    • generate_mcp_server - From natural language
    • generate_from_openapi - From OpenAPI spec
    • generate_from_database - From database schema
    • generate_from_graphql - From GraphQL SDL schema
    • generate_from_ontology - From ontology (RDF/OWL, JSON-LD, YAML)
    • validate_typescript - Code validation
    • list_providers, get_factory_info - Discovery tools

Read the full file on GitHub · 132 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. 10d ago First seen · 132 lines · 1,372 tokens per session scan A 0c3a70d94d8b

Subscribe to this mod's changes

mcp-tool-factory-ts CLAUDE.md is an instructions file published in the GitHub repository HeshamFS/mcp-tool-factory-ts (1 stars, last pushed 6mo ago), licensed MIT. It adds 1,372 tokens to every session, about $0.0069 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens