Extracts infrastructure resources from ArgoCD configuration directories during repository analysis.
Extracts configuration, API endpoints, and infrastructure from Cloudflare Workers projects, including KV and Durable Object bindings.
Extracts type definitions and data structures from Dart source code for cross-repository knowledge mapping.
Identifies and extracts database models and relationships from Django projects.
Extracts database schema definitions and relationships from Drizzle ORM models.
Provides tools for inventorying and analyzing multiple repositories across a GitHub organization.
Scans Helm charts to extract Kubernetes manifest definitions and infrastructure resource mapping.
Extracts and maps infrastructure resources from Kubernetes manifests, covering deployments, services, and ingresses.
Extracts database models and relationships from Prisma schema files.
Extracts type definitions, data structures, and ORM models from Python source code.
Extracts type definitions, data structures, and service configurations from Rust source code.
Extracts database models and relationships from SQLAlchemy-based Python projects.
Scans and extracts infrastructure resources from Terraform files for cross-repository infrastructure analysis.
Analyzes monorepo workspace structures and extracts metadata from Turborepo-configured projects.
Extracts database models and relationships from TypeORM definitions.
Extracts type definitions, interfaces, Zod schemas, and user flows from TypeScript source code.
Extracts and analyzes data validation schemas defined using the Zod library within TypeScript projects.
Click on "Install 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., "@OrgBrain MCP Serverfind all definitions of the User interface across our repositories"
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.
OrgBrain MCP Server
A reusable Model Context Protocol (MCP) server that provides knowledge-extraction and cross-repo analysis tools for multi-repository organizations. Extract type definitions, user flows, service dependencies, infrastructure configs, and more — then query across your entire codebase.
Features
Org-wide analysis: Inventory and analyze many repos across an org; helper script to add all repos from a GitHub org.
Cross-repo type mapping: Extract data structures across languages (Rust, TypeScript, Python, Go, Dart) and find shared types between services.
Config-driven: Point the server to a YAML file of repos to analyze.
Pluggable extractors: Register new extractors in
src/extractors/and wire them via config.Version-aware tools: List refs, aggregate types, user flows, data flow, infra, and diagrams across repos.
Knowledge store: Versioned JSON under
knowledge/extracted/with manifests per repo/ref.Infra-aware: Kubernetes and Terraform extractors map infrastructure resources.
Journey-aware: Optional journey/impact extractor links journey docs to screens and services.
Ready for local dev (
pnpm dev) or compiled output (pnpm build && pnpm start).
Quickstart
Requirements: Node.js 18+ and pnpm. For org bootstrap: GitHub CLI ( authenticated.
Once config/repos.yaml exists:
The server reads MCP_CONFIG (defaults to config/repos.yaml).
Environment Variables
Variable | Default | Description |
|
| Path to configuration file |
Using from an MCP client
The server uses stdio transport — MCP clients spawn it as a subprocess.
Cursor
Add to .cursor/mcp.json in your project (or ~/.cursor/mcp.json globally):
Note: Run
pnpm buildfirst to generatedist/index.js. Use absolute paths.
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
MCP CLI
Configuration
Copy config/example.repos.yaml to config/repos.yaml and customize.
Global Settings
Repository Configuration
Extractor Configurations
type_definitions - Data Structures & Cross-Repo Contracts
Extracts structs, classes, interfaces, enums, and type aliases across multiple languages. Enables cross-repo type matching to identify shared data contracts between services.
Supported languages: Rust, TypeScript, Python, Go, Dart, Protobuf
Bonus detection:
Zod schemas (TypeScript)
ORM models: Django, SQLAlchemy, GORM, TypeORM, Drizzle, Prisma
Output includes:
Type definitions with fields, variants, generics
Relationships (extends, implements, contains, collection)
Module groupings for diagram generation
Summary statistics by kind/language
user_flows - UI Screens & Navigation
data_flow - Service Dependencies
monorepo - Workspace Structure
kubernetes - K8s Manifests
terraform - Infrastructure as Code
journey_impact - Documentation Mapping
nip_usage - Nostr NIP Detection
cloudflare_workers - Cloudflare Workers Projects
Extracts configuration, API endpoints, and infrastructure from Cloudflare Workers projects (Rust/WASM or JavaScript).
Output includes:
Worker name and routes (custom domains)
KV namespace bindings
Durable Object bindings and class names
Queue producers and consumers
API endpoints (extracted from Rust router patterns)
Rust dependencies from Cargo.toml
Compatibility date and build commands
Example Configurations
Backend API with Type Extraction
Frontend App
Turborepo Monorepo
Infrastructure Repo
Multi-Language Service (with Protobuf)
Cloudflare Worker (Rust/WASM)
CLI Commands
Knowledge Extraction
Adding Repos from GitHub Org
Extractor Auto-Selection
When using add:org-repos, extractors are auto-selected based on repo type:
Repo Type | Extractors |
Frontend |
|
Backend |
|
Infrastructure |
|
Unknown |
|
Use --extractors for full control over which extractors to enable.
Note: When you disable a repo in config, its extracted data remains until you run
--prune. The MCP server automatically filters out disabled repos from query results.
Tools
Tools are registered in src/index.ts from multiple modules:
Query Tools
list_repos- List repos with their latest extracted reflist_refs- List branches and tags for each repo (tags sorted by date, branches unsorted)query_nips- Aggregate NIP usage across reposquery_flows- Aggregate user flows/screensquery_monorepos- Aggregate monorepo structurequery_data_flow- Aggregate service dependenciesquery_infra- Aggregate Kubernetes and Terraform data
Type Analysis Tools
query_types- Search type definitions across repos by name, kind, or repoquery_shared_types- Find types that appear in multiple repos (identifies shared data contracts)query_type_relationships- Get type relationships within a repo (extends, contains, implements)generate_type_flow_diagram- Generate Mermaid diagram showing cross-repo type flow
Diagram Tools
generate_diagram- Generate Mermaid flowchart for repo or ecosystemgenerate_c4_diagram- Generate C4-style architecture diagrams (context, container, component, dynamic, deployment)detailed: true- Show ALL elements without truncation (default: false)export: true- Include export instructions for saving diagram to file
Extraction Tools
extract_ref- Extract a specific ref for a repoextract_all- Extract all enabled repos
Comparison Tools
compare_versions- List available versions for comparisondiff_versions- Compare extractors between refs
Org Management Tools
connect_org- Add repos from a GitHub orgdisconnect_repo- Remove a repo from configtoggle_repo- Enable/disable a repojob_status- Check extraction job status
Diagram Generation Example
Truncation limits (when
Element | Limit |
Endpoints | 8 |
Services | 5 |
Screens | 8 |
K8s Deployments | 5 |
Apps per repo (ecosystem) | 4 |
Use detailed: true to show ALL elements without limits.
Cross-Repo Type Analysis Example
On-Demand Extraction
The MCP client can trigger extraction directly without running the CLI:
Results are stored in knowledge/extracted/ and immediately available for queries. Cached data is returned if fresh (<24h) unless force: true.
Diff / Compare Versions
Use compare_versions to see available refs, then diff_versions to compare:
Returns:
Per-repo diffs: which extractors changed and what was added/removed
Aggregated ecosystem diff: types, screens, services, K8s resources across all repos
Mermaid diagram: visual representation of the diff
MCP Resources
The server exposes knowledge files as MCP Resources that clients can browse and read directly:
Resource URI | Description |
| Index of all available knowledge |
| Extracted data (e.g., |
| Static knowledge files (markdown, matrices) |
Example URIs:
Adding your own extractor
Create a file in
src/extractors/that exports anExtractorand callsregisterExtractor(see existing extractors as templates). ImplementcanExtract(lightweight file check) andextract(do the work, returnExtractionResult).Import your file in
src/extractors/index.tsso it registers at startup.Add the extractor to any repo in
config/repos.yamlunderrepositories.<name>.extractors, with optionalconfigpassed to your extractor.Run
pnpm build:knowledgeto generate knowledge; results appear underknowledge/extracted/<repo>/<ref>/your_extractor.json.
Keep extractors fast; use gitManager helpers for file listing/grep at refs, and limit file counts to avoid timeouts.
Project structure
Contributing / Extending
Add new tools in
src/tools/and register insrc/tools/index.ts.Add new extractors in
src/extractors/and import insrc/extractors/index.ts.For the type extractor, add new language parsers in
src/extractors/types/parsers/.Keep sample configs free of sensitive data.
License
MIT (see LICENSE).