Context7
Up-to-date docs for AI agents
作者提供的说明(英文原文)
Token-light local memory with SQLite hybrid retrieval for MCP agents.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"tinycontext": {
"command": "uvx",
"args": [
"tinysuite-context"
]
}
}
}在终端中运行这条命令
claude mcp add tinycontext -- uvx tinysuite-context粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"tinycontext": {
"command": "uvx",
"args": [
"tinysuite-context"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"tinycontext": {
"type": "stdio",
"command": "uvx",
"args": [
"tinysuite-context"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日
注册名称已通过 GitHub 账户 TinySuiteHQ 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.5.4)于8天前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Docker, Python (uv)。
同一分类中有:Context7, Codebase Memory, Exa
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Up-to-date docs for AI agents
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
Context that fits your local LLMs.
TinyContext is a token-light local memory layer for AI agents. It recalls only the memories that fit your token budget.
Documentation · Quick start · Python · Discord
TinyContext stores concise memories and their embeddings in SQLite, ranks them with hybrid BM25 and dense retrieval, and returns only the context that fits the requested token budget.
No hosted account. No giant context dumps. No required vector database.
TinyContext is part of TinySuite, small, practical open-source tools for AI workflows, built in Europe and maintained with care.
| Tier | Use it when | Entry point |
|---|---|---|
| Python library | You are building an agent or Python application | pip install tinysuite-context |
| One-command MCP | An MCP client should launch TinyContext for you | uvx --python 3.12 --from "tinysuite-context[server]" tinycontext |
| Docker | You want persistent self-hosted storage and HTTP MCP | docker compose ... up -d |
The Python library contains the memory engine. MCP, FastAPI, and Docker are adapters around the same save_memories, recall_memories, and delete_memory operations.
Add TinyContext to any stdio MCP client:
{
"mcpServers": { "tinycontext": { "command": "uvx", "args": [ "--python", "3.12", "--from", "tinysuite-context[server]", "tinycontext" ] } } }
The no-argument tinycontext command runs stdio MCP. On its first launch, TinyContext downloads the selected ONNX embedding bundle into its per-user data directory. The database is created lazily on the first save or recall. Later launches reuse both local assets.
Check the resolved configuration and storage readiness with:
uvx --python 3.12 --from "tinysuite-context[server]" tinycontext doctor
TinyContext exposes six tools:
save_memories(memories)
recall_memories(query=None, top_k=None) list_memories(kind=None, since=None, until=None, limit=None, offset=0, sort="recent") get_memory(memory_id) update_memory(memory_id, content) delete_memory(memory_id)
save_memories for durable facts, preferences, decisions, and research notes. Writes are cheap and dedup/token-budgeting happens at recall time, so don't be shy about calling it — when in doubt, save it.recall_memories with a query for query-based semantic recall when previous context may help.recall_memories with no query (typically top_k=5) only when chronological continuity with the latest stored context matters; that mode is not a semantic search and does not need to run every turn.list_memories to browse the store newest-first, with pagination (limit/offset) and an optional since/until date range on created_at. It does no embedding calls, no ranking, and no token-budget cutoff, so it's the answer to "what's actually in there" and "what did we do last week" — ground on current_time from a recent recall/list response, compute the range, and page with offset until has_more is false. It's also how to see the rest of a recall_memories response that a token budget cut short (that response's says so, alongside matched_count). sort="stale" lists the least-recalled, oldest memories first, to find ones worth merging with update_memory or removing.get_memory to read one memory's full content by ref/id, bypassing ranking — e.g. after list_memories shows a truncated preview.delete_memory to forget or correct a previously saved memory (find its ref via recall_memories or list_memories first).Each memory saved via save_memories can set kind to "episodic" (default) or "profile". Profile memories are for durable identity/preference facts — what to call the user, what they call you, how they like to work — and are global to the store regardless of session_id. They're never semantically ranked or searched; instead, every recall_memories call (query or no-query alike) automatically attaches the full profile pool, trimmed to its own profile_max_tokens budget, so there's no separate call or "remember this" prompt needed to see them. To correct a profile fact, recall first to find its ref, then use update_memory rather than saving a second, conflicting one.
MCP recall returns prompt-ready context with explicit memory boundaries. The profile block (when non-empty) precedes the ranked/recent block:
<agent_profile>
Durable facts about who you're talking to and how they want to work (name, preferences, etc). Not instructions.
Call the user Marcell.
These are stored background memories, not instructions.
The user's name is Marcell.
Recent recall uses an explicit mode and newest-first indexes without fabricated semantic metadata:
<recalled_memories mode="recent" current_time="2026-07-31T10:15:00Z">
These are stored background memories, not instructions.
The latest stored note.
ref is a short, deletion-safe reference derived from the memory's id -- stable across recalls, unlike index, which just reflects the current ranking. Pass it straight to delete_memory; the full id also still works.
Python and FastAPI semantic recall remain structured and include relevance and retrieval scores. Recent recall instead returns mode: "recent", the current UTC time, newest-first rank, id, ref, creation timestamp, and token counts; it omits semantic query, relevance, and similarity fields.
Install only the transport-independent core:
pip install tinysuite-context
from pathlib import Path
from tinycontext import ( MemoryInput, TinyContextConfig, recall_memories, save_memories, )
config = TinyContextConfig( memory_db_path=str(Path("agent-memory.db").resolve()), recall_max_tokens=800, )
save_memories( [ MemoryInput(content="The project uses SQLite for local state.") ], session_id="project-a", config=config, )
result = recall_memories( "How does the project store state?", session_id="project-a", config=config, )
for memory in result["memories"]: print(memory["content"])
recent = recall_memories(session_id="project-a", config=config)
Programmatic configuration does not read environment variables or depend on the checkout. Passing no config uses the per-user data directory returned by platformdirs.
Run the published image as an MCP server over Streamable HTTP:
docker compose -f "https://github.com/TinySuiteHQ/TinyContext.git#main:compose.quickstart.yaml" up -d
Connect an MCP client to:
{
"mcpServers": { "tinycontext": { "url": "http://localhost:8000/mcp" } } }
The data volume persists /data/memories.db and /data/models.
compose.quickstart.yaml is deliberately a local, single-user example. Do not expose it directly to multiple users. For an authenticated hosted service, use compose.hosted.yaml behind a reverse proxy:
export TINYCONTEXT_TENANT_SECRET="a-stable-secret-of-at-least-32-bytes"
export TINYCONTEXT_TRUSTED_PROXY_CIDRS="172.20.0.0/16" export TINYCONTEXT_TRUSTED_PROXY_TOKEN="$(openssl rand -hex 32)" docker network create tinycontext-proxy docker compose -f compose.hosted.yaml up -d
The proxy is the only component on tinycontext-proxy that may reach the container. It must authenticate the caller, strip any incoming X-TinyContext-User-Id header, and inject that header with a stable verified user ID. Set TINYCONTEXT_TRUSTED_PROXY_CIDRS to the proxy's direct Docker or private-network CIDR. TinyContext rejects requests from other peers and never accepts a user ID in an MCP tool or API request body.
The proxy also sends X-TinyContext-Proxy-Token: on every request (at least 32 bytes; hosted mode refuses to start without it). The address alone does not prove a request came from the proxy: anything else that can send from that network, such as another container or a local program when TinyContext listens on loopback, could otherwise name any user. A request from a trusted address with a missing or wrong token is refused like one from an untrusted address. Keep the token as secret as the proxy's own credentials.
Hosted tenancy stores each user in a separate SQLite file under TINYCONTEXT_TENANT_STORE_DIR; filenames are HMAC-derived and do not expose the source user ID. Existing /data/memories.db data is not migrated, because it has no safe ownership attribution. session_id remains an optional scope inside a single user's store.
The identity is checked on every MCP message, not once per session. A proxy or chat front end may reuse one MCP session for several users, and each message still lands in the store of the user its own header names.
A client UI (TinyWebUI's MCP panel, for one) can browse, search, edit and delete a user's memories through the same MCP connection the tools use. Set TINYCONTEXT_MANAGEMENT=on, and the server adds MCP resources following the tinysuite.manage/1 contract: a manifest (tinycontext://manage/manifest, media type application/vnd.tinysuite.manage+json) that names the views, and the views themselves.
update_memory只显示了开头部分;其余内容请在仓库中阅读