convez.ai
MCP Server
FidarOrg

mcpfoundry

FidarOrg/mcpfoundry

Ver no GitHub
BomPluginScore · de 0 a 100

Forge production-ready MCP servers from databases or OpenAPI specs.

Instalação

$npx convez-ai FidarOrg/mcpfoundry

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
15
Forks
0
Acompanhando
2
Saúde
62%
Último commit
há 2 meses
Versão
—
Issues abertas
0
Contribuidores
1

README

A tradução para o português deste README ainda está na fila.

Create secure, production-ready MCP servers from your database or API — in under 5 minutes. ⚒️

npm version npm downloads license node PRs welcome

Quick Start · Features · Security · Examples · Contributing


Stop hand-writing MCP servers. Point mcpfoundry at a Postgres database or an OpenAPI spec and get a clean, runnable, secure-by-option MCP server — with parameter validation, typed tools, and an HTTP endpoint — generated for you. Node.js or Python. Zero boilerplate.


⚡ Quick Start (60 seconds)

npx mcpfoundry create \
  --type openapi \
  --input https://petstore3.swagger.io/api/v3/openapi.json \
  --output ./petstore-mcp

cd petstore-mcp && npm install && npm start
# 🎉  MCP server live on http://localhost:3000/mcp

That's a full MCP server — every endpoint turned into a validated tool — running. No SDK wrangling, no transport plumbing, no boilerplate.


✨ Why mcpfoundry?

⏱️ Ship in 5 minutesOne command turns a DB or API into a working MCP server.
🔒 Secure by optionAdd --secure for a zero-trust JWT guard + deception canary. Off by default, never forced.
🛡️ Hardened by defaultEvery tool gets strict Zod / Pydantic parameter validation — no opt-in needed.
🏭 Production qualitySelf-contained, lint-clean, type-safe output that builds and boots out of the box.
🧩 Maintainable & extensibleClean Template-Compiler architecture — add a language with a folder, no core changes.
🌐 HTTP or stdioStreamable HTTP by default; --no-http for stdio (Claude Desktop / Claude Code style).
🐍 Node.js & PythonFirst-class @modelcontextprotocol/sdk (TS) and FastMCP (Python) output.
🔌 DB & OpenAPIIntrospect Postgres into CRUD tools, or convert any OpenAPI/Swagger spec (file or URL, JSON/YAML).

🛠️ Two ways to create

1. From an OpenAPI / Swagger spec

Every endpoint becomes a typed, validated MCP tool.

mcpfoundry create --type openapi --input ./openapi.yaml --output ./my-server

2. From a database

Tables are introspected into ready-to-wire CRUD tools.

mcpfoundry create --type database \
  --provider postgres \
  --uri "postgresql://user:pass@localhost:5432/mydb" \
  --output ./db-server --lang python

💡 Preview first with --dry-run to see exactly which tools you'll get — no files written:

✔ Dry run — 4 tool(s) would be generated:
  • list_pets(limit?: integer)
  • create_pet(name: string, tag?: string)
  • get_pet_by_id(pet_id: integer)
  • delete_pet(pet_id: integer)

🔐 The ZTAI Security Shield (optional)

Pass --secure and every generated server enforces zero-trust access — recommended, never required:

  1. 🔑 JWT Guard — verifies a short-lived HS256 token (an Authorization: Bearer header per request over HTTP, or ZTAI_AUTH_TOKEN at startup over stdio) against JWT_SECRET. Invalid or missing → rejected before any tool runs.
  2. 🧱 Parameter hardening — strict Zod / Pydantic schemas (this is always on, even without --secure — it's just good hygiene).
  3. 🪤 Deception canary — set ZTAI_CANARY_ID and tool output carries a subtle, traceable marker to help detect adversarial data exfiltration.

Without --secure you still get a perfectly good, vendor-neutral MCP server.


🎛️ All options

FlagDescription
--typedatabase or openapi (required)
--providerpostgres | mysql | mongodb (database mode)
--uriDB connection string (database mode)
--inputOpenAPI spec — file path or URL, JSON or YAML (openapi mode)
--outputOutput directory (required)
--langnodejs (default) or python
--transporthttp (default) or stdio
--no-httpShortcut for --transport stdio
--portPort for the HTTP transport (default 3000)
--secureEmbed the optional ZTAI Security Shield
--forceOverwrite a non-empty output directory
--dry-runPreview the generated tools, then exit

Postgres is fully supported today. MySQL & MongoDB are scaffolded and open for contributions.


🧩 How it works

mcpfoundry follows a clean Template-Compiler pattern:

  source (DB / OpenAPI)  ──▶  parser  ──▶  normalized IR (ToolSpec[])
                                                   │
                                       Handlebars compiler
                                                   │
                                                   ▼
                       templates/<lang>/  ──▶  your generated server

Parsers and templates are decoupled by a normalized intermediate representation, so adding a new language is just a new templates/<lang>/ folder — no engine changes. See CONTRIBUTING.md.


🤝 Contributing

Two of the most common contributions — a new language template or a new database provider — need zero changes to the core engine. See CONTRIBUTING.md.

📄 License

MIT — build freely.

⭐ Star on GitHub if mcpfoundry saved you an afternoon.

Ver o original no GitHub

Bom para

Relacionados