Логотип Graphify-ts

Graphify-ts

Спільнота
mohanagy

Stop AI coding agents from rediscovering large TypeScript/Node repos with task-aware local context packs.

Видавецьmohanagy
Репозиторійmadar
МоваTypeScript
Форки
8
Зірки
19
Доступні інструменти
0
Тип транспортуstdio
Категорії
ЛіцензіяMIT
Посилання
  • Підключайте інструменти до робочих процесів із ШІ

    Graphify-ts надає можливості MCP, які можуть використовувати сумісні клієнтські ШІ-застосунки та агенти.

  • Доступні інструменти: 0

    Перегляньте нижче дії, які можна викликати, з назвами й описами, якщо сервер їх надає.

  • Готова конфігурація для копіювання

    Скористайтеся прикладами конфігурації, щоб налаштувати цей сервер у вибраному клієнті MCP.

  • Показники інтересу до відкритого коду

    Зірки: 19, форки: 8 — у пов’язаному репозиторії.

Madar

Give your coding agent the repo context it needs before it starts searching.

Madar builds a local graph of your TypeScript or Node.js repository and turns the current question into a small, task-aware context pack. Claude Code, Codex, Cursor, Copilot, Gemini, Aider, and OpenCode can start from relevant files, symbols, snippets, and relationships instead of rediscovering the repository from scratch.

  • Start smaller: give the agent likely entrypoints and runtime paths before broad search.
  • Stay local: graph generation does not upload your source code or require a cloud service.
  • Stay current: installed MCP profiles refresh the graph as the active workspace changes.

npm node >=20 local first license MIT

Try It in 60 Seconds

Install Madar with Node.js 20 or newer, then run it inside your repository:

bash
npm install -g @lubab/madar
cd your-repository
madar try "how does authentication work?"

madar try builds or reuses the local graph, prints a human-readable first result, and recommends the next agent-install command. It does not modify your source code.

For a concrete example, Madar's included password-reset workspace contains this path:

text
account-routes.ts
  -> PasswordResetService.requestPasswordReset()
  -> userRepository.saveResetToken()
  -> enqueueResetEmailJob()
  -> sendPasswordResetEmail()

That is the kind of focused starting path Madar gives an agent before it decides whether any additional file inspection is necessary.

Connect Your Agent

Choose the agent you use. For Claude Code:

bash
madar claude install
madar doctor
madar status

After installing a profile, run madar doctor and madar status. The agent can then ask Madar for context when you use normal prompts such as:

text
How does authentication work?
Why does this endpoint return 403?
Where is the report generated?
What breaks if I change this service?
Add telemetry to this flow.

Madar supports these project-local installers:

AgentInstall command
Claude Codemadar claude install
Codex CLImadar codex install
Cursormadar cursor install
GitHub Copilotmadar copilot install
Gemini CLImadar gemini install
Aidermadar aider install
OpenCodemadar opencode install

Installer details are in the CLI and MCP reference. Step-by-step setup and smoke tests are in the agent quickstarts.

After upgrading Madar, rerun your agent's install command to refresh its managed profile. Older profiles may lack automatic refresh or Codex's longer startup window.

Codex installs create a workspace-scoped MCP block with longer startup and tool timeouts. Madar stays available during initial reconciliation; graph-backed calls become available once the graph is ready.

Starting with 0.31.3, a graph-backed call made while Madar is starting, pending, or reconciling returns a structured retryable response. The agent should retry the same Madar request after the suggested delay instead of bypassing Madar or running generation manually. A dead refresh owner is recovered automatically; only failed, incomplete, or policy-mismatched graph states ask for repair.

What Changes for the Agent

Without Madar, a coding agent often begins with broad filename searches, repeated reads, and guesses about which route, service, or handler owns the task.

With Madar, the first pass can include:

  • likely files, exported symbols, routes, and handlers
  • direct snippets relevant to the question
  • imports, calls, framework roles, and runtime handoffs
  • a static runtime-path hypothesis when the graph supports one, not a live execution trace
  • graph freshness and indexing-completeness signals
  • explicit guidance to answer, answer with a caveat, or verify a focused target

Madar does not replace your agent or prevent it from reading code. It gives the agent a smaller, repo-grounded place to start.

How It Works

text
Your repository
      |
      v
Local Madar graph
      |
      v
Context for the current question
      |
      v
Claude, Codex, Cursor, or another coding agent
  1. Madar indexes source files, symbols, imports, calls, routes, handlers, framework metadata, and selected documentation.
  2. A question selects a bounded context pack rather than dumping the whole repository into the prompt.
  3. The response reports evidence strength, coverage, freshness, and whether focused verification is still needed.
  4. Installed MCP profiles watch the active workspace and refresh graph-backed context after relevant changes.

The full response contract, including bounded recovery and answerability states, is documented in MCP response shape.

Use Madar Without MCP

The CLI can generate and inspect context without installing an agent integration:

bash
madar generate .
madar summary
madar pack "how does auth work?" --task explain --format text

By default, madar generate . combines SPI metadata with proven legacy semantics for JavaScript/TypeScript, and uses legacy fallback for other supported languages. Strict modes are in the CLI reference.

Create a provider-ready prompt:

bash
madar prompt "how does auth work?" --provider claude

Create a share-safe handoff for another coding tool:

bash
madar handoff "add auth telemetry" --task implement --consumer copilot

Generated graphs and indexing manifests stay in the project output location. See the getting-started tutorial for a reproducible sample workspace and expected output.

Where Madar Fits

Madar is most useful when:

  • your repository is medium or large
  • the project is primarily TypeScript or Node.js
  • agents keep reopening the same files or searching unrelated folders
  • you ask architecture, runtime-flow, review, or impact questions
  • token usage, latency, or local repo privacy matter

It helps less when:

  • the repository is small or the task is obvious from one file
  • the question depends on live runtime behavior that static analysis cannot observe
  • the code relies heavily on dynamic patterns that are absent from the graph
  • the graph is stale or relevant source files could not be indexed

Madar complements agents and IDE indexing. It is not a hosted knowledge base, runtime tracer, PR reviewer, or vulnerability scanner.

Local by Design

  • Privacy: Madar graph generation runs locally and does not require an API key. Your coding agent may still send prompts or selected file context to its own model provider, depending on that agent's configuration.
  • Sensitive files: ordinary security source code remains indexable, while private keys, .env*, credential stores, and known non-source secret material are excluded. This is a path policy, not a content-level secret scanner.
  • Freshness: installed MCP profiles use automatic refresh. Manual CLI users can regenerate with madar generate .; strict workflows can require --require-fresh-context or --require-fresh-graph.
  • Worktrees: run Madar and the agent from the same linked Git worktree. Each worktree receives isolated graph artifacts outside the checkout; reconnect the MCP server after switching worktrees.
  • Telemetry: Telemetry is disabled unless you explicitly enable it. Controls and the exact source-safe event schema are documented in telemetry.

Treat every local MCP install, hook, or agent profile as part of your local trust boundary. The MCP threat model documents the boundary in detail.

Evidence and Limits

Madar publishes the prompts, answers, traces, and share-safe reports behind its benchmark statements. Two public experiment types answer different questions and should not be compared as if they were the same test.

Controlled v0.30 evidence

Six June TypeScript runtime-flow trials used a source checkout with task-specific proof profiles. In those controlled runs, Madar was invoked once per row and the recorded results showed:

  • 3.5x to 18.5x fewer tool calls
  • 2.2x to 15.6x less provider-reported input
  • 1.65x to 7.09x lower latency

Those receipts are real measurements of profile-assisted Madar. They demonstrate what the workflow can achieve when the correct task evidence is available. They are not evidence that an untuned npm installation will reproduce the same result for arbitrary questions, because the old prompts and checkout retrieval contained benchmark-specific obligations unavailable to normal package users.

v0.31 production-artifact validation

The July reruns removed that assistance and used the same isolated, unpacked @lubab/madar@0.31.0 package artifact. Four of six repositories recorded an agent-adoption failure: no attributable Madar MCP call occurred. The other two invoked Madar but failed strict prompt or answer gates. The correct result is zero valid performance comparisons, not six product losses. These reruns expose adoption and answer-completeness work; they neither confirm nor refute the earlier controlled efficiency measurements.

Read the benchmark suite and all dated receipts or the shorter claims and evidence map.

Current Release

Current version: 0.32.1.

0.32.1 keeps automatic refresh recoverable when Git removes a file during a watched rebuild, and reports a healthy single-client setup without requiring optional agent integrations.

0.31.4 keeps receipts tied to visible context and hardens Claude/Codex hook handling.

0.31.3 recovers dead refresh owners, waits through live refresh contention, and returns a retry signal during temporary reconciliation instead of pushing agents to bypass Madar.

0.31.2 keeps the Codex MCP connection responsive while its initial automatic graph refresh runs, adds an explicit 180-second Codex startup window, and keeps graph-backed answers unavailable until the refreshed graph is ready.

0.31.1 rebuilt the public onboarding path and clarified what each benchmark experiment proves. Runtime behavior was unchanged from 0.31.0.

0.31.0 made code graphs directed by default, separated evidence strength from answer readiness, added bounded context recovery, made indexing completeness explicit, preserved generation policy during automatic refresh, isolated linked-worktree artifacts, and removed benchmark expectations from production retrieval.

Read the full notes in the 0.32.1 changelog.

Documentation

NeedStart here
First runGetting started
Agent setupAgent quickstarts
CLI and MCP toolsCLI and MCP reference
Context packsContext-pack concepts
Freshness and automatic refreshAuto-refresh policy
Indexing coverageIndexing completeness
Privacy and MCP trustThreat model
Evidence and benchmarksClaims and evidence
RoadmapPublic roadmap
Release historyChangelog

Contributing

The most useful contributions right now are tests on real TypeScript and Node.js repositories, missed-context reports, Windows/WSL/MCP reliability improvements, framework detection, and clearer setup examples.

Open issues or pull requests against the next branch. Before opening a PR, run:

bash
npm test
npm run build
npm run release:verify

See the full contributor graph on GitHub contributors.

Contributors

Thanks to everyone shaping Madar. The list below is regenerated automatically on every push to main.

Special thanks to @jamemackson for #54, the first community-contributed feature in Madar.

License

MIT. Use it, fork it, ship it.

Використовуйте MCP Graphify-ts з різними моделями ШІ

TypingMind підключає інструменти MCP на рівні робочого простору, тож після підключення Graphify-ts ви можете використовувати їх із різними моделями ШІ в TypingMind, а не налаштовувати окремо для кожної моделі. Ця інтеграція MCP працює локально через конектор MCP TypingMind на вашому пристрої.

Інструкція з налаштування локального конектора

Виберіть цей варіант, якщо серверу MCP потрібен доступ до локальних файлів, програм або приватних ресурсів на вашому комп’ютері.

1

Відкрийте налаштування MCP

У TypingMind перейдіть до розділу «Налаштування», відкрийте «Розширені налаштування», потім «Протокол контексту моделі» й виберіть «Параметри конектора».

  1. Відкрийте TypingMind у браузері.
  2. Натисніть значок налаштувань.
  3. Перейдіть до розділу «Розширені налаштування».
  4. Відкрийте розділ «Протокол контексту моделі».
  5. Натисніть «Параметри конектора» й виберіть «Цей пристрій».
Екран налаштування конектора MCP у TypingMind з вибраним варіантом «Цей пристрій»
2

Виконайте команду конектора

Виберіть «Цей пристрій», скопіюйте команду з TypingMind і виконайте її в терміналі. Не зупиняйте процес, поки користуєтеся MCP.

  1. Скопіюйте команду налаштування, показану в TypingMind.
  2. Відкрийте «Термінал» у macOS або Windows Terminal у Windows.
  3. Вставте й виконайте команду.
  4. Підтвердьте встановлення пакета, якщо термінал запитає дозволу продовжити.
  5. Не закривайте вікно термінала й не зупиняйте процес, поки користуєтеся інструментами MCP.
3

Додайте Graphify-ts як сервер

Коли статус конектора зміниться на «Готово», натисніть «Змінити сервери» та вставте конфігурацію сервера MCP.

  1. Зачекайте, доки статус конектора зміниться на «Готово».
  2. Натисніть «Змінити сервери».
  3. Вставте конфігурацію сервера MCP Graphify-ts.
  4. Збережіть список серверів.
  5. Оновіть дані, щоб переконатися, що конектор досі готовий до роботи.
Налаштування MCP у TypingMind з активним сервером і кнопкою «Змінити сервери»
{
  "mcpServers": {
    "madar": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Використовуйте підключення з різними моделями

Збережіть список серверів, відкрийте «Плагіни», увімкніть інструменти MCP для Graphify-ts, а потім виберіть будь-яку підтримувану модель ШІ в TypingMind і використовуйте інструменти в чаті або призначте їх агенту ШІ.

  1. Відкрийте сторінку «Плагіни» в TypingMind.
  2. Увімкніть інструменти MCP для Graphify-ts.
  3. Почніть чат і виберіть модель ШІ, яку хочете використовувати.
  4. Використовуйте інструменти MCP у чаті або призначте їх агенту ШІ.
  5. За потреби перемикайтеся на іншу модель ШІ без повторного підключення MCP.
Чат TypingMind із використанням увімкнених інструментів MCP і вибраної моделі ШІ
Допоможете з цим завданням через Graphify-ts?
Graphify-ts
Звісно. Я це прочитав.
Ось що я знайшов за допомогою Graphify-ts.

Поширені запитання

Для чого використовується сервер MCP Graphify-ts?

Graphify-ts — це сервер MCP, який дає змогу сумісним клієнтам ШІ підключатися до зовнішніх інструментів і контексту. У TypingMind ви можете додати цей сервер MCP один раз і зробити його інструменти доступними у своєму робочому просторі ШІ.

Чи можу я використовувати MCP Graphify-ts з кількома моделями ШІ в TypingMind?

Так. TypingMind підключає інструменти MCP на рівні робочого простору, тому ви можете використовувати Graphify-ts з різними моделями ШІ, як-от Claude, ChatGPT, Gemini або іншими моделями, які ви налаштували в TypingMind, без окремого налаштування сервера MCP для кожної моделі.

Навіщо використовувати MCP Graphify-ts із TypingMind?

TypingMind — один із найкращих інтерфейсів для чату з великими мовними моделями, адже він об’єднує різні моделі ШІ, промпти, плагіни, агентів ШІ, ключі API та інструменти MCP в одному робочому просторі. Підключивши Graphify-ts, ви зможете використовувати його інструменти MCP з вибраними моделями та впорядковано працювати з чатами в TypingMind.

Як підключити MCP Graphify-ts до TypingMind?

Graphify-ts працює через локальний конектор MCP TypingMind. Це найкращий варіант, коли серверу MCP потрібен доступ до локальних файлів, настільних застосунків, інструментів командного рядка або приватних ресурсів на вашому комп’ютері.

Які інструменти надає MCP Graphify-ts у TypingMind?

Graphify-ts надає можливості MCP, які можна ввімкнути на сторінці «Плагіни» в TypingMind і використовувати в чаті або призначати агентам ШІ.

Чи потрібно передавати свої ключі API в TypingMind, щоб використовувати MCP Graphify-ts?

Ні. TypingMind орієнтований насамперед на локальну роботу й дає змогу зберігати контроль над постачальниками моделей, ключами API, промптами та конфігурацією MCP. Якщо Graphify-ts потребує автентифікації, під час створення підключення додайте потрібні заголовки, налаштування OAuth або локальну конфігурацію для цього сервера MCP.

Схожі сервери MCP

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇