# Madar [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/mohanagy/madar  
**GitHub Stars:** 21  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/madar

## Description
Task-aware local context packs for TypeScript/Node AI coding workflows.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/mohanagy/madar), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
npm install -g @lubab/madar
```

2. Add to your MCP client:

```sh
madar claude install --profile strict
```

## Documentation

## What Madar does

Madar gives coding agents targeted access to source code in a local JavaScript or TypeScript repository. It indexes files, declarations, imports, calls, framework metadata, and selected documentation into a repository graph. Agents can request functions by workspace-relative file and case-sensitive symbol, then inspect returned source excerpts and any reported omissions.

The primary MCP workflow is intended for source investigation. It is useful when an agent knows which functions matter and needs bounded source evidence rather than an entire repository dump. Madar also supports experimental query-based discovery for questions about authentication, endpoint behavior, report generation, or possible change impact. Discovery results can include verified source dependencies and static graph relationships, but they do not establish runtime behavior or complete task coverage.

## How it works

Madar selects evidence from its local graph using either exact targets or experimental query matching. Exact requests support up to eight JavaScript or TypeScript targets and operate in explain mode. A target identifies a file and symbol; it selects a function, not a complete workflow, and does not infer every call made by that function.

Call-site inspection is available by adding a scan request for a callee. Madar checks the caller and returns a uniquely bound local implementation when the binding is verifiable. Identifier and static dotted calls are supported, while dynamic expressions and nested-closure calls are excluded.

Large functions are returned in budgeted pages. The context_expand tool follows continuation handles to retrieve omitted lines without repetition. Related evidence can use expandable handles, and source changes or exclusions can invalidate handles. Responses expose omissions, freshness, advisory coverage, and source references so the agent can decide whether more evidence is needed.

## Setup and configuration

Install Node.js 20 or newer, then install the package globally:

```bash
npm install -g @lubab/madar
```

Run commands from the repository you want to inspect. `madar try` builds or reuses the local graph and prints an experimental source preview without modifying project source. For direct CLI use, `madar generate .`, `madar summary`, and `madar pack` create or inspect context. The `madar prompt` command creates a provider-specific prompt, while `madar handoff` creates a share-safe handoff for another coding tool.

Agent installers are available for Claude Code, Codex CLI, Cursor, GitHub Copilot, and Gemini CLI. After installation, `madar doctor` and `madar status` help check the setup. Rerun the relevant installer after upgrading to refresh its managed profile.

## Tools and capabilities

- `context_pack` for exact source lookup and experimental discovery.
- `context_expand` for following source-continuation and related-evidence handles.
- Local graph indexing for JavaScript and TypeScript source relationships.
- Budgeted responses with omission, freshness, and source-location metadata.
- CLI generation of context packs, prompts, summaries, and handoffs.
- `.madarignore` support for excluding generated output.

## Limitations and notes

Madar is not a runtime tracer, hosted knowledge base, pull-request reviewer, or vulnerability scanner. Direct source reads may be preferable for small repositories or straightforward questions. Experimental discovery, architecture investigation, review, and impact analysis can omit necessary evidence and may require follow-up reads.

The graph follows source policy: root or workspace `package.json` files up to 128 KiB and JavaScript/TypeScript files under `lib/` are eligible, while other JSON configuration files are not source evidence. Stale graphs should be regenerated. Ordinary security source remains indexable, but credentials and other sensitive files should be handled according to the repository's exclusion configuration. Madar itself does not require an API key; the connected coding agent may still send prompts or selected context to its configured model provider.

_Full upstream README: https://allmcps.com/mcp/madar/readme_

