Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

Explore

  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Tags index
  • Submit a server
  • Pricing

Learn

  • Guides hub
  • What is MCP?
  • Install guide
  • Troubleshooting
  • Security
  • Blog
  • Blog RSS

Tools

  • All tools
  • Config generator
  • Config validator
  • MCP playground
  • OpenAPI β†’ MCP
  • Badge generator

For agents

  • API docs
  • Trust & traffic
  • llms.txt β†— (opens in a new tab)
  • Catalog JSON β†— (opens in a new tab)
  • Remote MCP β†— (opens in a new tab)

Company

  • About
  • Contact
  • X (@AllMCPs) β†— (opens in a new tab)
  • GitHub β†— (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on Buildlist
Β© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. πŸ—„οΈ Databases
  3. Mcp Tool Factory
M
Health: ActiveRecent health check succeeded.Last checked 8/11/2026, 12:02:04 AM

Mcp Tool Factory

Enrichment pendingWe haven’t run our AI enrichment pass on this listing yet, so the overview, use cases, and FAQ below may be sparse or missing. We work through the catalog over time β€” check back soon.
View Repository1 GitHub StarsTotal stargazers on GitHub for the source repository (1 stars).

Generate MCP servers from natural language, OpenAPI specs, or database schemas.

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β€” or use 1-click editor setup below.

Add to CursorAdd to VS Code
Not yet automatically verified

We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β€” we're steadily working through the catalog.

Manual Client & Custom JSON ConfigExpand JSON β–Ύ

Install Config Generator

Choose your client
claude_desktop_config.json
{
  "mcpServers": {
    "mcp-tool-factory": {
      "command": "npx",
      "args": [
        "-y",
        "npx"
      ]
    }
  }
}

πŸ’‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

Install Tool Schemas (8) Directory Badge Claim listing AlternativesπŸ—„οΈ More in Databases

Capabilities & Tool Schemas (8) ~103 tokensApproximate context cost of this server’s tool schemas (~4 chars/token), before any tool is called. Actual usage depends on your client and model.Self-reported Self-reportedParsed from the repository README, not verified against a live server β€” may be incomplete or out of date.

Inspect callable tools, capabilities, and parameters exposed to AI agents by Mcp Tool Factory.

generate_mcp_server

Generate from natural language description

generate_from_openapi

Generate from OpenAPI specification

generate_from_database

Generate from database schema

generate_from_graphql

Generate from GraphQL schema

generate_from_ontology

Generate from RDF/OWL, JSON-LD, or YAML ontology

validate_typescript

Validate TypeScript code

Documentation Overview

MCP Tool Factory (TypeScript)

Generate production-ready MCP (Model Context Protocol) servers from natural language descriptions, OpenAPI specs, database schemas, GraphQL schemas, or ontologies.

npm version npm downloads CI License: MIT TypeScript Node.js MCP

Why MCP?

The Model Context Protocol (MCP) is an open standard that enables AI assistants to securely connect with external data sources and tools. MCP servers expose tools that can be used by:

  • Claude Code and Claude Desktop
  • OpenAI Agents SDK
  • Google ADK (Agent Development Kit)
  • LangChain and CrewAI
  • Any MCP-compatible client

MCP Tool Factory lets you generate complete, production-ready MCP servers in seconds.

Features

FeatureDescription
Natural LanguageDescribe your tools in plain English
OpenAPI ImportConvert any REST API spec to MCP tools
Database CRUDGenerate tools from SQLite or PostgreSQL schemas
GraphQL ImportConvert GraphQL schemas to MCP tools (queries to reads, mutations to writes)
Ontology ImportGenerate from RDF/OWL, JSON-LD, or YAML ontologies
Resources & PromptsFull support for all three MCP primitives: Tools, Resources, and Prompts
10 LLM ProvidersAnthropic, OpenAI, Google, Mistral, DeepSeek, Groq, xAI, Azure, Cohere + Claude Code via Vercel AI SDK
Cost TrackingPer-call cost calculation, budget limits, provider cost comparison
Parallel GenerationTool implementations generated concurrently for faster output
LLM Response CachingDeduplicates identical LLM calls with configurable TTL
Streamable HTTPGenerated servers use the modern Streamable HTTP transport
Web SearchAuto-fetch API documentation for better generation
Production ReadyLogging, metrics, rate limiting, retries built-in
Type SafeFull TypeScript with strict mode
MCP RegistryGenerates server.json for registry publishing
Is an MCP ServerUse it directly with Claude to generate servers on-the-fly

Use as MCP Server

MCP Tool Factory is itself an MCP server! Add it to Claude Desktop, Claude Code, Cursor, or VS Code to generate MCP servers through conversation.

Tier 1 β€” Zero Config (Claude Code)

Claude Code auto-injects CLAUDE_CODE_OAUTH_TOKEN β€” no env vars needed:

Terminal
claude mcp add mcp-tool-factory -- node /path/to/mcp-tool-factory-ts/bin/mcp-server.js

Tier 2 β€” Standard (Pick a Provider)

Set one API key and go. The factory auto-detects the provider:

Claude Desktop / Cursor / VS Code β€” add to your MCP config (claude_desktop_config.json, .cursor/mcp.json, or .vscode/mcp.json):

config.json
{
  "mcpServers": {
    "mcp-tool-factory": {
      "command": "node",
      "args": ["/path/to/mcp-tool-factory-ts/bin/mcp-server.js"],
      "env": {
        "ANTHROPIC_API_KEY": "your-key-here"
      }
    }
  }
}

Any of these API keys will work: ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_API_KEY, MISTRAL_API_KEY, DEEPSEEK_API_KEY, GROQ_API_KEY, XAI_API_KEY, AZURE_OPENAI_API_KEY, COHERE_API_KEY.

Tier 3 β€” Full Control (Provider + Model + Budget)

Use MCP_FACTORY_PROVIDER, MCP_FACTORY_MODEL, and MCP_FACTORY_BUDGET to override auto-detection:

config.json
{
  "mcpServers": {
    "mcp-tool-factory": {
      "command": "node",
      "args": ["/path/to/mcp-tool-factory-ts/bin/mcp-server.js"],
      "env": {
        "OPENAI_API_KEY": "your-key-here",
        "MCP_FACTORY_PROVIDER": "openai",
        "MCP_FACTORY_MODEL": "gpt-5.2",
        "MCP_FACTORY_BUDGET": "0.50"
      }
    }
  }
}
Env VarPurposeExample
MCP_FACTORY_PROVIDEROverride auto-detected provideropenai, groq, deepseek
MCP_FACTORY_MODELOverride default modelgpt-5.2, deepseek-chat
MCP_FACTORY_BUDGETPer-generation budget limit in USD0.50

Claude Code CLI with full control:

Terminal
claude mcp add mcp-tool-factory \
  -e DEEPSEEK_API_KEY=your-key \
  -e MCP_FACTORY_PROVIDER=deepseek \
  -e MCP_FACTORY_MODEL=deepseek-chat \
  -e MCP_FACTORY_BUDGET=0.25 \
  -- node /path/to/mcp-tool-factory-ts/bin/mcp-server.js

Available Tools

ToolDescription
generate_mcp_serverGenerate from natural language description
generate_from_openapiGenerate from OpenAPI specification
generate_from_databaseGenerate from database schema
generate_from_graphqlGenerate from GraphQL schema
generate_from_ontologyGenerate from RDF/OWL, JSON-LD, or YAML ontology
validate_typescriptValidate TypeScript code
list_providersList available LLM providers
get_factory_infoGet factory capabilities

Example Conversation

You: Create an MCP server for the GitHub API with tools to list repos, create issues, and manage pull requests

Claude: Uses generate_mcp_server tool

I've generated a complete MCP server with the following tools:

  • list_repositories - List user repositories
  • create_issue - Create a new issue
  • list_pull_requests - List PRs for a repo
  • merge_pull_request - Merge a PR

Let me write these files to your project...

Quick Start

Installation

bash
# Global installation
npm install -g @heshamfsalama/mcp-tool-factory

# Or use npx
npx @heshamfsalama/mcp-tool-factory generate "Create tools for managing a todo list"

Set Your API Key

At least one provider API key is required:

server.ts
# Anthropic Claude (recommended)
export ANTHROPIC_API_KEY=your-key-here

# Or Claude Code OAuth
export CLAUDE_CODE_OAUTH_TOKEN=your-token-here

# Or any other supported provider
export OPENAI_API_KEY=your-key-here
export GOOGLE_API_KEY=your-key-here
export MISTRAL_API_KEY=your-key-here
export DEEPSEEK_API_KEY=your-key-here
export GROQ_API_KEY=your-key-here
export XAI_API_KEY=your-key-here
export AZURE_OPENAI_API_KEY=your-key-here
export COHERE_API_KEY=your-key-here

Generate Your First Server

bash
# From natural language
mcp-factory generate "Create tools for fetching weather data by city and converting temperatures"

# From OpenAPI spec
mcp-factory from-openapi ./api-spec.yaml

# From database
mcp-factory from-database ./data.db

# From GraphQL schema
mcp-factory from-graphql ./schema.graphql

# From ontology
mcp-factory from-ontology ./ontology.owl --format rdf

Usage

Natural Language Generation

bash
mcp-factory generate "Create tools for managing a todo list with priorities" \
  --name todo-server \
  --output ./servers/todo \
  --web-search \
  --logging \
  --metrics

OpenAPI Specification

bash
# From local file
mcp-factory from-openapi ./openapi.yaml --name my-api-server

# With custom base URL
mcp-factory from-openapi ./spec.json --base-url https://api.example.com

Database Schema

bash
# SQLite
mcp-factory from-database ./myapp.db --tables users,posts,comments

# PostgreSQL
mcp-factory from-database "postgresql://user:pass@localhost/mydb" --type postgresql

GraphQL Schema

bash
# From a GraphQL SDL file
mcp-factory from-graphql ./schema.graphql --name my-graphql-server

# From a URL endpoint
mcp-factory from-graphql https://api.example.com/graphql --name my-api-server

GraphQL queries are mapped to read-only MCP tools, and mutations are mapped to write tools. GraphQL types are automatically converted to Zod validation schemas.

Ontology

bash
# From RDF/OWL (.owl, .rdf, .ttl)
mcp-factory from-ontology ./ontology.owl --format rdf --name knowledge-server

# From JSON-LD (.jsonld)
mcp-factory from-ontology ./schema.jsonld --format jsonld --name linked-data-server

# From custom YAML ontology
mcp-factory from-ontology ./domain.yaml --format yaml --name domain-server

OWL Classes are mapped to MCP Resources, ObjectProperties become Tools, and DataProperties become tool parameters.

Test & Serve

bash
# Run tests
mcp-factory test ./servers/my-server

# Start server for testing
mcp-factory serve ./servers/my-server

Generated Server Structure

Code
servers/my-server/
β”œβ”€β”€ src/
β”‚   └── index.ts          # MCP server with tools, resources, and prompts
β”œβ”€β”€ tests/
β”‚   └── tools.test.ts     # Vitest tests (InMemoryTransport)
β”œβ”€β”€ package.json          # Dependencies
β”œβ”€β”€ tsconfig.json         # TypeScript config
β”œβ”€β”€ Dockerfile            # Container deployment
β”œβ”€β”€ README.md             # Usage documentation
β”œβ”€β”€ skill.md              # Claude Code skill file
β”œβ”€β”€ server.json           # MCP Registry manifest
β”œβ”€β”€ EXECUTION_LOG.md      # Generation trace (optional)
└── .github/
    └── workflows/
        └── ci.yml        # GitHub Actions CI/CD

Generated servers export a createServer() factory function for easy testing. The server uses Streamable HTTP transport with a single /mcp POST endpoint and a /health GET endpoint. Tests use InMemoryTransport.createLinkedPair() for fast, reliable in-process testing with vitest.

CLI Reference

CommandDescription
generate <description>Generate MCP server from natural language
from-openapi <spec>Generate from OpenAPI specification
from-database <path>Generate from database schema
from-graphql <schema>Generate from GraphQL schema
from-ontology <file>Generate from RDF/OWL, JSON-LD, or YAML ontology
test <server-path>Run tests for generated server
serve <server-path>Start server for testing
infoDisplay factory information

Generate Options

bash
mcp-factory generate "..." \
  --output, -o <path>           # Output directory (default: ./servers)
  --name, -n <name>             # Server name
  --description, -d <desc>      # Package description
  --github-username, -g <user>  # GitHub username for MCP Registry
  --version, -v <ver>           # Server version (default: 1.0.0)
  --provider, -p <provider>     # LLM provider (anthropic, openai, google, mistral, deepseek, groq, xai, azure, cohere, claude_code)
  --model, -m <model>           # Specific model to use
  --web-search, -w              # Search web for API documentation
  --auth <vars...>              # Environment variables for auth
  --health-check                # Include health check endpoint (default: true)
  --logging                     # Enable structured logging (default: true)
  --metrics                     # Enable Prometheus metrics
  --rate-limit <n>              # Rate limiting (requests per minute)
  --retries                     # Enable retry logic (default: true)
  --budget <amount>             # Maximum spend in USD (aborts if exceeded)
  --compare-costs               # Show cost comparison across providers before generating

Configuration

Environment Variables

VariableDescriptionRequired
ANTHROPIC_API_KEYAnthropic Claude API keyAt least one
CLAUDE_CODE_OAUTH_TOKENClaude Code OAuth tokenprovider key
OPENAI_API_KEYOpenAI API keyis required
GOOGLE_API_KEYGoogle Gemini API keyfor generation
MISTRAL_API_KEYMistral AI API key
DEEPSEEK_API_KEYDeepSeek API key
GROQ_API_KEYGroq API key
XAI_API_KEYxAI Grok API key
AZURE_OPENAI_API_KEYAzure OpenAI API key
COHERE_API_KEYCohere API key

LLM Providers

All providers use the Vercel AI SDK via a unified UnifiedLLMProvider class with lazy dynamic imports β€” only the @ai-sdk/* package for your chosen provider is loaded at runtime.

ProviderModelsBest For
Anthropicclaude-opus-4-6, claude-sonnet-4-5, claude-haiku-4-5Highest quality
OpenAIgpt-5.2, gpt-5.2-codex, o3, o4-miniFast generation
Googlegemini-3-pro, gemini-3-flash, gemini-2.5-proCost effective
Mistralmistral-large, codestral, magistralEuropean AI, code
DeepSeekdeepseek-chat, deepseek-reasonerUltra low cost
Groqllama-3.3-70b, llama-4-maverickUltra-fast inference
xAIgrok-4, grok-3, grok-code-fastReasoning
Azuregpt-4o (Azure-hosted)Enterprise compliance
Coherecommand-a, command-r+RAG, enterprise search
Claude Codeclaude-sonnet-4-5 (OAuth)Claude Code users

Programmatic Usage

Basic Usage

server.ts
import { ToolFactoryAgent, writeServerToDirectory, formatCost } from '@heshamfsalama/mcp-tool-factory';

// Create agent (auto-detects provider from env vars)
const agent = new ToolFactoryAgent();

// Generate from description
const server = await agent.generateFromDescription(
  'Create tools for managing a todo list with priorities',
  {
    serverName: 'todo-server',
    webSearch: true,
    parallel: true,           // Enable parallel generation (default)
    maxConcurrency: 5,        // Max concurrent LLM calls (default)
    budget: 1.00,             // Optional: abort if cost exceeds $1.00
    productionConfig: {
      enableLogging: true,
      enableMetrics: true,
    },
  }
);

// Cost tracking β€” see how much the generation cost
if (server.executionLog) {
  console.log(`Cost: ${formatCost(server.executionLog.totalCost)}`);
}

// Write to directory
await writeServerToDirectory(server, './servers/todo');

From OpenAPI

server.ts
import { ToolFactoryAgent, writeServerToDirectory } from '@heshamfsalama/mcp-tool-factory';
import { readFileSync } from 'fs';
import yaml from 'js-yaml';

const spec = yaml.load(readFileSync('./openapi.yaml', 'utf-8'));
const agent = new ToolFactoryAgent({ requireLlm: false });

const server = await agent.generateFromOpenAPI(spec, {
  serverName: 'my-api-server',
  baseUrl: 'https://api.example.com',
});

await writeServerToDirectory(server, './servers/api');

From Database

server.ts
import { ToolFactoryAgent, writeServerToDirectory } from '@heshamfsalama/mcp-tool-factory';

const agent = new ToolFactoryAgent({ requireLlm: false });

// SQLite (auto-detected from file path)
const server = await agent.generateFromDatabase('./data/app.db', {
  serverName: 'app-database-server',
  tables: ['users', 'posts', 'comments'],
});

// PostgreSQL (auto-detected from connection string)
const pgServer = await agent.generateFromDatabase(
  'postgresql://user:pass@localhost/mydb',
  { serverName: 'postgres-server' }
);

await writeServerToDirectory(server, './servers/app-db');

From GraphQL

server.ts
import { ToolFactoryAgent, writeServerToDirectory } from '@heshamfsalama/mcp-tool-factory';
import { readFileSync } from 'fs';

const schema = readFileSync('./schema.graphql', 'utf-8');
const agent = new ToolFactoryAgent({ requireLlm: false });

const server = await agent.generateFromGraphQL(schema, {
  serverName: 'my-graphql-server',
});

await writeServerToDirectory(server, './servers/graphql');

From Ontology

server.ts
import { ToolFactoryAgent, writeServerToDirectory } from '@heshamfsalama/mcp-tool-factory';
import { readFileSync } from 'fs';

const ontologyData = readFileSync('./ontology.owl', 'utf-8');
const agent = new ToolFactoryAgent({ requireLlm: false });

const server = await agent.generateFromOntology(ontologyData, {
  serverName: 'knowledge-server',
  format: 'rdf',
});

await writeServerToDirectory(server, './servers/knowledge');

Code Validation

server.ts
import { validateTypeScriptCode, validateGeneratedServer } from '@heshamfsalama/mcp-tool-factory';

// Validate TypeScript syntax
const result = await validateTypeScriptCode(code);
// { valid: false, errors: [{ line: 4, column: 1, message: "'}' expected." }] }

// Validate complete server
const serverResult = await validateGeneratedServer(serverCode);
// { valid: true, errors: [], summary: 'Generated server code is syntactically valid' }

Use with AI Frameworks

Claude Code / Claude Desktop

Add to your MCP settings (claude_desktop_config.json):

config.json
{
  "mcpServers": {
    "my-server": {
      "command": "npx",
      "args": ["tsx", "./servers/my-server/src/index.ts"]
    }
  }
}

OpenAI Agents SDK

server.ts
from agents import Agent
from agents.mcp import MCPServerStdio

async with MCPServerStdio(
    command="npx",
    args=["tsx", "./servers/my-server/src/index.ts"]
) as mcp:
    agent = Agent(
        name="My Agent",
        tools=mcp.list_tools()
    )

Google ADK

server.ts
from google.adk.tools.mcp_tool import MCPToolset

tools = MCPToolset(
    connection_params=StdioServerParameters(
        command="npx",
        args=["tsx", "./servers/my-server/src/index.ts"]
    )
)

LangChain

server.ts
from langchain_mcp_adapters.client import MCPClient

client = MCPClient(
    command="npx",
    args=["tsx", "./servers/my-server/src/index.ts"]
)
tools = client.get_tools()

Production Features

Structured Logging

bash
mcp-factory generate "..." --logging

Generates servers with pino structured JSON logging:

server.ts
const logger = pino({ level: 'info' });
logger.info({ tool: 'get_weather', params }, 'Tool called');

Prometheus Metrics

bash
mcp-factory generate "..." --metrics

Generates servers with prom-client metrics:

  • mcp_tool_calls_total - Counter of tool invocations
  • mcp_tool_duration_seconds - Histogram of execution times

Rate Limiting

bash
mcp-factory generate "..." --rate-limit 100

Configurable rate limiting per client with sliding window.

Retry Logic

bash
mcp-factory generate "..." --retries

Exponential backoff retry for transient failures.

Structured Error Codes

Generated servers use structured error codes for consistent error handling:

  • INVALID_INPUT - Malformed or invalid tool parameters
  • NOT_FOUND - Requested resource does not exist
  • AUTH_ERROR - Authentication or authorization failure
  • INTERNAL_ERROR - Unexpected server error

Enhanced Health Check

The /health endpoint returns detailed server status:

config.json
{
  "status": "ok",
  "version": "1.0.0",
  "uptime": 3600,
  "memory": { "rss": 52428800, "heapUsed": 20971520 },
  "transport": "streamable-http"
}

MCP Registry Publishing

Publish your generated servers to the MCP Registry for discoverability.

Generate with Registry Support

bash
mcp-factory generate "Create weather tools" \
  --name weather-server \
  --github-username your-github-username \
  --description "Weather tools for Claude" \
  --version 1.0.0

This generates registry-compliant files:

package.json:

config.json
{
  "name": "@your-github-username/weather-server",
  "mcpName": "io.github.your-github-username/weather-server"
}

server.json:

config.json
{
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
  "name": "io.github.your-github-username/weather-server",
  "packages": [{
    "registryType": "npm",
    "identifier": "@your-github-username/weather-server",
    "transport": { "type": "stdio" }
  }],
  "tools": [...]
}

Publish Workflow

bash
# 1. Build and publish to npm
cd ./servers/weather-server
npm install && npm run build
npm publish --access public

# 2. Install mcp-publisher
brew install modelcontextprotocol/tap/mcp-publisher

# 3. Authenticate
mcp-publisher login github

# 4. Publish to registry
mcp-publisher publish

See Publishing Guide for detailed instructions.

Architecture

Code
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         MCP Tool Factory                               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Input Sources                                                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
β”‚  β”‚ Natural   β”‚ β”‚  OpenAPI  β”‚ β”‚ Database  β”‚ β”‚ GraphQL   β”‚ β”‚Ontology β”‚β”‚
β”‚  β”‚ Language  β”‚ β”‚   Spec    β”‚ β”‚  Schema   β”‚ β”‚  Schema   β”‚ β”‚RDF/YAML β”‚β”‚
β”‚  β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜β”‚
β”‚        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚                   β–Ό                                                    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                     ToolFactoryAgent                            β”‚   β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚   β”‚
β”‚  β”‚  β”‚  UnifiedLLMProvider (Vercel AI SDK)                      β”‚   β”‚   β”‚
β”‚  β”‚  β”‚  Anthropic β”‚ OpenAI β”‚ Google β”‚ Mistral β”‚ DeepSeek       β”‚   β”‚   β”‚
β”‚  β”‚  β”‚  Groq β”‚ xAI β”‚ Azure β”‚ Cohere + Claude Code OAuth       β”‚   β”‚   β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚   β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚   β”‚
β”‚  β”‚  β”‚  LLM Cache   β”‚ β”‚  Cost        β”‚ β”‚ Parallel Generation   β”‚  β”‚   β”‚
β”‚  β”‚  β”‚  (TTL-based) β”‚ β”‚  Tracking    β”‚ β”‚ (max concurrency: 5)  β”‚  β”‚   β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                   β”‚                                                    β”‚
β”‚                   β–Ό                                                    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                       Generators                                β”‚   β”‚
β”‚  β”‚  ServerGenerator  β”‚  DocsGenerator  β”‚  TestsGenerator          β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                   β”‚                                                    β”‚
β”‚                   β–Ό                                                    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                     GeneratedServer                             β”‚   β”‚
β”‚  β”‚  Tools β”‚ Resources β”‚ Prompts β”‚ Tests β”‚ Docs β”‚ Dockerfile       β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                   β”‚                                                    β”‚
β”‚                   β–Ό                                                    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                Streamable HTTP Transport                        β”‚   β”‚
β”‚  β”‚          POST /mcp  β”‚  GET /health                             β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Development

bash
# Clone the repository
git clone https://github.com/HeshamFS/mcp-tool-factory-ts.git
cd mcp-tool-factory-ts

# Install dependencies
pnpm install

# Build
pnpm run build

# Run tests
pnpm test

# Type check
pnpm run typecheck

# Lint
pnpm run lint

Project Structure

Code
mcp-tool-factory-ts/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ agent/              # Main ToolFactoryAgent
β”‚   β”œβ”€β”€ auth/               # OAuth2 providers
β”‚   β”œβ”€β”€ cache/              # LLM response caching with configurable TTL
β”‚   β”œβ”€β”€ cli/                # Command-line interface
β”‚   β”œβ”€β”€ config/             # Configuration management
β”‚   β”œβ”€β”€ database/           # Database introspection (SQLite, PostgreSQL)
β”‚   β”œβ”€β”€ execution-logger/   # Execution logging
β”‚   β”œβ”€β”€ generators/         # Code generators (server, docs, tests)
β”‚   β”œβ”€β”€ graphql/            # GraphQL SDL parsing and server generation
β”‚   β”œβ”€β”€ middleware/         # Validation middleware
β”‚   β”œβ”€β”€ models/             # Data models
β”‚   β”œβ”€β”€ observability/      # Telemetry and tracing
β”‚   β”œβ”€β”€ ontology/           # Ontology parsing (RDF/OWL, JSON-LD, YAML)
β”‚   β”œβ”€β”€ openapi/            # OpenAPI spec parsing
β”‚   β”œβ”€β”€ production/         # Production code generation
β”‚   β”œβ”€β”€ prompts/            # LLM prompt templates
β”‚   β”œβ”€β”€ providers/          # LLM providers (10 providers via Vercel AI SDK + Claude Code)
β”‚   β”œβ”€β”€ security/           # Security scanning
β”‚   β”œβ”€β”€ server/             # MCP server mode (factory-as-a-server)
β”‚   β”œβ”€β”€ templates/          # Handlebars templates for generated files
β”‚   β”œβ”€β”€ validation/         # Code validation and Zod schemas
β”‚   └── web-search/         # Web search integration
β”œβ”€β”€ docs/                   # Documentation
β”œβ”€β”€ tests/                  # Test files
└── dist/                   # Built output

Documentation

  • Getting Started
  • CLI Reference
  • API Reference
  • Examples
  • OpenAPI Guide
  • Database Guide
  • Providers Guide
  • Production Features
  • Architecture
  • Troubleshooting
  • Contributing

Troubleshooting

Common Issues

API Key Not Found

server.ts
# Check your environment
echo $ANTHROPIC_API_KEY

# Set it
export ANTHROPIC_API_KEY=your-key-here

Generated Server Won't Start

bash
# Install dependencies first
cd ./servers/my-server
npm install
npx tsx src/index.ts

TypeScript Errors

server.ts
# Validate generated code
import { validateGeneratedServer } from '@heshamfsalama/mcp-tool-factory';
const result = await validateGeneratedServer(code);
console.log(result.errors);

See Troubleshooting Guide for more solutions.

Changelog

v0.3.0

  • Vercel AI SDK Migration - All LLM providers now use the Vercel AI SDK via a single UnifiedLLMProvider class with lazy dynamic imports. Removed ~473 LOC of provider-specific implementations. Only the @ai-sdk/* package for your chosen provider is loaded at runtime.
  • 10 LLM Providers - Added Mistral, DeepSeek, Groq, xAI, Azure, and Cohere alongside existing Anthropic, OpenAI, Google, and Claude Code providers. All use the same unified interface.
  • Cost Tracking - Every LLM call now calculates estimated cost using a built-in pricing table for 50+ models. Shows per-call cost, total generation cost, and per-phase breakdown (tool extraction, implementation, tests, docs). Detailed token breakdowns include cache read/write tokens and reasoning tokens from the AI SDK.
  • Budget Limits (--budget <amount>) - Set a maximum spend in USD. Generation aborts gracefully with BudgetExceededError if cumulative cost exceeds the budget.
  • Provider Cost Comparison (--compare-costs) - Before generation, estimates cost across all available providers and shows a sorted comparison table. No extra API calls needed β€” uses the static pricing table.
  • Per-Phase Cost Breakdown - CLI output and execution logs show which generation steps cost the most (tool extraction, implementation, resource extraction, prompt extraction, test generation, docs generation).
  • OpenAI Reasoning Model Support - Temperature parameter is automatically omitted for OpenAI o-series and gpt-5.x models that don't support it.

v0.2.0

  • Streamable HTTP Transport - Generated servers use StreamableHTTPServerTransport with native http module instead of Express/SSE (deprecated June 2025). Single /mcp POST endpoint with /health GET endpoint.
  • MCP SDK v1.26.0 - Updated from ^1.0.0 to ^1.26.0
  • Resources & Prompts - Full support for all three MCP primitives. Resources expose structured data (documents, DB records, file trees). Prompts provide reusable templates for guided LLM workflows. Agent automatically extracts resources and prompts from descriptions via LLM.
  • GraphQL Input Source - New from-graphql CLI command and generate_from_graphql MCP tool. Queries map to read tools, mutations map to write tools, and GraphQL types are converted to Zod schemas.
  • Ontology Input Source - New from-ontology CLI command and generate_from_ontology MCP tool. Supports RDF/OWL, JSON-LD, and custom YAML formats. OWL Classes map to Resources, ObjectProperties to Tools, DataProperties to tool parameters.
  • LLM Response Caching - Deduplicates identical LLM calls with configurable TTL. Bypass with skipCache option.
  • Parallel Generation - Tool implementations generated concurrently by default (parallel: true, maxConcurrency: 5). Significant speed improvement for multi-tool servers.
  • InMemoryTransport Testing - Generated tests use InMemoryTransport.createLinkedPair() instead of subprocess spawning. Servers export createServer() factory function for testability.
  • Production Enhancements - Rate limiting, structured logging, metrics, and duration tracking wired into tool handlers. Enhanced health check with version, uptime, memory, and transport info. Structured error codes: INVALID_INPUT, NOT_FOUND, AUTH_ERROR, INTERNAL_ERROR.

v0.1.0

  • Initial TypeScript release
  • Natural language generation with Claude, Claude Code, OpenAI, Google Gemini
  • OpenAPI 3.0+ specification import
  • Database CRUD generation (SQLite, PostgreSQL)
  • Production features (logging, metrics, rate limiting)
  • MCP Registry server.json generation
  • TypeScript syntax validation
  • Web search for API documentation
  • GitHub Actions CI/CD generation
  • MCP Server mode for on-the-fly generation with Claude

License

MIT

Links

  • GitHub Repository
  • npm Package
  • MCP Specification
  • MCP Registry
  • Python Version

Related MCP Servers

View all in Databases View all alternatives
  • AllMCPs Server logoAllMCPs Server
    β˜… Featured

    The official MCP server for AllMCPs.com - submit and manage tools directly from your AI. The open directory for MCP servers. Connect Claude, Cursor, Windsurf, and AI agents to databases, tools, files, and APIs. Explore 3,181+ servers. AllMCPs is the premier, open directory for discovering, evaluating, and installing Model Context Protocol (MCP) servers to equip AI agents and LLMs with real-world superpowers.

    πŸ—„οΈ Databases7 views
    Compare vs AllMCPs Server β†’
  • Genai Toolbox logoGenai Toolbox

    Open source MCP server specializing in easy, fast, and secure tools for Databases.

    πŸ—„οΈ Databases3 views
    Compare vs Genai Toolbox β†’
  • Airtable Mcp Server logoAirtable Mcp Server

    Airtable database integration with schema inspection, read and write capabilities

    πŸ—„οΈ Databases2 views
    Compare vs Airtable Mcp Server β†’
  • Mcp Server Duckdb logoMcp Server Duckdb

    DuckDB database integration with schema inspection and query capabilities

    πŸ—„οΈ Databases2 views
    Compare vs Mcp Server Duckdb β†’

Frequently Asked Questions about Mcp Tool Factory

Add the following block to your claude_desktop_config.json under mcpServers: "mcpServers": { "mcp-tool-factory": { "command": "npx", "args": ["-y", "mcp-tool-factory"] } }

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMcp Tool Factory AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mcp-tool-factory?style=directory)](https://allmcps.com/mcp/mcp-tool-factory)
HTML Embed
<a href="https://allmcps.com/mcp/mcp-tool-factory"><img src="https://allmcps.com/api/badge/mcp-tool-factory?style=directory" alt="Mcp Tool Factory on AllMCPs" /></a>

Technical Specs & Signals

CategoryπŸ—„οΈDatabases
More technical detailsExpand β–Ύ
TransportSTDIO
RuntimeNode.js
4/4 checks healthy over the last 6h
Views0
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
GitHub stars1
GitHub Star CountTotal stargazers on GitHub representing community popularity (1 stars).
Last commit5mo ago
Last Repository CommitThe most recent commit or push recorded for this server's GitHub repository.Last commit on Feb 12, 2026
47Quality signal: Fair Β· 47/100How this signal is calculated β–Ύ
Server availabilityNot measured

Not scored for repo-hosted servers β€” we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership10/20
Documentation & tools24/30
Adoption & activity1/15
Community engagement0/10

A guidance signal from public completeness & health data β€” not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

β˜… FeaturedAllMCPs Server logo

AllMCPs Server

The official MCP server for AllMCPs.com - submit and manage tools directly from your AI. The open directory for MCP servers. Connect Claude, Cursor, Windsurf, and AI agents to databases, tools, files, and APIs. Explore 3,181+ servers. AllMCPs is the premier, open directory for discovering, evaluating, and installing Model Context Protocol (MCP) servers to equip AI agents and LLMs with real-world superpowers.

Explore Server β†’

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Free dofollow backlink: after claiming, verify your product site and place a dofollow AllMCPs badge β€” we recheck it stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in πŸ—„οΈ Databases β†’Best MCP servers for Databases β†’Alternatives to Mcp Tool Factory β†’Install in Claude DesktopInstall in CursorInstall in VS Code