TowerWatch Ops Agent MCP Server
Exposes network-monitoring tools (query metrics, analyze windows, compare, logs, status, runbooks, speed tests) as an MCP server for agentic workflows. Designed with evaluation suites, cost-aware model routing, and semantic tool retrieval.
README
TowerWatch Ops Agent
An agent layer over TowerWatch ā the network-quality monitoring project ā built to demonstrate the three capabilities an enterprise agent-engineering loop needs: evaluation suites, cost/latency-aware model choice, and tool retrieval. One repo, one coherent story:
"I took my public monitoring project and built the agent layer an enterprise would need around it: an instrumented MCP server with defined SLIs, an eval harness in CI that catches seeded regressions, a cost-aware model router, and semantic tool retrieval with measured selection precision."
At a glance
- Runtime: Python 3 + FastMCP, managed with uv.
- Domain: TowerWatch's network-monitoring data, exposed as agent tools.
- Transport: stdio first; stateless streamable HTTP as a stretch goal.
- Observability: OpenTelemetry from the first tool call, into a Prometheus/Grafana stack.
- Tool surface: seven tools ā
query_metrics,analyze_window,compare,query_log_events,get_monitor_status,get_runbook,run_speedtest. Contracts indocs/design/.- Status: š” Contracts locked, implementation not started ā requirements, tool contracts, and decisions are committed; no code yet. See Status.
Why this project
It fills the gap between "I read about agent evaluation and routing" and "I built and measured it." Every artifact ā eval tables, benchmark numbers, precision@k charts ā is a number personally collected, not a claim from study. The domain is real data from a project the author already owns, so the story is "I extended my own production-style system," not "I did a tutorial."
The build runs under the author's own Agent Collaboration Principles: every phase's definition-of-done is a set of independently checkable artifacts ā a command that runs, a file that exists, a dashboard that renders. No "trust me, it works."
The three phases
The project is one build in three strictly-sequenced phases. Full specs live in
docs/specs/; the build plan is the index.
Requirements were defined upfront in a planning process and built to as a contract ā
the specs came first, the tool contracts were derived from them, and the
ADRs record every decision that shaped the surface.
| Phase | Ships | Spec |
|---|---|---|
| 1 | Instrumented MCP server over TowerWatch data + defined SLIs + cross-model cost/latency bench | spec-phase1-mcp-server.md |
| 2 | Golden-set + rubric eval harness in CI that catches a seeded regression | spec-phase2-eval-harness.md |
| 3 | Cost-aware model router + semantic tool retrieval with measured selection precision | spec-phase3-router-and-retrieval.md |
| Cross-cutting | Agent-facing docs, in-repo skills, ADRs, and a measured onboarding eval ā incremental alongside the phases, never blocking | spec-ai-native-repo-layer.md |
Sequence is strict: Phase 2's evals score Phase 3's router. Don't reorder. The cross-cutting layer is the exception ā it lands incrementally and gates nothing.
Repository layout
towerwatch-ops-agent/
āāā README.md # this file ā human-facing
āāā CLAUDE.md # agent-facing anchor (read first if you're an agent)
āāā pyproject.toml # PEP 621 single source of truth ā deps, tooling config
āāā docs/
ā āāā architecture.md # intended shape (stub ā not built yet)
ā āāā specs/ # the governing build plan + 4 requirement specs
ā āāā design/ # locked tool contracts (00ā09) ā authoritative
ā āāā adr/ # architecture decision records
ā āāā production-path.md # personal-scale choices vs. enterprise needs
āāā src/towerwatch_ops_agent/ # package (marker only this pass)
āāā tests/ # pytest suite (marker only this pass)
Quick start
Nothing runs yet ā this is a scaffold. These are the intended mechanics once Phase 1 lands, recorded here so the toolchain is unambiguous.
# From repo root. uv manages the environment and lockfile.
uv sync # create .venv, install deps from pyproject.toml
uv run python -m towerwatch_ops_agent # (Phase 1) launch the MCP server over stdio
Testing the server interactively (Phase 1) uses the MCP Inspector:
npx @modelcontextprotocol/inspector uv run python -m towerwatch_ops_agent
Status
š” Contracts locked, implementation not started. Requirements, tool contracts, and decisions are complete and committed; no code has been written yet. Present:
- [x] Directory skeleton,
pyproject.toml,.gitignore, MIT license - [x] README,
CLAUDE.md(with binding invariants), architecture stub - [x] The build plan and all four requirement specs in
docs/specs/ - [x] Locked tool contracts ā
docs/design/00ā09: conventions, seven tool docs, skills interfaces, span schema - [x] Fixture manifest + eval design ā
10-fixture-manifest.md(curated-export model, provenance, frozen clock, answer key) and11-eval-design.md(positive-control pairing, answer-key timing) - [x] ADRs ā
docs/adr/, the decisions behind the tool surface - [x] PR template requesting verification receipts
Deferred (not yet built ā see CLAUDE.md for the phase gates):
- [ ] Phase 1 ā MCP server, tools, SLIs, cross-model bench
- [ ] Phase 2 ā eval harness + CI + seeded-regression showpiece
- [ ] Phase 3 ā model router + semantic tool retrieval
- [ ] Curated fixture corpus ā the deterministic data behind tests and evals
- [ ] In-repo skills under
.claude/skills/ādiagnose-rca,evidence-pack, plus the golden-path skills (add-tool,run-evals) created when first walked manually - [ ] Measured onboarding eval (
docs/onboarding-eval.md) ā first run after Phase 1 - [ ]
def_tokens.mdā the tool-def token budget measurement (lands with Phase 1) - [ ] CI workflow (
.github/workflows/) ā lands with Phase 1, when there's code to lint
For AI assistants
If you're an agent working in this repo, read CLAUDE.md first. It
carries the phase sequence, the stateless-gates working standard, and ā important while
the repo is a scaffold ā an explicit map of what exists versus what is still a stub, so
you don't reason about code that isn't there yet.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.