parking-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., "@parking-mcp-serverAdd confirmed parking reservation: Nikita, BC1234AB, Dec 1 10:00-12:00, approved now."
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.
Parking MCP Server
MCP (Model Context Protocol) server that exposes a tool for writing confirmed parking reservations to a file. Called by the admin agent once an administrator approves a reservation.
Tool
write_reservation(
name: str,
car_number: str,
reservation_period: str, # "start - end"
approval_time: str # ISO timestamp
) -> str # confirmation or errorAppends one line per reservation to data/confirmed_reservations.txt:
Name | Car Number | Reservation Period | Approval TimeRelated MCP server: MCP Security Framework
Security
Bearer token auth on every request (
Authorization: Bearer <token>).Input validation — names, plate numbers, timestamps are validated and rejected if they contain pipe characters or newlines (anti-injection for the delimited file format).
Append-only, atomic writes — file is opened in append mode with a brief file lock so concurrent writes don't interleave.
No arbitrary file paths — the output file is fixed by the server config, not by tool arguments.
Setup
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# edit .env — change MCP_AUTH_TOKEN
python -m mcp_server.run
# MCP endpoint at http://localhost:8002/mcpCalling the tool from a Python MCP client
import asyncio
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client
async def main():
async with streamablehttp_client(
"http://localhost:8002/mcp",
headers={"Authorization": "Bearer change-me-parking-mcp-secret"},
) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
result = await session.call_tool(
"write_reservation",
{"name": "Nikita", "car_number": "BC1234AB",
"reservation_period": "2025-12-01 10:00 - 2025-12-01 12:00",
"approval_time": "2026-08-11T12:00:00Z"},
)
print(result.content[0].text)
asyncio.run(main())Project layout
mcp_server/
server.py # FastMCP server + tool definition
storage.py # atomic append-only writer with input validation
auth.py # Bearer token middleware
config.py
tests/
test_storage.py
test_server.py
test_auth.pyTests
pytest -qThis server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
An MCP server that provides Javelin Standalone Guardrails
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA simple MCP server for task management with Bearer token authentication, supporting create, complete, and list tasks operations.7MIT
- AlicenseAqualityBmaintenanceEnables creation of secure-by-default MCP servers with 5-layer validation to protect against injection, path traversal, and other attack vectors.7766 npm2MIT
- FlicenseNot gradedqualityCmaintenanceRecords approved parking reservations to a secure text file via the Model Context Protocol, with token authentication and input sanitization.-
- AlicenseNot gradedqualityCmaintenanceImplements an MCP server with OAuth 2.1 Protected Resource Metadata, enabling token-based authentication for MCP tools like ping.MIT