Skip to main content
Glama
code-intel
by ADolkun

stack-intel

Static analysis of a FastAPI backend and its TypeScript frontend, served to coding agents over MCP.

It answers the questions general code search cannot:

  • which FastAPI dependencies guard a route, and which routes a dependency reaches;

  • which backend handler a frontend API call hits, and which calls a handler has;

  • where a React component is rendered;

  • which definition a same-name symbol means;

  • which docs describe a file, route or symbol, and whether they still match the code;

  • which routes and dependencies installed libraries add (a fastapi-users router, current_user(...)), through a committed capture of the running app.

The same analyses check the docs and the agent instruction files against the code in CI (stack-intel doc-check), check themselves against the source and against the running app (verify, runtime-check), and report their own counts (summary).

Every repository-specific fact (the backend package and app, the frontend root, how the frontend calls the API, which docs to check) comes from one config file in the analyzed repository, .stack-intel/config.toml. Nothing else is assumed.

Contents: Install · Quickstart · Requirements · Documentation · License

Install

The package is stack-intel on PyPI. To try it, or to use it across repositories:

uv tool install stack-intel             # the stack-intel command, on PATH
uvx stack-intel@<version> <command>     # one run, nothing installed

A repository that uses it pins the version in one file, .stack-intel/requirements.txt, so every caller runs the same release:

stack-intel==<version>

Every caller (the MCP client, CI, a git hook) then uses the same launcher from the repository root:

uv run --no-project --python 3.14 --with-requirements .stack-intel/requirements.txt stack-intel <command>

The frontend analysis installs the TypeScript it needs into a user cache on first use; stack-intel setup does it ahead of time, for CI. Pinning a commit that is not yet released, the MCP server's environment and the other details are in Install.

Related MCP server: codegraph

Quickstart

1. Write the config

.stack-intel/config.toml configures any of [backend], [frontend], [docs] and [agents], and needs at least one. Each tool answers for the tables the config has. Every path is relative to the repository root.

A full stack, with a FastAPI backend, a TypeScript frontend that calls it through an axios instance, and docs:

[backend]
root = "backend"                       # import root: the directory holding the package
package = "app"
app = "app.main:app"
lock = "backend/uv.lock"

[frontend]
root = "frontend"
tsconfig = "frontend/tsconfig.app.json"

[[frontend.clients]]
kind = "instance"                      # api.get(url), api.post(url, …), …
module = "frontend/src/lib/api.ts"
export = "api"
base_path = "/api"

[docs]
scope = ["README.md", "docs/**/*.md"]
route_prefixes = ["/api"]

A backend-only API service:

[backend]
root = "."
package = "app"
app = "app.main:app"

[docs]
scope = ["README.md", "docs/**/*.md"]

Docs only, which needs neither Node nor TypeScript:

[docs]
scope = ["README.md", "docs/**/*.md"]

Every key, the other API client kinds, frontend pages, docs rules and ignore entries, and the [agents] table are in Configuration.

2. Check the config

stack-intel config-check

It prints ok: <path> and the configured tables, or an error that names the key and the file.

3. Check the docs

stack-intel doc-check

Every link and anchor must resolve, every repository path, backend route and code symbol a doc names must still exist, and every package.json script, make target and mise task it runs must be defined. The agent instruction files Claude Code and GitHub Copilot load are checked too, with or without [docs]. Each finding is one path:line: message line; the exit code is 0 with no findings, 1 with findings and 2 when the check could not run or is incomplete. Run it on every pull request. What it checks and how to fix a finding: Docs check.

4. Register the MCP server

In the repository's .mcp.json:

{
  "mcpServers": {
    "stack-intel": {
      "command": "git",
      "args": [
        "-c",
        "alias.stack-intel-mcp=!exec uv run --no-project --python 3.14 --with-requirements .stack-intel/requirements.txt stack-intel mcp",
        "stack-intel-mcp"
      ]
    }
  }
}

The git alias starts the server from the top level of the work tree, wherever the client was started. The tools are di_deps, di_reverse, route_match, route_unmatched, jsx_usage, symbol_resolve, doc_refs, status and refresh; see Tools. After changing the pin, restart the server in your client.

Requirements

  • macOS or Linux. Windows is not supported.

  • Python 3.14 and uv. The backend analysis needs an interpreter at least as new as the backend's.

  • git on PATH: only files git sees (tracked, or untracked and not ignored) count, so a local run gives CI's verdict.

  • Node.js 18 or newer and TypeScript 7.1 or newer for the frontend analysis only. TypeScript is installed on first use into a cache shared by every checkout. A config without [frontend] never needs either.

The details, and what keeps working without Node or TypeScript: Requirements.

Documentation

The full reference lives in docs/:

Page

Covers

Install

Requirements, pinning, the launcher, the MCP client entry, the TypeScript install, environment variables, worktrees

Commands

Every command, its options and exit codes

Configuration

.stack-intel/config.toml table by table, and partial configs

Tools

The MCP tools and the response contract: error codes, diagnostic and limitation kinds

Docs check

Reference kinds, statuses, rules, ignore entries and the agent instruction files

Analysis notes

How the analyses work, the library capture, freshness and the restart rule, performance

Verification

verify, summary, runtime-check, and the tests and oracles

Development

Working on stack-intel, CI and releases

Changes are listed in the changelog.

License

MIT, see LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      A local MCP server that gives AI coding agents symbol definitions, dependency graphs, and a live architecture vocabulary for TypeScript/JavaScript repos, with no network or embeddings.
      16 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Compiler-exact TypeScript code graph MCP server exposing find-references, change impact analysis, and repo map tools for AI agents, powered by the TypeScript compiler via ts-morph.
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Provides coding agents with searchable codebase context through an MCP server, enabling hybrid BM25 and semantic search, symbol graph navigation, and dependency mapping over an incrementally maintained repository index.
      398 PyPI
      108
      Apache 2.0