FastMCP Gateway
Integrates with Google Cloud API Gateway via native MCP (Public Preview), converting MCP tool calls into REST requests on Cloud Run.
Integrates with Kong Gateway using a local DB-less Kong deployment that proxies REST and the existing FastMCP server.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
API Gateway meets MCP — Order demo
MCP Client → FastMCP Gateway → FastAPI REST API → SQLite
At startup, the gateway reads the REST API's OpenAPI schema and generates tools for the allowed operation IDs. The REST API checks credentials, manager approval, and order status.
Gateway integrations
Gateway | MCP architecture | Guides |
Google Cloud API Gateway | Native MCP (Public Preview) converts tool calls to REST on Cloud Run | |
Kong Gateway | A local DB-less Kong deployment proxies REST and the existing FastMCP server | |
Envoy | Native MCP JSON REST Bridge translates tool calls to FastAPI | |
Apigee | Managed MCP Discovery Proxy maps OpenAPI operations to an Apigee REST proxy |
The standalone local demo is documented below.
REST operation | MCP access |
GET /orders |
|
POST /orders | REST only ( |
GET /orders/{order_id} |
|
GET /inventory |
|
GET /inventory/{sku} |
|
POST /shipments |
|
POST /orders/{order_id}/cancel | Manager-only REST operation ( |
Related MCP server: Agentic MCP Microservices
Run locally
Use Python 3.11 or later. From the extracted project directory, install the dependencies.
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txtRun each command from the project directory with the virtual environment active. In Windows PowerShell, activate it with .venv\Scripts\Activate.ps1.
Terminal A — REST API
python -m uvicorn api:app --host 127.0.0.1 --port 8000Open http://127.0.0.1:8000/ for service information or http://127.0.0.1:8000/docs to explore the REST API.
The REST API uses Python’s built-in sqlite3. At startup it creates db.sqlite3 beside the code and seeds two orders and one SKU when all three tables are empty. Orders, stock, and shipments persist across restarts. Set SQLITE_PATH to use a different database file. Environment defaults are in config.py.
Terminal B — MCP gateway
python gateway.pyThe Streamable HTTP endpoint is http://127.0.0.1:9000/mcp.
Terminal C — MCP client
python client.py
python approve_shipment.py ORD-1001The first script lists the available tools, lists orders and SKUs, and checks an individual order and its stock. Pass an order ID to the second script, then enter YES to approve its shipment. The script defaults to ORD-1001 if you omit the ID.
Create a demo order
In Swagger UI at http://127.0.0.1:8000/docs, expand POST /orders, click Try it out, and set x-api-key to demo-rest-secret (or your configured key). Use a body like this:
{"sku": "SKU-A01", "quantity": 2}The API returns HTTP 201 with a generated orderId and status PAID. Copy the ID and pass it to python approve_shipment.py ORDER_ID to try shipping the new order. Stock is deducted on shipment.
Demonstrate order cancellation
Use ORD-1002 so it stays separate from the shipment demo.
curl -i http://127.0.0.1:8000/orders/ORD-1002/cancel \
-H 'x-api-key: demo-rest-secret' \
-H 'Content-Type: application/json' \
-d '{"reason":"Customer requested cancellation"}'The REST API returns HTTP 403 with the service key alone. Repeat the request with -H 'x-manager-key: demo-manager-secret' to receive HTTP 200. The order stays available with status CANCELLED and its cancellation reason.
curl -s http://127.0.0.1:8000/orders/ORD-1002 \
-H 'x-api-key: demo-rest-secret'The API returns HTTP 409 if you try to ship a cancelled order, cancel an order twice, or cancel an order that already has a shipment.
Reset the demo database
Run this command with the same SQLITE_PATH setting as the REST service. It clears the demo orders, inventory, and shipments, then restores the sample data in a single transaction.
python reset_demo_db.pyEnd-to-end tests
Start both services with the default keys. To isolate the test data, set SQLITE_PATH to a dedicated file, such as test-demo.sqlite3, when starting the REST service and running the reset script. Reset that database before each test run.
python -m unittest -v test_demoThe standalone demo uses local services and sample keys. The Google Cloud guide uses google-cloud-openapi-example.yaml as its deployment template.
LICENSE
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Discover, plan and run tools across your connected business systems through one OAuth MCP endpoint
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
One OAuth connector for your team's remote MCP servers, with Tool Packs, guardrails and logs.
Governed MCP gateway for business apps: roles, previews, approvals and one audit log.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server exposing Shopify commerce backend with ~22 typed tools for orders, inventory, logistics, and fulfillment, including read/write separation and structured errors.ISC
- FlicenseNot gradedqualityDmaintenanceMCP server that exposes customer profile, order listing, and order cancellation tools, integrating with underlying REST services to enable AI agents to manage customer and order workflows.-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to find stale unshipped orders, retrieve order details, and mark orders as shipped by wrapping the orders REST API as MCP tools.5MIT
- AlicenseNot gradedqualityBmaintenanceExposes selected operations of an existing REST/OpenAPI app as MCP tools with generated schemas, permission annotations, and a risk class, requiring explicit opt-in before anything is listed and a second flag for destructive calls. Enforces security-first guardrails such as environment-injected auth, a single confined base URL, timeouts, response caps, rate limiting, and a local test console for trying tools.MIT