OpsMCP
The OpsMCP server exposes eight typed MCP tools for AI agents to safely operate GitHub, Postgres, deploy status, and a sandboxed local filesystem.\n\n- GitHub operations: list issues/PRs, create issues (dry-run by default), and summarize PR diffs (without patches).\n- Postgres read-only access: run parameterized SELECT queries and EXPLAIN plans, with DDL/DML/multi-statement SQL rejected before connecting.\n- Deploy status: fetch the latest GitHub Actions workflow run for a branch.\n- Sandboxed filesystem: search for literal substrings and read files under allowlisted roots, with symlink/.. escape protection and a size limit.\n- Safety-first design: credentials stay in the server process, tool inputs treated as untrusted, and all outbound HTTP rate-limited.\n- Run locally: via uv run python -m ops_mcp with config via .env, and a companion UI for catalog/setup/playground.
Provides tools for interacting with GitHub's API, enabling listing issues and pull requests, creating issues (with dry-run by default), and summarizing pull request diffs for repository management.
Provides a tool to retrieve the latest workflow run status for a branch, allowing monitoring of deployment and CI/CD status from GitHub Actions.
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., "@OpsMCP check deploy status for main branch"
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.
OpsMCP
MCP (Model Context Protocol) server that exposes eight typed tools so an AI agent can operate GitHub, Postgres, deploy status, and a sandboxed local filesystem. Credentials stay in the server process; tool inputs are treated as untrusted.
Live: https://tanmays0.github.io/ops-mcp/
GitHub: https://github.com/tanmays0/ops-mcp
Artifact | Location |
MCP server (stdio) |
|
Eight tools | registered in |
Companion UI |
|
Seeded demo database |
|
Automated tests |
|
CI | GitHub Actions workflow |
Pages deploy |
|
Container image |
|
Agent wiring example |
|
Architecture
Agent (stdio) → FastMCP server
├── tools/ domain tools
├── security/ path sandbox, SQL allowlist, redaction, rate limit
├── adapters/ GitHub HTTP, Postgres
└── config.py Pydantic Settings (env / .env)Related MCP server: Sandbox MCP
Tools
Tool | System | Behavior |
| GitHub API | List issues/PRs by repo, state, labels |
| GitHub API | Create issue; default |
| GitHub API | PR file list and diff stats (no patches) |
| Postgres | Parameterized SELECT only |
| Postgres |
|
| GitHub Actions | Latest workflow run for a branch |
| Local FS | Literal search under allowlisted roots |
| Local FS | Read file with sandbox and size limit |
Safety
Control | Implementation |
Filesystem | Resolve-then-compare allowlist after symlink resolution |
SQL | sqlglot AST: single SELECT / WITH…SELECT; DDL/DML/multi-statement rejected before connect |
GitHub writes |
|
Secrets |
|
Outbound HTTP | Token-bucket rate limit |
Stack
Python 3.12 · FastMCP · httpx · psycopg · sqlglot · Pydantic Settings · pytest · Docker
Run
git clone https://github.com/tanmays0/ops-mcp.git
cd ops-mcp
uv sync
docker compose up -d
cp .env.example .env
uv run pytest
uv run python -m ops_mcpPopulate .env from .env.example (OPS_MCP_FS_ROOTS, OPS_MCP_DATABASE_URL, OPS_MCP_GITHUB_TOKEN). MCP client config: copy .cursor/mcp.json.example to .cursor/mcp.json with absolute paths. Secrets load from .env only (.env and .cursor/mcp.json are gitignored).
Configuration
Variable | Purpose |
| Colon-separated allowlisted directories |
| Max bytes for |
| Postgres DSN |
| GitHub fine-grained or classic PAT |
| Outbound API rate |
| Log level |
Verification flows
Documented end-to-end flows: DEMO.md.
Spec
Project principles: .specify/memory/constitution.md
Requirements: specs/001-ops-mcp-server/spec.md
Available Tools
8 toolsdeploy_statusDeploy StatusB
Latest GitHub Actions workflow run for a branch (read-only).
Inputs: repo (required), owner (required), branch. Returns: object
fs_read_fileFs Read FileA
Read a file under allowlisted roots with a hard size limit.
Symlink and .. escapes fail closed. Content is UTF-8 decoded with
replacement characters; truncated is true when the file exceeded the cap.
Inputs: path (required), max_bytes. Returns: object
fs_searchFs SearchA
Search allowlisted filesystem roots for a literal substring.
Returns matches only under OPS_MCP_FS_ROOTS. Paths that escape the
sandbox (including via .. or symlinks) are rejected.
Inputs: query (required), root, max_results. Returns: object
github_create_issueGithub Create IssueA
Create a GitHub issue. Defaults to dry_run=True (no remote write).
Set dry_run=False only when the user explicitly confirms creation.
Never returns credentials.
Inputs: repo (required), owner (required), title (required), body, +2 more. Returns: object
github_list_issuesGithub List IssuesA
List GitHub issues/PRs for a repo by state and labels.
Requires OPS_MCP_GITHUB_TOKEN. Returns number, title, state, labels.
Inputs: repo (required), owner (required), state, labels, +1 more. Returns: object
github_pr_diff_summaryGithub Pr Diff SummaryC
Summarize a PR's changed files and diff stats without full patches.
Inputs: repo (required), owner (required), pull_number (required). Returns: object
postgres_explainPostgres ExplainA
EXPLAIN (FORMAT TEXT) a SELECT without ANALYZE / executing side effects.
Inputs: sql (required), params. Returns: object
postgres_query_readonlyPostgres Query ReadonlyA
Run a parameterized SELECT against Postgres (DDL/DML rejected first).
Requires OPS_MCP_DATABASE_URL. Multi-statement and write SQL fail closed
before any connection is opened.
Inputs: sql (required), params, max_rows. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct resource and action: filesystem search/read, GitHub issues/PR summary, Postgres query/explain, and deployment status. Even the PR-related tools are clearly separated by list vs. diff-summary purpose.
Names use consistent resource prefixes (fs_, github_, postgres_, deploy_) and many follow verb_noun, but github_pr_diff_summary and deploy_status are noun phrases without a verb, and postgres_query_readonly mixes verb/noun with an adjective. The pattern is readable but not uniform.
Eight tools is a reasonable, focused set for an ops-oriented server spanning filesystem inspection, GitHub workflows, and read-only Postgres access. Each tool has a clear purpose and none feel redundant or superfluous.
The tool surface covers the main read-only investigation workflows: file lookup, GitHub issue triage and PR diff summaries, Postgres querying/explaining, and deployment status. Minor gaps exist such as no directory listing, no GitHub PR list endpoint, and no database schema introspection, but agents can work around these.
Maintenance
Related MCP Connectors
Run AI agent tasks in isolated sandboxes with a cost cap, saved workflows and scoped connections.
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Context and control for any AI. Agent identity, scoped access, and proof across tools.
Deterministic runtime safety for AI agents: scan PII, gate tool actions, verify LLM output.
Related MCP Servers
- AlicenseAqualityDmaintenanceConnects AI assistants to GitHub repositories, pull requests, issues, commits, and code search while enabling repository visibility controls, CI/CD monitoring, sandboxed local filesystem access, and code quality/security analysis.131MIT
- AlicenseAqualityBmaintenanceEnables AI coding agents to safely execute commands, run tests, and modify project files inside disposable, policy-enforced Docker sandboxes that are isolated from the host machine and its credentials.15MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to investigate incidents by safely querying PostgreSQL, triaging GitHub issues, retrieving ERP order data, and sending Slack alerts, with AST-validated SQL and human-in-the-loop safeguards.-
- AlicenseNot gradedqualityCmaintenanceEnables AI coding assistants to inspect local and remote repositories through sandboxed tools that surface project overviews, structure, dependency audits, Git churn hotspots, and a heuristic health score. It also supports safe GitHub issue searching and creation with built-in duplicate preflight checks, while blocking sensitive files, binary content, and path traversal attacks.22 npmMIT