mcpfoundry
Stubbed integration for MongoDB databases; intended to provide CRUD tools similar to PostgreSQL.
Stubbed integration for MySQL databases; intended to provide CRUD tools similar to PostgreSQL.
Provides CRUD tools for PostgreSQL database tables by introspecting the database schema.
Allows generating MCP server tools from an OpenAPI/Swagger specification, providing typed tools for each API endpoint.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcpfoundrygenerate a Node.js MCP server from my OpenAPI spec at ./api.yaml"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcpfoundry
Forge production-ready MCP (Model Context Protocol) servers from your existing data — a database or an OpenAPI spec — in seconds.
mcpfoundry is a zero-friction CLI that introspects a data source and scaffolds a
clean, self-contained, runnable MCP server. Generated servers always ship with
parameter validation (Zod / Pydantic). An optional zero-trust
ZTAI Security Shield (JWT guard + deception canary) can be layered in with a
single --secure flag — recommended, never forced.
Install
npm install -g mcpfoundry
# or run ad-hoc:
npx mcpfoundry create --helpRelated MCP server: MCP OpenAPI Proxy
Usage
From an OpenAPI / Swagger spec
Every endpoint becomes a typed MCP tool:
mcpfoundry create \
--type openapi \
--input ./openapi.json \
--output ./my-mcp-server \
--lang nodejsFrom a database
Tables are introspected and turned into CRUD tools:
mcpfoundry create \
--type database \
--provider postgres \
--uri "postgresql://user:pass@localhost:5432/mydb" \
--output ./my-mcp-server \
--lang pythonPostgres is fully supported today. MySQL and MongoDB are stubbed and open for contributions.
Flags
Flag | Description |
|
|
|
|
| DB connection string (database mode) |
| Path to an OpenAPI spec, JSON or YAML (openapi mode) |
| Output directory (required) |
|
|
|
|
| Port for the |
| Embed the optional ZTAI Security Shield |
| Overwrite a non-empty output directory |
| Preview the tools that would be generated, then exit (no files written) |
Transports
By default the server runs over stdio — the standard way clients (Claude
Desktop, Claude Code, etc.) launch a local MCP server. Pass --transport http
to generate a server that listens on http://localhost:<port>/mcp instead
(Streamable HTTP via Express for Node, FastMCP for Python):
mcpfoundry create --type openapi --input ./openapi.yaml --output ./srv --transport http --port 3000With --secure + --transport http, the JWT guard verifies an
Authorization: Bearer <token> header on every request (returns 401 on
failure); with stdio it verifies ZTAI_AUTH_TOKEN once at startup.
--input accepts a local path or a URL, in JSON or YAML.
Preview before generating
mcpfoundry create --type openapi --input ./openapi.yaml --dry-run✔ 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 optional ZTAI Security Shield (--secure)
When you pass --secure, every generated server additionally enforces:
JWT Guard — verifies a short-lived HS256 token (
ZTAI_AUTH_TOKENat startup over stdio, or anAuthorization: Bearerheader per request over HTTP) againstJWT_SECRET. Invalid or missing tokens are rejected before any tool runs.Parameter hardening — strict Zod/Pydantic schemas (this is on even without
--secure, because it's just good hygiene).Deception Canary — when
ZTAI_CANARY_IDis set, tool output carries a subtle, traceable marker to help detect adversarial exfiltration.
Without --secure you still get a perfectly good, vendor-neutral MCP server.
Architecture — the Template-Compiler pattern
src/
cli.ts # arg parsing + orchestration
parsers/ # data source -> normalized IR (ToolSpec[])
compiler.ts # IR + Handlebars templates -> generated project
types.ts # the shared IR
templates/
nodejs/ # @modelcontextprotocol/sdk + Zod
python/ # FastMCP + PydanticParsers 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.
Develop
npm install
npm run build
node dist/cli.js create --type openapi --input examples/petstore.openapi.json --output /tmp/petstore-mcpLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/FidarOrg/mcpfoundry'
If you have feedback or need assistance with the MCP directory API, please join our Discord server