Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
TheRealFloatDev avatar

Agentsbestfriend

  • Updated April 22, 2026
  • TheRealFloatDev/AgentsBestFriend

Agents Best Friend is a MCP server that provides fast, token-efficient tools for navigating, searching, and understanding local codebases.

About

Agents Best Friend is an MCP server built for developers who want their AI assistant to understand large codebases without burning tokens on naive full-file dumps. It exposes fast, token-efficient tools for navigating directories, searching symbols and text, and building situational awareness before the agent edits code. developers adopting Claude Code or Cursor on monorepos or inherited projects benefit most: you set ABF_PROJECT_ROOT to the repo root, run the npm package with the documented start command, and let the model call structured exploration tools instead of improvised grep loops. The server targets the Build phase agent-tooling facet—complementary to your IDE, Git, and test runner—not a hosted SaaS indexer. Complexity is intermediate because you must trust local filesystem access and keep the project root accurate when switching branches or worktrees. Published metadata emphasizes speed and efficiency for agent-driven refactors, onboarding to unfamiliar modules, and scoping features before you invoke heavier analysis or review skills elsewhere in Skillselion.

  • npm package agentsbestfriend (manifest lists 0.7.3 server, 0.7.2 package) with start positional arg
  • Token-efficient navigation, search, and codebase understanding tools for MCP hosts
  • ABF_PROJECT_ROOT env var scopes the server to a project directory (defaults to cwd)
  • Stdio transport suited to local Claude Code and Cursor workflows
  • GitHub source AgentsBestFriend by TheRealFloatDev

Agentsbestfriend by the numbers

  • Data as of Jul 7, 2026 (Skillselion catalog sync)
terminal
claude mcp add --env ABF_PROJECT_ROOT=YOUR_ABF_PROJECT_ROOT agentsbestfriend -- npx -y agentsbestfriend start

Add your badge

Show developers this MCP server is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Packageagentsbestfriend
TransportSTDIO
AuthNone
Last updatedApril 22, 2026
RepositoryTheRealFloatDev/AgentsBestFriend

What it does

Give your coding agent fast, low-token tools to explore, search, and map an unfamiliar repo without flooding the context window.

Who is it for?

Best when you're on medium or large local repos and want structured codebase exploration inside Claude Code, Cursor, or Codex.

Skip if: Pure greenfield single-file scripts with no structure, or teams that already rely on a remote enterprise code search appliance only.

What you get

After you connect Agents Best Friend with ABF_PROJECT_ROOT set, your agent can explore the tree through MCP tools and ship changes with tighter, cheaper context use.

  • Running stdio MCP server scoped to your project directory
  • Agent-callable navigation and search tools over the local tree
  • Lower-token codebase understanding sessions during implementation

By the numbers

  • Server schema version 0.7.3 with npm package version 0.7.2
  • One documented environment variable ABF_PROJECT_ROOT
  • Stdio transport with positional package argument start
README.md

AgentsBestFriend (abf)

Give your AI coding agents superpowers — a local MCP server for fast, token-efficient code navigation, search & analysis.

Works with VS Code Copilot, Cursor, Claude Code/Desktop, Codex, Cline, Zed, Gemini CLI, Goose, OpenCode, and any other MCP-compatible agent.


Why?

AI coding agents waste tokens re-reading files and searching blindly. ABF gives them purpose-built tools that return exactly what they need — in compact, structured responses that preserve context.

Tools

Tool What it does
abf_search Code search — exact (ripgrep), keyword-ranked, or semantic (embedding-based)
abf_search_multi Run multiple search queries (exact/keyword/semantic) in one call with weighted score merging
abf_symbols Functions, classes, exports in a file (AST-based for TS/JS, regex for Python)
abf_chunk Smart file chunk by symbol name, chunk index, or file overview
abf_project_overview Tech stack, folder structure, key dependencies at a glance
abf_dependencies Import graph — who imports what
abf_impact Find all usages of a symbol across the project
abf_impact_typed AST-aware (ts-morph) impact analysis with classified references (definition/call/import/type_ref/jsx) and confidence levels
abf_blast_radius BFS over reverse-import graph for a file with risk scoring (low/medium/high)
abf_related_tests Heuristically rank test files most likely to cover a file or symbol
abf_preview_changes Read-only preview: diff + symbol/import deltas + risk flags + external usage probe (no writes)
abf_refactor_plan Read-only ordered edit plan for rename/move/extract/split with collision detection
abf_apply_edit Write tool — atomic file write with sha256 hash check (disabled unless ABF_ENABLE_WRITES=1)
abf_diagnostics TypeScript diagnostics (errors/warnings) for one file or all tracked TS/JS files
abf_definition Goto-definition via the TypeScript language service — file, line range, and source preview
abf_hover Type signature + JSDoc for an identifier (IDE-style hover)
abf_call_graph Transitive callers/callees of a function or method (TS/JS, ts-morph)
abf_git Git log, blame, diff (recent/staged/unstaged)
abf_file_summary Full-text search across LLM-generated file summaries (FTS5, OR/AND mode)
abf_conventions Detected naming, structure, and formatting conventions
abf_index Index status, rebuild, incremental update, or trigger re-summarization
abf_ping Health check — returns version and project root

Install

npm install -g agentsbestfriend

Prerequisites

  • Node.js ≥ 20
  • ripgrepbrew install ripgrep (macOS) / apt install ripgrep (Linux)
  • git
  • Ollama (optional) — for summaries & semantic search: ollama.com

Quick Start

abf init

abf init walks you through everything:

  1. Indexes your project — discovers and indexes all files via git ls-files
  2. Generates LLM summaries & embeddings (if Ollama is running) — with live (12/80) progress
  3. Adds .abf/ to .gitignore — prompts before writing
  4. Installs ABF as an MCP server for your agents — you pick which agents (Cursor, VS Code, Claude Code, etc.) and whether to use npx agentsbestfriend start (always latest) or abf start (local install)

Manual Agent Setup

If you prefer to configure manually, add ABF as a stdio MCP server. Using npx is recommended — it always runs the latest published version without requiring a global install:

VS Code / GitHub Copilot (.vscode/mcp.json):

{
  "servers": {
    "abf": {
      "command": "npx",
      "args": ["agentsbestfriend", "start"]
    }
  }
}

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "abf": {
      "command": "npx",
      "args": ["agentsbestfriend", "start"]
    }
  }
}

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "abf": {
      "command": "npx",
      "args": ["agentsbestfriend", "start"]
    }
  }
}

Set ABF_PROJECT_ROOT in the env block if the agent does not pass its working directory automatically.

CLI Commands

abf start             Start MCP server in stdio mode (used by agents)
abf init [path]       Index project, set up .gitignore entry, install MCP for agents
abf skill [path]      Install or update the ABF workflow skill for your coding agents
abf index [path]      Re-index a project (incremental by default)
abf status [path]     Show index stats
abf config            Interactive configuration editor
abf doctor            Health checks (Node, ripgrep, git, Ollama)
abf portal            Interactive TUI dashboard

How It Works

ABF maintains a lightweight SQLite index (.abf/index.db) inside each project root. The index is built once and updated incrementally — only changed files are re-processed. A file watcher keeps it current as you edit.

Table Contents
files Paths, hashes, languages, line counts, LLM summaries
symbols Functions, classes, interfaces, types (AST-extracted)
imports Dependency edges between files
embeddings Float32 vectors for semantic search (chunked for large files)
file_chunks Smart chunks aligned to symbol boundaries
files_fts FTS5 full-text index over summaries

Optional: LLM Enrichment

With Ollama running locally, ABF generates file summaries and embeddings:

ollama pull qwen2.5-coder:1.5b    # file summaries
ollama pull nomic-embed-text       # embeddings / semantic search

Both abf init and abf portal → Re-index show live progress:

◆  Generating LLM summaries... (14/80)
◆  Generating embeddings... (28/80)

Large files are automatically split into chunks for embedding — no context-length errors.

Without Ollama, all tools still work normally. Semantic search falls back to keyword mode.

Configuration

Global config at ~/.abf/config.json. Edit interactively with abf config or via abf portal.

{
  "llm": {
    "provider": "ollama",
    "ollama": {
      "baseUrl": "http://localhost:11434",
      "summaryModel": "qwen2.5-coder:1.5b",
      "embeddingModel": "nomic-embed-text"
    }
  },
  "indexing": {
    "autoWatch": true,
    "respectGitignore": true,
    "maxFileSizeKb": 512,
    "excludedPatterns": ["*.min.js", "*.min.css", "*.map", "*.lock"]
  },
  "search": {
    "defaultMaxResults": 20
  }
}

Architecture

AgentsBestFriend/
├── packages/
│   ├── core/     Shared logic — DB, config, search, analysis, indexer, LLM
│   ├── server/   MCP server (11 tools)
│   └── cli/      Commander.js CLI + TUI portal
├── turbo.json
└── package.json

Built with Turborepo + pnpm workspaces. Core modules:

Module Purpose
@abf/core/db Drizzle ORM + SQLite (WAL, FTS5)
@abf/core/config Zod-validated config
@abf/core/search ripgrep, keyword scorer, semantic (cosine similarity)
@abf/core/analysis ts-morph AST, conventions detector, project overview
@abf/core/indexer git ls-files discovery, incremental pipeline, file watcher
@abf/core/llm Ollama client, summary & chunked embedding pipelines
@abf/core/git Git CLI wrapper

Development

# Install dependencies
pnpm install

# Build all packages
pnpm build

# Watch mode
pnpm dev

# Type-check
pnpm type-check

Links

License

MIT

Recommended MCP Servers

How it compares

Local codebase navigation MCP, not a cloud IDE plugin or a documentation-writing skill.

FAQ

Who is agentsbestfriend for?

It is for developers and agent users who need dependable repo navigation from MCP without paying token costs of unstructured file reads.

When should I use agentsbestfriend?

Use it at the start of Build tasks when the model must locate modules, trace dependencies, or search patterns before editing unfamiliar code.

How do I add agentsbestfriend to my agent?

Install the npm package agentsbestfriend, configure stdio MCP with positional start, set ABF_PROJECT_ROOT to your repo root if needed, and reload your MCP host.

Developer Toolsintegrationsgit

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.