mhmalvi

MCP Ops Server — Development skill for Claude Code

Development community

Custom MCP server (official Python SDK) giving Claude safe, typed access to an orders/customers/tickets DB: read-only queries, row limits, a token-confirmed guarded write, resources, a prompt and an a.

How to install MCP Ops Server

This entry records only its repository, not the path inside it, so there is no exact command to give. Open mhmalvi/mcp-ops-server and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What MCP Ops Server does

Custom MCP server (official Python SDK) giving Claude safe, typed access to an orders/customers/tickets DB: read-only queries, row limits, a token-confirmed guarded write, resources, a prompt and an audit log. Synthetic demo data.

Alternatives in Development

  • Spot — Place and manage spot trading orders on Binance via API key authentication, supporting mainnet and testnet 483 ★
  • Engage.Memory — Cross-engagement pattern memory — recall prior techniques, record confirmed findings, housekeeping 348 ★
  • Scribe — Scribe dispatcher — routes your request to project setup (init), OPORD/PRD, 2-page orders, or planning session 39 ★

README

mcp-ops-server

A custom [Model Context Protocol](https://modelcontextprotocol.io) server that gives Claude **safe, typed access to a business database**: customers, orders and support tickets. Claude can look things up freely, but it can only change data through one guarded tool that needs a preview, the user's approval and a confirmation token.

Built on the official `mcp` Python SDK (v2, `MCPServer`, formerly FastMCP). Ships with a SQLite demo database whose data is **entirely synthetic** (invented names, `.example` email domains).

![Claude Code driving the server](docs/claude-code-session.png)

The business problem

Support and ops teams want to ask an AI assistant "what's the most urgent open ticket and what did this customer order?" without copying data around, and without handing the model a raw SQL connection. The usual answers are bad: a free-form SQL tool (one prompt injection away from `DELETE`), or a pile of untyped endpoints with no audit trail. This server is a small, reviewable template for the safe version:

Concern How this server handles it
Model writes bad or malicious SQL No SQL tool. Fixed, parameterized queries only; group_by and sort orders come from whitelists.
A read tool is tricked into writing Reads open SQLite with mode=ro and PRAGMA query_only, so a write raises.
Huge result sets flood the context Every list takes limit (1-100, schema-enforced) and returns truncated: true when more rows exist.
Bad arguments Typed parameters (ints with ranges, enums, ISO dates, string lengths) validated by pydantic before any query runs.
The model changes data on its own update_ticket_status is two-step: preview first (nothing written), then confirm=true plus the preview's confirmation_token. The token is a fingerprint of the change and the ticket's last update, so a stale or invented token is rejected.
Illegal state changes Ticket status is a state machine (closed is final), re