Skip to main content

Cross-Codebase Context

Context

Frontend teams often need to reference backend APIs and data models. Tools like Cursor can infer this automatically, but they must grep, read, and analyze large portions of the backend repo every time — which increases token usage, latency, and cost.

What Scout Code Does

Scout Code indexes your backend repo and exposes it as an MCP server. Cursor (or any MCP client) can then query structured repo context instantly, without re-reading source files.

Example

Backend (fruit-service)
# models.py
class Fruit(BaseModel):
    id: int
    name: str
    color: str

# routes/fruit.py
@app.get("/fruits")
def get_all_fruits():
    return [
        {"id": 1, "name": "Apple", "color": "Red"},
        {"id": 2, "name": "Banana", "color": "Yellow"},
    ]
Developer prompt in Cursor:
Create a frontend function to call /fruits API and display all fruits in a table.

Without Scout Code

Preparing to read the codebase...
Grepping for "fruits" in routes/
Reading lines 1–120 from routes/fruit.py
Found reference to "Fruit" model
Reading lines 10–60 from models/fruit.py
Parsing OpenAPI specs...
Building combined response schema...
Token usage: ~56K Latency: ~12s

With Scout Code MCP

Querying MCP: scout-code://fruit-service
Request: describe endpoint "/fruits"
Response: model Fruit(id, name, color)
Using schema from MCP context
Generated React code
Token usage: ~33K Latency: ~2s

Resulting Frontend

import axios from "axios";

interface Fruit { id: number; name: string; color: string; }

export async function getFruits(): Promise<Fruit[]> {
  const res = await axios.get("/api/fruits");
  return res.data;
}

Summary

AspectWithout Scout CodeWith Scout Code
Repo ReadingFull code scanSingle MCP query
Token Usage~56K~33K
Latency~12s~2s
CostHighLower
Scout Code converts your codebase into a queryable context source — reducing tokens, improving speed, and enabling context-aware responses across repos.

Web Context