polypack-mcp
Provides persistent adaptive memory management with tools for storing, recalling, contextualizing, and consolidating memories, along with graph queries and feedback mechanisms.
README
polypack-mcp
An MCP server that exposes Polypack as persistent adaptive memory. MCP-specific tools live here; the database remains an independent dependency.
Install and run
The simplest installation is from PyPI:
python3 -m pip install 'polypack-mcp[polypack]'
For one MCP client, use the default stdio server configuration. For Claude and Codex sharing the same durable memory, install once and create a long-running user service:
polypack-mcp setup --store ~/.local/share/polypack-mcp
This starts an SSE server at http://127.0.0.1:8765/sse, restarts it after a
failure, and prints client configuration snippets. The setup command uses
systemd --user; on systems without systemd, start the server directly:
polypack-mcp --transport sse --port 8765 --store ~/.local/share/polypack-mcp
In shared SSE mode, configure both clients with the URL. Do not configure them
with a command and --store, since that starts two processes competing for
the same durable store.
Codex (~/.codex/config.toml):
[mcp_servers.polypack]
url = "http://127.0.0.1:8765/sse"
Claude Desktop:
{
"mcpServers": {
"polypack": { "url": "http://127.0.0.1:8765/sse" }
}
}
Debian package
The Debian package installs and starts a system-level polypack-mcp service
automatically. It runs as the dedicated polypack user, stores data in
/var/lib/polypack-mcp, and exposes the same local SSE endpoint:
sudo apt install ./polypack-mcp_<version>_amd64.deb
After installation, point Claude and Codex at
http://127.0.0.1:8765/sse. The default port can be changed in
/etc/default/polypack-mcp, followed by a service restart. The service can be
managed with:
sudo systemctl status polypack-mcp
sudo systemctl restart polypack-mcp
The PyPI installation remains user-managed and uses polypack-mcp setup to
create a per-user service instead.
Run manually
pip install -e '.[polypack]'
polypack-mcp --store ./polypack-data
The server exposes eight focused tools: memory_store, memory_recall,
memory_context, memory_feedback, memory_suppress, memory_supersede,
memory_consolidate, and graph_query. It also publishes context, active-memory,
schema, and stats resources under polypack://.
Retrieval tools return {items, metadata}. Metadata includes candidate and
excluded counts, context matches, score components, fallback behavior, the
retrieval version, and selection statistics. memory_context uses estimated
tokens (ceil(content characters / 4), minimum one) as its token_budget.
An item is never returned if it would exceed the remaining budget; budgets less
than or equal to zero are rejected. Context is a soft preference: matching
memories are preferred and unscoped global memories may be used as fallback.
Pass strict_context: true for isolation. An empty isolated result reports
reason: "no_context_match" and the searched context.
Feedback is activation feedback: useful=true reinforces a memory and
useful=false provides negative retrieval feedback. Responses expose activation
before and after plus whether learned weights changed. Supersession and
consolidation materialize SUPERSEDES, SUPERSEDED_BY, and
CONSOLIDATED_FROM graph edges.
Pass --store to open a durable Polypack directory. Without it, the server uses
the in-memory reference backend, which is convenient for smoke tests.
The polypack extra requires polypack-db>=3.2.0 and uses its native
ActivationEngine.working_memory selector for context assembly.
Development
pip install -e '.[dev]'
pytest
The test suite includes an MCP client/server protocol smoke test covering tool discovery, memory storage, recall, and resource reads.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。