Licensing Hardening MCP 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.
Harden the local-authority licensing assistant's MCP server
Local authority — licensing team. The assistant answers questions about taxi and premises licences — "is licence 9003 active, and what did the last inspection say?" — so officers don't dig through the case system by hand. This MCP server is how it reaches the licensing database. A colleague "improved" it before they left; it works, it demos cleanly, and it carries every native MCP weakness from this afternoon. Work through it on your own.
Get it running
Plain Python — no Docker, no Git.
pip install -r requirements.txt
python seed.py # builds licensing.db (includes a planted inspection note)See the attacks land before you fix anything:
python exploit.py # SQL injection + over-exposure of home addresses / DBS status
python poisoning_demo.py # a tool whose DESCRIPTION carries hidden instructionsRelated MCP server: Vulnerable MCP Server
Your task
Harden server.py so the native attacks fail while legitimate use still works.
Work through them in this order:
Result injection —
read_inspection_notehands raw note text back to the model. Return it labelled as untrusted data, and rely on a system-prompt rule that labelled data is content, never command. (Licensee 3's note is an instruction to suspend a licence — the note-reader andsuspend_licence, each harmless, compose into a suspension.)Tool poisoning —
format_reference's description contains hidden instructions. Review every description; a server you do not trust should not reach the model's context. Neutralise it.Confused deputy —
suspend_licenceis state-changing and unscoped. Put it behind a scope check, and reject any bearer token whoseaudis not this server (the Week 5 discipline).Inherited — parameterise
find_licenseeand return only the columns the assistant needs (neverhome_address,dbs_status, orinspection_notes).Audit — append every tool call to a log.
You are done when poisoning_demo.py finds nothing in your descriptions and
exploit.py's payloads are rejected, while a normal find_licensee("Aisha") still
returns a result.
Stretch
Add a real
audcheck: decode the presented token and refuse a foreign audience.With two servers connected to one host, how would a malicious second server reach this one's
suspend_licence? Write down the control that stops it.
Files
File | Contents |
| The vulnerable MCP server — the thing you harden. |
| Builds |
| Proves the inherited flaw (SQL injection + over-exposure). |
| Prints the model-facing descriptions; flags the poisoned one. |
|
|
Questions worth asking yourself
Which of your fixes are MCP-specific, and which are ordinary secure coding?
A description you did not write reached your model. Whose job is it to have caught that — the server author, the host, or the person who approved it?
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
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
Experimental MCP server for current empirical verification of explicit public HTTPS endpoint claims.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA deliberately vulnerable MCP server that allows clients to interact with a database for educational purposes, demonstrating security vulnerabilities including SQL injection, arbitrary code execution, and sensitive data exposure.4-
- FlicenseNot gradedqualityDmaintenanceAn educational MCP server demonstrating common security vulnerabilities like command injection, path traversal, SQL injection, and XXE attacks. Designed for security training purposes only, not for production use.-
- FlicenseNot gradedqualityDmaintenanceA deliberately insecure MCP server designed as a pentest lab to demonstrate common vulnerabilities in MCP deployments.-
- FlicenseNot gradedqualityDmaintenanceA vulnerable MCP server designed for educational CTF challenges. It demonstrates various MCP security vulnerabilities in a controlled environment.8-