customer-mcp
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., "@customer-mcp get customer record for ID 1234"
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.
AI Solutions Engineer Assessment Submission
Python 3.11 solution for the four implementation tasks supplied in the assessment. The project uses the official MCP Python SDK, FastAPI/httpx, and an on-disk SQLite token ledger.
What is implemented
Task 1:
get_customer_recordandtrigger_refundMCP tools with strict Pydantic schemas. The same server supports stdio and Streamable HTTP. Logging stays on stderr so stdio JSON-RPC is not corrupted.Task 2:
/mcpproxy parses JSON-RPC and bearer-token roles, forwardstools/listand ordinary calls unchanged, and intercepts unauthorizedadmin_*calls locally with JSON-RPC error-32001.Task 3:
/v1/chat/completions/streamparses OpenAI-compatible SSE JSON deltas and incrementally redacts email addresses, SSNs, and payment-card-like numbers—even across delta and network-chunk boundaries. A bounded overlap controls memory and latency.Task 4:
/v1/chat/completionsuses a transactional SQLite sliding-window token limiter (50,000/minute by default), a 3-second primary timeout, failover on timeout or HTTP 429, and sanitized error envelopes.
Related MCP server: fairlead
Run
python -m venv .venv
. .venv/bin/activate
pip install -e '.[dev]'
cp .env.example .env # export values with your preferred env loader
# Task 1, local MCP transport
customer-mcp
# Task 1, remote MCP transport
customer-mcp --transport streamable-http --port 8001
# Tasks 2-4 gateway
fde-gatewayInspect the MCP server with uv run mcp dev src/fde_assessment/mcp_server.py. Run the suite with pytest.
Security and production notes
The static environment-token mapping is intentionally compact for an assessment. In production, terminate TLS at a trusted proxy, validate JWT signature/issuer/audience, derive roles from signed claims, store secrets in a secret manager, and add audit logging without request bodies. The SQLite limiter is safe for concurrent workers on one host through WAL plus BEGIN IMMEDIATE; a multi-host deployment should use a shared transactional counter such as Redis.
Token reservations use an input estimate plus requested max_tokens, which is conservative and race-safe. A production implementation can reconcile the reservation with actual usage after a successful completion. The streaming guardrail intentionally uses bounded PII patterns: unbounded pattern matching and guaranteed low-latency emission are incompatible without a maximum match length.
Available Tools
2 toolsget_customer_recordA
Return a customer record for an ID formatted exactly as CUST-XXXXX.
Inputs: customer_id (required).
trigger_refundC
Trigger a refund after strictly validating the customer, amount, and reason.
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 have completely distinct purposes: retrieving a customer record versus triggering a refund. There is no overlap or ambiguity in their responsibilities.
Both tool names follow a consistent lowercase snake_case verb_noun pattern: get_customer_record and trigger_refund. This makes the naming predictable and easy to follow.
At only two tools, the server feels minimal but not absurdly sparse. The operations are focused, yet the count is on the thin side for a customer-related server.
The tool surface lacks basic customer lifecycle operations such as create, update, delete, or list. It only supports retrieval and a single financial action, which leaves significant gaps for typical customer management workflows.
Related MCP Connectors
A paid remote MCP for hosted MCP server, built to return verdicts, receipts, usage logs, and audit-r
Unified MCP server for 70+ eCommerce platforms: products, orders, customers, and more.
Managed MCP gateway with OAuth, per-agent permissions, shared accounts and activity logs.
Remote MCP utilities for agents: structured data, commerce checks, and x402 paid API discovery.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables customer support operations such as order lookup, store credit, refunds, and audit log review through an agent using safe, typed MCP tools.-
- FlicenseNot gradedqualityBmaintenanceAn MCP server that exposes customer record lookup and refund triggering over stdio, with a gateway layer for authorization, streaming PII redaction, rate limiting, and failover to a backup provider.-
- FlicenseNot gradedqualityCmaintenanceProvides MCP tools for retrieving customer records and processing refunds, with strict input validation, proper JSON-RPC error mapping, and enforced stdout protocol isolation.7 npm-
- FlicenseNot gradedqualityCmaintenanceEnables retrieving customer records and triggering validated refunds via JSON-RPC over stdio.-