A reproducible Proof of Concept demonstrating a remote Model Context Protocol server written in Go, Cline as the MCP client, and PostgreSQL persistence for order-management tools running in Kubernetes.
This repository is an educational playground. It is not a production-ready order-management platform.
The playground exposes five MCP tools:
list_ordersget_ordercreate_orderupdate_orderdelete_order
Each order contains an order_id, client_id, decimal amount, and address_delivery. Data is persisted in PostgreSQL.
Cline connects to the Go MCP server through Streamable HTTP at http://127.0.0.1:8080/mcp. The language model is configured independently in Cline; the current setup uses the hosted deepseek/deepseek-v4-flash model.
The Go server does not call the language model itself. This separation keeps MCP tools deterministic and allows the model or MCP client to be replaced independently.
| Component | Purpose |
|---|---|
| Cline | Open-source VS Code agent, LLM host, and MCP client |
| DeepSeek V4 Flash | Hosted language model selected in Cline |
| Go MCP server | Defines and executes order tools |
| PostgreSQL | Durable order storage |
| Kubernetes | Runs and connects all server-side components |
| Kind | Recommended local Kubernetes environment |
This playground demonstrates how an LLM host can discover and invoke typed business tools without giving the model direct database access.
- Docker Desktop
kindkubectl- Go 1.25 or newer for local validation
- VS Code with the Cline extension
make deployThis creates a Kind cluster, builds the Go image locally, loads it into Kind, and applies the Kubernetes manifests.
Keep this command running in a separate terminal:
kubectl -n mcp-orders port-forward service/orders-mcp 8080:8080In Cline's model selector, choose:
Model: deepseek/deepseek-v4-flash
The model is currently marked FREE in Cline. Model availability and quotas may change over time.
Open MCP Servers in Cline, choose Configure MCP Servers, and add:
{
"mcpServers": {
"orders": {
"type": "streamableHttp",
"url": "http://127.0.0.1:8080/mcp",
"disabled": false,
"autoApprove": ["list_orders", "get_order"]
}
}
}Read-only tools are auto-approved. Create, update, and delete operations intentionally require interactive approval.
Try these prompts in Cline:
Create an order for client C-1007, amount 49.90, delivered to 10 Rue de Rivoli, 75001 Paris.
Cline creates an order through the create_order MCP tool.
List the latest orders and show their IDs.
Cline retrieves persisted orders through the list_orders MCP tool.
Change order <ORDER_ID> to amount 59.90 and delivery address 20 Avenue de France, 75013 Paris.
Cline updates an existing order through the update_order MCP tool.
Delete order <ORDER_ID>.
Cline deletes the order with explicit confirmation and verifies that it is no longer present.
The delete tool requires confirm=true. Cline should request explicit confirmation before invoking it.
kubectl -n mcp-orders get pods,pvc,services,jobs
curl -fsS http://127.0.0.1:8080/healthzInspect persisted records:
kubectl -n mcp-orders exec statefulset/postgres -- \
psql -U orders -d orders -c \
'SELECT order_id, client_id, amount, address_delivery, created_at FROM orders ORDER BY created_at DESC;'- The LLM never receives PostgreSQL credentials.
- SQL statements are parameterized through
pgx. - Amounts are stored as
NUMERIC(12,2), not floating-point values. - Write tools include clear confirmation-oriented descriptions.
delete_orderrejects calls unlessconfirm=true.- Only read-only tools are included in Cline's
autoApprovelist.
The included database credential is deliberately a local demonstration value. Replace it before using the manifests in any shared environment.
make validatePreserve persistent volumes:
make cleanupDelete persistent data as well:
DELETE_PVCS=true make cleanupDelete the complete Kind cluster:
kind delete cluster --name mcp-orders- How Cline connects to a remote MCP server
- How Streamable HTTP differs from a local STDIO MCP server
- How to define strongly typed MCP tools in Go
- How to isolate LLM inference from deterministic business operations
- How to persist tool state in PostgreSQL
- How to apply approval boundaries to destructive tools
- Model Context Protocol documentation
- Official MCP Go SDK
- Cline MCP documentation
- PostgreSQL documentation
- Kubernetes documentation
- Kind documentation
OpenMind Systems Lab is an independent French non-profit association dedicated to research, experimental development and technical benchmarking in Cloud Native technologies.
Our mission is to produce practical, reproducible and educational Open Source Proofs of Concept covering Kubernetes, Platform Engineering, Distributed Messaging, Infrastructure Security and Artificial Intelligence.
GitHub Organization:
https://github.com/openmind-systems-lab
Made with β€οΈ by OpenMind Systems Lab





