knowyoubetter
MCP server that asks users clarifying questions when uncertain, remembers their choices using local embeddings, and automatically answers similar future queries based on learned preferences.
README
knowyoubetter
一个 MCP 插件:agent 没把握时向用户提问(3-5 个候选 + 正反理由),记住你的选择(本地 embedding),下次遇到相似问题自动按你的偏好作答——越用越懂你,问得越来越少。
工具
| 工具 | 用途 |
|---|---|
ask_user |
低置信度时向用户提问;命中高度相似历史时直接返回历史答案(source=history) |
record_choice |
两阶段模式下记录用户对 pending 的选择 |
recall_preferences |
开始任务时查询相关历史偏好 |
客户端支持 MCP elicitation 时(如 Claude Code)会直接弹出原生选择框;否则自动降级为两阶段:agent 展示候选 → 用户回答 → agent 调 record_choice。
表单里固定提供两个额外选项:「我有别的想法」(在补充说明里写下自定义答案,按原文记录)和「换一批候选」(关闭本次提问并返回 source=rethink,agent 换角度重新生成候选后再问)。两阶段模式下用户可直接说出自己的想法,或让 agent 以 choice="__rethink__" 调 record_choice 关闭本次提问。
安装(Claude Code)
claude mcp add knowyoubetter -- node /absolute/path/to/knowyoubetter/dist/index.js
Cursor / 其它 host 在各自 MCP 设置中配置同等命令即可。开发模式可用 npx tsx src/index.ts。
数据
- 默认目录
~/.knowyoubetter(KNOWYOUBETTER_DATA_DIR覆盖):knowyoubetter.db、config.json、models/ - 首次运行自动下载多语言 embedding 模型(q8 量化版,约 135MB),默认从 ModelScope 镜像拉取(
KYB_EMBEDDING_HOST可覆盖,如指回https://huggingface.co);离线时提问功能不受影响,历史检索降级,联网后下次启动自动补齐 - 配置项:
embeddingModel、autoAnswerThreshold(默认 0.90)、recallMinSimilarity(默认 0.40)、maxHistoryInAsk(默认 3)
开发
npm install
npm test # 单测 + 集成(跳过真实模型)
npm run test:real # 真实 embedding 模型测试(首次下载模型)
npm run typecheck:tests # 类型检查测试与配置(含 vitest.config.ts)
npm run build
npx @modelcontextprotocol/inspector node dist/index.js # MCP Inspector 手动验收
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.