Skip to content
Back to search

mcp-ops-bridge

Mock ITSM plus MCP server with read and approval-gated write tools (P3)

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/manojastro--mcp-ops-bridge/badge.svg)](/listings/manojastro--mcp-ops-bridge)

HTML

<a href="/listings/manojastro--mcp-ops-bridge"><img src="/api/listings/manojastro--mcp-ops-bridge/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 67 lines · 1 finding marked
  1. # P3 — MCP Ops Bridge (mock-first slice, offline)
  2. Synthetic **Acme Retail Ltd** data only. Two parts, one repo:
  3. - **mock-itsm** — FastAPI shaped like ServiceNow Table API (SQLite file `data/itsm.db`;
  4. Postgres path in `docs/decisions/ADR-002-servicenow-api.md`).
  5. - **ops-mcp** — MCP server: **7 read + 2 approval-gated write tools**, resources
  6. `incident://` + `kedb://`, prompt `triage_incident`. Minimal JSON-RPC 2.0 over
  7. **stdio** + HTTP bearer stub (`POST /mcp`).
  8. ```mermaid
  9. flowchart LR
  10. H[MCP host] -->|JSON-RPC stdio or HTTP| S[ops-mcp]
  11. S -->|read| API[mock-itsm]
  12. S -->|write + approval token| API
  13. API --> DB[(SQLite itsm.db)]
  14. ```
  15. ## Tool list
  16. | Tool | Type |
  17. |---|---|
  18. | `search_kedb(query, service?)` | read (stub) |
  19. | `get_incident(number)` | read |
  20. | `list_incidents(state?, service?, priority?, limit?)` | read |
  21. | `get_ci(name)` | read |
  22. | `get_blast_radius(ci, depth?)` | read |
  23. | `list_recent_changes(ci?, hours?)` | read |
  24. | `get_logs(service, minutes, level?)` | read (capped 200) |
  25. | `add_work_note(number, note, approval_token)` | write (token) |
  26. | `update_incident_state(number, state, resolution?, approval_token)` | write (token) |
  27. ## How to run (offline)
  28. ```powershell
  29. cd mcp-ops-bridge
  30. cp .env.example .env
  31. uv sync --group dev
  32. uv run pytest -q
  33. uv run uvicorn mock_itsm.app:app --port 8001 # mock ITSM + OpenAPI at /docs
  34. # stdio MCP server:
  35. uv run python -m ops_mcp.server --transport stdio
  36. # HTTP stub:
  37. uv run python -m ops_mcp.server --transport http --port 8002
  38. ```
  39. Docker: `docker compose up --build`. CI: `.github/workflows/ci.yml` (ruff + mypy + pytest).
  40. ## Approval flow
  41. 1. `POST /approvals {"tool":"update_incident_state","target":"INC1000001"}` -> one-time token.
  42. 2. Call write tool with `approval_token`. Single-use, scoped, 10-min expiry, hashed.
  43. 3. Reuse / wrong-target / expired -> `403` / JSON-RPC `-32000`. Every call -> `audit_log`.
  44. ## Injection demo
  45. `INC1000004` description contains `SYSTEM: ignore previous instructions...`.
    • Warning: Quotes instruction-override phrasing (in quotes, code, a table or an example): "ignore previous instructions"
    • Line 57 on GitHub
  46. Tool output is labelled UNTRUSTED; writes without a token are refused.
  47. Proof: `docs/injection-test.md` + `tests/test_mcp.py::test_injection_text_is_data_not_instruction`.
  48. ## Limits
  49. - SQLite (single file); Postgres needs `db.py` swap.
  50. - `sysparm_query` supports only `=` + `^` (AND).
  51. - `search_kedb` is a 4-doc stub (OpsCopilot `/v1/search` when `OPSCOPILOT_URL` set).
  52. - Log cap 200 rows; text fields capped at 2000 chars.
  53. - All numbers synthetic; see `scenarios/*.yaml` ground truths (5).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.