personal-context-mcp
Stores personal context as markdown files and exposes them via MCP for AI assistants to retrieve user preferences, skills, and background.
README
<div align="center">
🧠 personal-context-mcp
把「你是谁」存一次,让每个 AI 都记得你。 Store who you are once — let every AI remember you.
</div>
🇨🇳 中文
✨ 这是什么
换一个新 AI、新开一个聊天框,你是不是又得从头交代一遍「我是谁、我喜欢什么风格、我做过什么」?
personal-context-mcp 把这些存成 markdown,通过 MCP(Model Context Protocol) 暴露成一组工具。任何支持 MCP 的 AI(Claude Code、Claude Desktop、Cursor…)接上后,调用一次 who_am_i 就「认识你」,不用再自我介绍。
📦 数据一份,插头随时加 · ☁️ 放 GitHub 永久免费 · 🔌 本地 stdio 零托管 · 🔐 分层可见
💡 核心理念
| 说明 | |
|---|---|
| 📦 数据与服务分离 | 你的资料是 context/ 下的纯 markdown,放在你自己的 git 仓库里;server 只是薄薄一层,随时可换、可拔。 |
| ☁️ 永久留存、不吃算力 | 跟 GPU 无关。数据放 GitHub 永久免费,server 本地跑、断网可用。哪天没有任何服务器,光靠这个 git 仓库你依然拥有全部资料。 |
| 🔐 分层可见(tier) | public ⊂ recruiter ⊂ friend ⊂ private。同一份资料,陌生人 / 招聘方 / 朋友 / 自己看到的范围不同。 |
📁 目录结构
personal-context-mcp/
├── server.py # 🔌 MCP server(stdio)
├── context/ # ★ 数据层:你的资料,改这里
│ ├── style.md # 🎨 风格习惯
│ ├── preferences.md # ⚙️ 偏好设置
│ ├── skills.md # 🧰 用过的 skill
│ ├── background.md # 📖 人生背景(可公开)
│ └── private.md # 🔒 私密信息(gitignore,仅本地 tier=private 可见)
├── ingest/import_file.py # 📄 简历/文件 → 纯文本(供 AI 解析)
└── pyproject.toml
🚀 快速开始
# 1) 装依赖(mcp / pyyaml / pypdf / python-docx)
cd personal-context-mcp
uv sync
# 2) 本地可视化调试(打开 MCP Inspector,逐个点工具试)
uv run mcp dev server.py
# 3) 接入 Claude Code / Cursor
uv run mcp install server.py --name personal-context
或手动在 AI 的 MCP 配置里加一段(注意换成绝对路径):
{
"mcpServers": {
"personal-context": {
"command": "uv",
"args": ["--directory", "/绝对路径/personal-context-mcp", "run", "python", "server.py"]
}
}
}
接入后,对 AI 说一句 「调用 who_am_i 了解我」 就行 ✅
🔄 它是怎么工作的
flowchart LR
A["📝 context/*.md<br/>你的资料"] --> B["🔌 MCP Server<br/>server.py (stdio)"]
B -->|"who_am_i / search…"| C["🤖 任意 AI<br/>Claude / Cursor…"]
C -->|"save_context 写回"| A
D["📄 简历 / 文件"] -->|"extract_file"| C
🧰 提供的工具
| 工具 | 作用 |
|---|---|
🙋 who_am_i(viewer_tier) |
一次性返回该 tier 下全部可见内容,换新 AI 时用它「一键认识你」 |
📋 list_context(viewer_tier) |
列出所有板块 |
📖 get_context(slug, viewer_tier) |
读某个板块全文 |
🔍 search_context(query, viewer_tier) |
关键词搜索 |
💾 save_context(slug, title, body, tier, tags) |
写入/更新板块(AI 整理完经历后存回来) |
📄 extract_file(path) |
抽取 pdf/docx/txt/md 文本,供 AI 解析简历 |
📄 上传简历 / 文件,自动整理进知识库
不用写死解析逻辑 —— 让 AI 来做:
- 让 AI
extract_file("我的简历.pdf")拿到纯文本; - AI 解析、优化成结构化内容;
- AI
save_context(slug="background", …)写回context/。
命令行也能单独抽文本:
uv run python ingest/import_file.py 我的简历.pdf
🔐 分层可见(tier)
每个 .md 头部的 tier 字段决定谁能看到:
public ⊂ recruiter ⊂ friend ⊂ private
陌生人 招聘方 朋友 只有自己
调用时传 viewer_tier,server 只返回该层级及以下的内容。私密信息(如内网路径、身份细节)建议单独放 context/private.md 并加进 .gitignore,这样它永不进入 GitHub,只在本地 tier=private 时可见。
☁️ 留存到 GitHub
cd personal-context-mcp
git add . && git commit -m "update my context"
git push
💡
context/private.md已在.gitignore里;其余板块默认可公开。若想全部私有,直接用私有仓库即可。
<!-- EN_APPEND_MARK -->
🇬🇧 English
✨ What is this
Every time you switch to a new AI or open a fresh chat, you re-explain who you are, what style you like, what you've built. 😮💨
personal-context-mcp stores all of that as markdown and exposes it through the Model Context Protocol (MCP). Any MCP-capable AI (Claude Code, Claude Desktop, Cursor…) plugs in, calls who_am_i once, and instantly knows you — no more re-onboarding.
📦 One data source, plug in anytime · ☁️ Free forever on GitHub · 🔌 Local stdio, zero hosting · 🔐 Tiered visibility
💡 Core ideas
| 📦 Data ≠ server | Your data is plain markdown under context/, living in your own git repo. The server is a thin, swappable layer. |
| ☁️ Permanent, compute-free | No GPU involved. Data lives on GitHub for free; the server runs locally and works offline. Even with no server anywhere, the git repo alone keeps all your data. |
| 🔐 Tiered visibility | public ⊂ recruiter ⊂ friend ⊂ private. Strangers / recruiters / friends / you each see a different slice of the same data. |
📁 Layout
personal-context-mcp/
├── server.py # 🔌 MCP server (stdio)
├── context/ # ★ data layer — edit these
│ ├── style.md # 🎨 style & habits
│ ├── preferences.md # ⚙️ preferences
│ ├── skills.md # 🧰 skills used
│ ├── background.md # 📖 background (public-safe)
│ └── private.md # 🔒 private (gitignored, tier=private only)
├── ingest/import_file.py # 📄 resume/file → plain text (for the AI to parse)
└── pyproject.toml
🚀 Quick start
# 1) install deps
cd personal-context-mcp
uv sync
# 2) local visual debugging (MCP Inspector)
uv run mcp dev server.py
# 3) install into Claude Code / Cursor
uv run mcp install server.py --name personal-context
Or add this to your AI's MCP config (use an absolute path):
{
"mcpServers": {
"personal-context": {
"command": "uv",
"args": ["--directory", "/abs/path/personal-context-mcp", "run", "python", "server.py"]
}
}
}
Then just tell the AI: "Call who_am_i to learn about me." ✅
🧰 Tools
| Tool | Purpose |
|---|---|
🙋 who_am_i(viewer_tier) |
Return everything visible at that tier in one shot — "know me instantly" |
📋 list_context(viewer_tier) |
List all sections |
📖 get_context(slug, viewer_tier) |
Read one section |
🔍 search_context(query, viewer_tier) |
Keyword search |
💾 save_context(slug, title, body, tier, tags) |
Write/update a section |
📄 extract_file(path) |
Extract text from pdf/docx/txt/md for the AI to parse |
📄 Import a resume, let the AI organize it
No hard-coded parsing — let the AI do it:
- AI calls
extract_file("resume.pdf")to get plain text; - AI parses and structures it;
- AI calls
save_context(slug="background", …)to write it back.
CLI also works:
uv run python ingest/import_file.py resume.pdf
🔐 Tiered visibility
The tier field in each .md front-matter controls who sees it. The server returns only content at or below the requested viewer_tier. Keep private data (internal paths, identity details) in context/private.md and gitignore it — it never reaches GitHub and shows only at local tier=private.
☁️ Persist to GitHub
git add . && git commit -m "update my context"
git push
<div align="center">
Made with 🧠 by KrystalJin1 · MIT License
</div>
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.
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.
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.
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.
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.
E2B
Using MCP to run code via e2b.