Sandbox
@amarnath3003/MCPify

CLI compiler for agent-ready MCP servers

MCPify scans an existing codebase and compiles the useful parts into MCP tools, workflows, and permissions. It works across backend routes, frontend actions, OpenAPI specs, and database schemas, then generates a server agents can connect to.

96 stars9 forksTypeScriptUpdated 2mo ago
Who it's for

Builders who want their agent to work against a real app surface without hand-writing MCP tools.

What it delivers

You can turn an existing app into agent-operable tools and workflows without building the MCP layer by hand.

What it does

Backend analysis

Finds callable actions in Express, Fastify, NestJS, and Next.js apps, including inline handlers.

Frontend action extraction

Maps React, Vue, and Svelte UI actions into agent-controllable operations.

OpenAPI to MCP generation

Converts OpenAPI or Swagger specs into typed MCP tools.

Workflow detection

Detects multi-step processes and exposes them as composable agent capabilities.

Permission layer

Adds scopes, roles, audit trails, and rate limits at the tool boundary.

AI metadata enhancement

Generates descriptions, hints, and examples for agent use.

Simulation and audit

Supports static safety audits and AI simulations against the compiled surface.

How to get it

  1. 1The easiest way to use MCPify is via npx. No installation required
    npx mcpify-cli analyze ./my-app
  2. 2To run it against the flagship ecommerce example in this repo
    npx mcpify-cli analyze ./examples/ecommerce-saas \
      --output ./examples/ecommerce-saas/.mcpify \
      --prisma ./examples/ecommerce-saas/prisma/schema.prisma \
      --swagger ./examples/ecommerce-saas/openapi.json
  3. 3Alternatively, to build from source
    git clone https://github.com/amarnath3003/MCPify.git
    cd MCPify
    npm install
    npm run build
    npm run mcpify -- analyze ./examples/ecommerce-saas \
      --output ./examples/ecommerce-saas/.mcpify \
      --prisma ./examples/ecommerce-saas/prisma/schema.prisma \
      --swagger ./examples/ecommerce-saas/openapi.json
  4. 4After generation
    cd examples/ecommerce-saas/.mcpify
    npm install
    npm run build

README

MCPify

Compile software into AI-operable systems.

MCPify is the AI Enablement Compiler. Transform applications, APIs, frontends, workflows, and databases into AI-native systems for autonomous agents.

npm version build status npm downloads node version license stars

Overview · Features · Getting Started · CLI · Architecture


Demo recording


Overview

Problem Statement

Modern software is built for humans, not agents. The useful actions are scattered across frontend interactions, backend services, APIs, databases, and workflows, which forces AI systems into brittle browser automation or hand-written MCP boilerplate.

  • manual MCP tool authoring for capabilities that already exist
  • brittle browser automation for UI interactions
  • raw endpoints instead of meaningful workflows
  • permission and safety gaps at the tool boundary
  • schema and tool drift as the application changes

Solution

MCPify acts as a compiler for your application. It scans the parts of the codebase that matter to agents and produces a runnable MCP server, semantic workflows, permission-aware tools, and the metadata an agent needs to use them safely.

Stop hand-writing MCP tools. Compile your stack once. Stay in sync forever.

Codex Usage

Codex is a natural fit for MCPify in a few ways:

  1. Ideate - use Codex to explore agent workflows, sketch MCP surfaces, and refine how a product should be exposed to AI.
  2. Build - use Codex to implement or extend the compiler, generators, analyzers, and demo apps in this repo.
  3. Run as MCP inside Codex - connect the generated MCP server so Codex can call real tools, inspect app surfaces, and operate against the compiled environment.

Features

  • Backend Analyzer: Deep AST analysis of routes, controllers, and services to surface every callable action. Framework-aware for Express, Fastify, NestJS, and Next.js — including inline, non-exported handlers.
  • Frontend Action Extraction: React, Vue, Svelte components mapped to agent-controllable actions.
  • OpenAPI → MCP: Drop in a spec, ship a typed MCP server in seconds.
  • Workflow Engine: Multi-step processes detected and exposed as atomic agent capabilities.
  • Permission Layer: Scopes, roles, and audit trails enforced at the tool boundary.
  • AI Metadata Enhancement: Auto-generated descriptions, hints, and examples agents actually understand.
  • Database Intelligence: Schemas, relations, and constraints become safe, queryable surfaces.
  • Event System Integration: Webhooks, queues, and pub/sub plugged into agent loops.
  • Knowledge Graph Engine: Entities, intents, and relations modeled across your stack.
  • Self-Updating Sync: MCP definitions regenerate on every commit. No drift.
  • AI Simulations: Run agents against your app in a sandbox before shipping.

Getting Started

The easiest way to use MCPify is via npx. No installation required:

npx mcpify-cli analyze ./my-app

To run it against the flagship ecommerce example in this repo:

npx mcpify-cli analyze ./examples/ecommerce-saas \
  --output ./examples/ecommerce-saas/.mcpify \
  --prisma ./examples/ecommerce-saas/prisma/schema.prisma \
  --swagger ./examples/ecommerce-saas/openapi.json

Alternatively, to build from source:

git clone https://github.com/amarnath3003/MCPify.git
cd MCPify
npm install
npm run build
npm run mcpify -- analyze ./examples/ecommerce-saas \
  --output ./examples/ecommerce-saas/.mcpify \
  --prisma ./examples/ecommerce-saas/prisma/schema.prisma \
  --swagger ./examples/ecommerce-saas/openapi.json

After generation:

cd examples/ecommerce-saas/.mcpify
npm install
npm run build

The generated AGENTS.md explains how to connect the compiled server to an MCP client. The ecommerce walkthrough lives in examples/ecommerce-saas/DEMO.md.

CLI

analyze [path]

Default command. Runs the full pipeline:

  • backend analysis
  • optional OpenAPI, Prisma, Drizzle, and Mongoose analysis
  • event and webhook discovery
  • optional frontend extraction
  • workflow detection
  • permission classification
  • MCP server generation
npx mcpify-cli analyze . \
  --swagger ./tests/fixtures/swagger/petstore.yaml \
  --prisma ./tests/fixtures/prisma/simple.prisma \
  --watch

Useful flags:

  • --output <dir> change output directory (default: ./.mcpify)
  • --no-frontend skip UI action extraction
  • --no-events skip webhook and listener analysis
  • --no-workflows skip workflow detection
  • --reachable-only emit only externally-reachable backend actions (skip internal helpers)
  • --ai-enhance improve tool descriptions (requires ANTHROPIC_API_KEY)
  • --swagger <file> analyze an OpenAPI/Swagger spec
  • --prisma <file> analyze a Prisma schema file
  • --drizzle <path> analyze Drizzle table definitions
  • --mongoose <path> analyze Mongoose schema/model files
  • --no-install skip auto-registration into AI clients
  • --clients <list> clients to register: codex, claude-code, claude-desktop, vscode, or all (default: all)

interactive

Prompts for which analyzers to run and which source files to include.

npx mcpify-cli interactive

frontend [path]

Extracts UI actions only and can print raw JSON.

npx mcpify-cli frontend ./examples/internal-tool --json

swagger <file>

Converts an OpenAPI or Swagger spec directly into MCP tools.

npx mcpify-cli swagger ./tests/fixtures/swagger/petstore.yaml

audit [path]

Static safety audit over the discovered tools and workflows — no files written.

npx mcpify-cli audit ./examples/express-api

simulate [path]

When ANTHROPIC_API_KEY is set, runs an AI simulation battery against the compiled tool surface.

npx mcpify-cli simulate ./examples/express-api

Architecture

Built for the way agents actually operate. A layered system that keeps your application untouched while exposing exactly what agents need:

  1. AI Agents: Any agent runtime (Claude, GPT, Custom) connects over MCP to start operating your software like a power user.
  2. MCP Layer: Generated tools, resources, and prompts that map 1:1 to real surface in your app. The contract agents speak.
  3. Permissions: Every call passes through scopes, audit logs, and rate limits before it touches your system.
  4. Workflows: Discovered user journeys exposed as composable, stateful operations agents can chain.
  5. Your App: Your existing stack (Frontend, Backend, Database, APIs) — untouched. MCPify reads it; it never rewrites it.

Repository Structure

mcpify/
  apps/
  docs/
  examples/
  landingPage/
  packages/
    ai-enhancer/
    backend-analyzer/
    cli/
    event-analyzer/
    frontend-analyzer/
    graph-engine/
    mcp-generator/
    monitoring/
    permissions/
    schema-engine/
    security/
    sync-engine/
    workflow-engine/
  tests/

License

See LICENSE.

Files in the repo

Repository payload23 top-level entries
  • .github
  • .mds
  • apps
  • assets
  • demo
  • docs
  • examples
  • landingPage
  • packages
  • scripts
  • tests
  • .env.example
  • .eslintrc.js
  • .gitignore
  • .prettierrc
  • CONTRIBUTING.md
  • LICENSE
  • package-lock.json
  • package.json
  • README.md
  • tsconfig.base.json
  • turbo.json
  • update_ui.cjs

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More tools

JuliusBrussee/
caveman

🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman

105k
1 add
MemPalace/
mempalace

The best-benchmarked open-source AI memory system. And it's free.

59k
stablyai/
orca

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

66k

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

132k

Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors

64k
headroomlabs-ai/
headroom

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

71k