项目工件增强存储协议(兼容MCP)
概览
为你的AI代理提供一个始终更新、可查询的任何代码库内存——带和——在一个npx命令中。 🎯 - 按path_glob、标签、语言过滤以获得精确结果 🔄 - BM25 + 矢量融合,支持倒易秩混合(默认启用) 🧠 - Transformers.js 精度提升的重排序器 👀 - 带有类似默克尔哈希的实时增量索引 📦 - 可重复使用搜索范围,支持CLI + MCP集成 🛠️ - --项目和--目录别名以求清晰 🏆 - 与通用集成开发环境工具的架构比较
概述(AI 翻译)
版本1.12.x****语义搜索 ·MCP兼容****Node.js
给你的 AI 代理一个始终更新、可查询的代码库内存——通过智能语义搜索和自动学习——只需一个 npx 命令。
🇪🇸 西班牙语版本 |🇺🇸英文版🤖代理版
🌟 v1.12 新增内容 - 高级搜索与多项目支持
🎯 范围搜索筛选 - 通过path_glob、tags、lang筛选以获得精确结果
🔄 混合搜索 - BM25 + 向量融合,带有互易秩混合(默认启用)
🧠 交叉编码器重新排名器 - Transformers.js精度提升的重新排序器
👀 文件观察器 - 实时增量索引,类似默克尔哈希
📦 上下文包 - 可重复使用搜索范围,集成CLI+MCP
🛠️ 多项目CLI - --project 和 [--directory 别名以求清晰
🏆 性能分析 - 与通用集成环境集成环境工具的架构比较
重大改进:
- **增量更新时索引速度快40%
- 混合搜索+重排序器提升60%精度
- **3倍快的多项目操作,带有显式路径
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
PAMPA – Protocol for Augmented Memory of Project Artifacts
Version 1.12.x · Semantic Search · MCP Compatible · Node.js
Give your AI agents an always-updated, queryable memory of any codebase – with intelligent semantic search and automatic learning – in one npx command.
🇪🇸 Versión en Español | 🇺🇸 English Version | 🤖 Agent Version
🌟 What’s New in v1.12 - Advanced Search & Multi-Project Support
🎯 Scoped Search Filters - Filter by path_glob, tags, lang for precise results
🔄 Hybrid Search - BM25 + Vector fusion with reciprocal rank blending (enabled by default)
🧠 Cross-Encoder Re-Ranker - Transformers.js reranker for precision boosts
👀 File Watcher - Real-time incremental indexing with Merkle-like hashing
📦 Context Packs - Reusable search scopes with CLI + MCP integration
🛠️ Multi-Project CLI - --project and --directory aliases for clarity
🏆 Performance Analysis - Architectural comparison with general-purpose IDE tools
Major improvements:
- 40% faster indexing with incremental updates
- 60% better precision with hybrid search + reranker
- 3x faster multi-project operations with explicit paths
- 90% reduction in duplicate function creation with symbol boost
- Specialized architecture for semantic code search
🌟 Why PAMPA?
Large language model agents can read thousands of tokens, but projects easily reach millions of characters. Without an intelligent retrieval layer, agents:
- Recreate functions that already exist
- Misname APIs (newUser vs. createUser)
- Waste tokens loading repetitive code (
vendor/,node_modules/…) - Fail when the repository grows
PAMPA solves this by turning your repository into a semantic code memory graph:
- Chunking – Each function/class becomes an atomic chunk
- Semantic Tagging – Automatic extraction of semantic tags from code context
- Embedding – Enhanced chunks are vectorized with advanced embedding models
- Learning – System learns from successful searches and caches intentions
- Indexing – Vectors + semantic metadata live in local SQLite
- Codemap – A lightweight
pampa.codemap.jsoncommits to git so context follows the repo - Serving – An MCP server exposes intelligent search and retrieval tools
安装
npx -y pampa mcp配置
{
"mcpServers": {
"pampa": {
"command": "npx",
"args": ["-y", "pampa", "mcp"]
}
}
}