Agentsbestfriend

io.github.TheRealFloatDev由 GitHub 账号 TheRealFloatDev 发布v0.12.0更新于 Oct 24, 2026

MCP that provides fast, token-efficient tools for navigating, searching, and understanding codebases

已验证STDIO仅桌面知识与记忆开发者工具

概览

AI 生成的概览

一个本地 MCP 服务器,为编码助手提供节省 token 的工具,用于搜索、浏览和分析项目代码库。

可以做什么
AgentsBestFriend 将项目索引到本地 SQLite 数据库,并提供代码搜索(精确、关键词或语义)、符号与代码块提取、项目概览、导入图、影响面与爆炸半径分析、相关测试排序、TypeScript 诊断、定义/悬停查询、调用图以及 git log/blame/diff 等工具。它还提供只读的变更预览与重构规划工具,以及一个可选的原子写入工具。可选的 Ollama 集成可生成 LLM 文件摘要与嵌入向量。
适用场景
当助手在大型代码库中反复重读文件或盲目搜索,而你希望获得关于符号、依赖和变更影响的紧凑结构化答案时,它很有用。最适合 TypeScript/JavaScript 项目,对 Python 提供基于正则的支持。
运行要求
通过 stdio 在本地运行,通常使用 npx agentsbestfriend start 或全局 npm 安装。需要 Node.js 20 或更高版本、ripgrep 和 git。Ollama 为可选项,用于摘要和语义搜索。环境变量 ABF_PROJECT_ROOT 用于指定项目根目录,未设置时默认为当前工作目录。
安装前请注意
该服务器会将项目文件索引到本地 .abf/index.db,并可能将 .abf/ 加入 .gitignore。写入工具 abf_apply_edit 默认禁用,除非设置 ABF_ENABLE_WRITES=1;启用后它会修改文件,因此应先审查建议的编辑。若使用 Ollama,文件内容会发送到 ~/.abf/config.json 中配置的本地 Ollama 端点。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Agentsbestfriend,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

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

ToolWhat it does
abf_searchCode search — exact (ripgrep), keyword-ranked, or semantic (embedding-based)
abf_search_multiRun multiple search queries (exact/keyword/semantic) in one call with weighted score merging
abf_symbolsFunctions, classes, exports in a file (AST-based for TS/JS, regex for Python)
abf_chunkSmart file chunk by symbol name, chunk index, or file overview
abf_project_overviewTech stack, folder structure, key dependencies at a glance
abf_dependenciesImport graph — who imports what
abf_impactFind all usages of a symbol across the project
abf_impact_typedAST-aware (ts-morph) impact analysis with classified references (definition/call/import/type_ref/jsx) and confidence levels
abf_blast_radiusBFS over reverse-import graph for a file with risk scoring (low/medium/high)
abf_related_testsHeuristically rank test files most likely to cover a file or symbol
abf_preview_changesRead-only preview: diff + symbol/import deltas + risk flags + external usage probe (no writes)
abf_refactor_planRead-only ordered edit plan for rename/move/extract/split with collision detection
abf_apply_editWrite tool — atomic file write with sha256 hash check (disabled unless ABF_ENABLE_WRITES=1)
abf_diagnosticsTypeScript diagnostics (errors/warnings) for one file or all tracked TS/JS files
abf_definitionGoto-definition via the TypeScript language service — file, line range, and source preview
abf_hoverType signature + JSDoc for an identifier (IDE-style hover)
abf_call_graphTransitive callers/callees of a function or method (TS/JS, ts-morph)
abf_gitGit log, blame, diff (recent/staged/unstaged)
abf_file_summaryFull-text search across LLM-generated file summaries (FTS5, OR/AND mode)
abf_conventionsDetected naming, structure, and formatting conventions
abf_indexIndex status, rebuild, incremental update, or trigger re-summarization
abf_pingHealth check — returns version and project root

Install

bash
npm install -g agentsbestfriend

Prerequisites

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

Quick Start

bash
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):

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

Cursor (.cursor/mcp.json):

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

Claude Desktop (claude_desktop_config.json):

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 agentsabf skill [path]      Install or update the ABF workflow skill for your coding agentsabf index [path]      Re-index a project (incremental by default)abf status [path]     Show index statsabf config            Interactive configuration editorabf 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.

TableContents
filesPaths, hashes, languages, line counts, LLM summaries
symbolsFunctions, classes, interfaces, types (AST-extracted)
importsDependency edges between files
embeddingsFloat32 vectors for semantic search (chunked for large files)
file_chunksSmart chunks aligned to symbol boundaries
files_ftsFTS5 full-text index over summaries

Optional: LLM Enrichment

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

bash
ollama pull qwen2.5-coder:1.5b    # file summariesollama 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.

json
{  "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:

ModulePurpose
@abf/core/dbDrizzle ORM + SQLite (WAL, FTS5)
@abf/core/configZod-validated config
@abf/core/searchripgrep, keyword scorer, semantic (cosine similarity)
@abf/core/analysists-morph AST, conventions detector, project overview
@abf/core/indexergit ls-files discovery, incremental pipeline, file watcher
@abf/core/llmOllama client, summary & chunked embedding pipelines
@abf/core/gitGit CLI wrapper

Development

bash
# Install dependenciespnpm install
# Build all packagespnpm build
# Watch modepnpm dev
# Type-checkpnpm type-check

Links

License

MIT

来源:README.md,提交 f44860a

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.12.0最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。