gateway_lab.mcp_server
Click on "Deploy 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., "@gateway_lab.mcp_server List all the tools you have available."
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.
FDE Assessment
Python implementations of four tasks covering MCP servers, security gateways, streaming guardrails, and model routing.
Tasks
Task | Implementation |
1. MCP server | Official SDK stdio server with strict input validation and JSON-RPC errors |
2. MCP gateway | JWT authentication and tool authorization for |
3. Streaming guardrail | Bounded PII redaction for emails, SSNs, and card numbers across chunks |
4. Model router | SQLite token limiter and fallback routing: 50,000 tokens/minute/key, 3-second primary timeout |
Related MCP server: Easy MCP Server
Setup
Requires Python 3.11+.
python -m venv .venvActivate with source .venv/bin/activate (macOS/Linux) or .\.venv\Scripts\Activate.ps1 (Windows PowerShell), then run:
python -m pip install -r requirements.lock
python -m pip install -e . --no-deps
python -m gateway_lab.demoThe gateway runs at http://127.0.0.1:9000, with mock upstreams on port 9001. Demo credentials are printed in the terminal. No paid API keys are needed; refunds are simulated.
From another activated terminal, run python scripts/exercise_gateway.py to check authorization, streaming redaction, and fallback. Use python -m gateway_lab.mcp_server for the standalone stdio server.
Tests
python -m pytest -q
python -m ruff check .
python -m ruff format --check .
python -m pip check65 tests cover protocol handling, authorization, stream boundaries, SQLite concurrency, and fallback. CI runs on Windows and Linux with Python 3.11 and 3.13.
See design notes, verification results, and configuration for details.
Available Tools
2 toolsget_customer_recordC
Fetch a mock customer record
Inputs: customer_id (required).
trigger_refundB
Simulate a refund; no real money moves
Inputs: amount (required), reason (required), customer_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools perform clearly separate operations: retrieving a customer record versus triggering a refund. There is no functional overlap or ambiguity between them.
Both tool names follow the same snake_case verb_noun pattern (get_customer_record, trigger_refund). The naming is concise, predictable, and consistent.
Two tools is at the low end of what feels useful; for a mock lab it may be intentional, but the surface is thin. Each tool earns its place, but there is little room for broader workflows.
The server covers a single lookup and a single action, with no way to list customers, check refund status, or cancel/reverse a refund. Agents would hit dead ends for any multi-step workflow beyond a simple demo.
Related MCP Connectors
MCP server (stdio): validate JSON against JSON Schema (draft-07 / 2020-12) via the AgentForge API
MCP server for progressive tool usage at any scale (see https://klavis.ai)
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server that validates LLM-generated tool-call arguments, lints tool definitions, and produces retry messages for AI assistants.353 npm1MIT
- AlicenseNot gradedqualityDmaintenanceA simple toolkit for creating MCP servers with stdio and SSE transport, auto-validating tools via Pydantic.MIT
- -licenseNot gradedqualityNot gradedmaintenanceAn MCP server that validates tool calls against JSON Schema, performs deterministic repair, redacts secrets, and maintains a hash-chained audit ledger.-
- FlicenseCqualityDmaintenanceSchema-driven MCP server that exposes all Paperclip API operations as typed MCP tools over stdio or Streamable HTTP, supporting both authenticated and local_mode deployments.100-