DEV Community

AboJad
AboJad

Posted on • Originally published at github.com

I built an MCP server that shows your AI agent which files matter — before it breaks something

My AI agent broke a billing function last month.

It wasn't wrong about the code. It just didn't know that file touched payments. It had no way to know.

That's the problem I built context-ops-mcp to fix.


What the agent was doing wrong

When I'd ask Claude or Cursor to make a change, the agent would either:

  • Read every file (wasting my entire context window), or
  • Guess which files were relevant and sometimes guess wrong

There was no middle ground. No structured view of the repo that said: these files are risky, these are entry points, these are probably what you need for this task.


What context-ops-mcp does

It's a local Model Context Protocol (MCP) server. You point it at your project, and your agent gets 6 tools instantly:

get_project_structure — Full repo map, skipping noise (node_modules, .git, dist)

get_risky_files — Flags auth, DB, env, and payment logic before the agent touches it

get_relevant_files_for_task — You describe a task, it ranks which files actually matter

get_entry_points — Finds wiring files, HTTP handlers, bootstrap points

get_semantic_summary — Surface-level exports and functions from every .ts file

get_likely_config_files — All config, CI, env, and build files by naming convention

No cloud sync. No account. No indexer. Just npx and stdio.


Install in 30 seconds

npx context-ops-mcp
Enter fullscreen mode Exit fullscreen mode

Or add to your Claude MCP config:

{
  "mcpServers": {
    "context-ops": {
      "command": "npx",
      "args": ["-y", "context-ops-mcp"],
      "cwd": "/path/to/your/project"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

What it's not

I want to be honest about this:

  • It's heuristic-based — pattern matching, not a full AST
  • It only reads the first 50 lines per file for semantic checks
  • It's TypeScript-first — other languages get minimal treatment
  • It does not replace tests, code review, or IDE intelligence

It's a navigation layer. The agent still does the work — it just knows where to look first.


Why I built it as an MCP server

MCP is the right abstraction for this. It plugs into Claude Code, Cursor, Windsurf, and Cline without any custom integration. You configure it once and every agent that supports MCP gets the tools automatically.

The alternative was building a one-off plugin per tool. That's a maintenance nightmare.


Try it

If you use it and hit something broken or missing, open an issue. This is an MVP and I'm actively building on it.

Top comments (0)