经 AI Skill Hub 精选评估,皮亚身份层 获评「推荐使用」。这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.8 分,适合有一定技术背景的用户使用。
Claude/Codex/Cursor专用MCP工具,为AI建立身份认证层,持久化存储用户身份信息而非临时数据。支持AI Agent跨会话记忆用户身份特征,增强个性化交互能力。适合需要AI长期记忆和身份识别的开发者。
皮亚身份层 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
Claude/Codex/Cursor专用MCP工具,为AI建立身份认证层,持久化存储用户身份信息而非临时数据。支持AI Agent跨会话记忆用户身份特征,增强个性化交互能力。适合需要AI长期记忆和身份识别的开发者。
皮亚身份层 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/Patdolitse/piia-engram
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"-----": {
"command": "npx",
"args": ["-y", "piia-engram"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 皮亚身份层 执行以下任务... Claude: [自动调用 皮亚身份层 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"_____": {
"command": "npx",
"args": ["-y", "piia-engram"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
<img src="assets/social_preview.png" alt="piia-engram - Your AI identity layer" width="640">
Run piia-engram on your own server and connect from anywhere.
```bash
pip install piia-engram[remote]
pip install piia-engram
engram setup
The setup wizard will: 1. Detect your Python environment 2. Find and configure your AI tools (Claude Code, Cursor, Claude Desktop) 3. Walk you through seed knowledge (role, tech stack, language) 4. Smart-import rules from your existing CLAUDE.md / .cursorrules files 5. Show your privacy preferences (cross-tool sync, anonymous statistics — both optional) 6. Preview your AI identity card — immediate proof of value
Restart your AI tool after setup. The first conversation will call get_user_context automatically — your AI already knows you.
<details> <summary><strong>Manual MCP configuration</strong></summary>
If you prefer to configure manually, add to your AI tool's MCP config:
{
"mcpServers": {
"piia-engram": {
"command": "python",
"args": ["/path/to/piia-engram/src/piia_engram/mcp_server.py"]
}
}
}
</details>
{
"mcpServers": {
"piia-engram": {
"url": "http://your-server:8767/sse",
"headers": {
"Authorization": "Bearer abc123..."
}
}
}
}
{
"mcpServers": {
"piia-engram": {
"url": "http://your-server:8767/sse",
"headers": {
"Authorization": "Bearer abc123..."
}
}
}
}
Security notes: - Always use HTTPS in production, behind nginx or caddy with TLS. - The auth token protects your identity data. Keep it secret. - Default bind is 127.0.0.1 for localhost only. Use 0.0.0.0 only behind a reverse proxy. - Set ENGRAM_CORS_ORIGINS to restrict cross-origin access (e.g. https://your-domain.com). - Data stays on your server and never touches third-party clouds.
Encrypt sensitive profile fields (email, phone, location, etc.) at rest:
pip install piia-engram[secure]
export ENGRAM_SECRET="your-strong-passphrase"
Encrypted fields are stored as enc:v1:... in JSON files. Without ENGRAM_SECRET, piia-engram works normally with plaintext (backward compatible).
Track all read/write operations:
export ENGRAM_AUDIT=1
Logs are written to ~/.engram/audit.log in JSON-lines format. Query with get_audit_log tool or grep.
engram setup # Interactive install wizard
piia-engram doctor # Check config health (all AI tools)
piia-engram doctor --fix # Auto-repair any issues found
piia-engram stats # Show project growth metrics (GitHub + PyPI)
piia-engram stats --log # Append stats snapshot to local log
engram telemetry # Manage anonymous usage statistics
engram privacy # Show what data piia-engram stores and where
| Tool | Purpose |
|---|---|
get_user_context | Load identity + knowledge at session start |
wrap_up_session | Save insights + sync at session end |
add_lesson | Store a reusable lesson learned |
add_decision | Record a key decision with reasoning |
search_knowledge | Search lessons and decisions by weighted relevance |
get_relevant_knowledge | Find knowledge relevant to current project |
get_identity_card | Export Markdown identity card for non-MCP tools |
update_identity | Update profile, preferences, or quality standards |
get_project_context | Read a saved project snapshot |
save_project_snapshot | Persist project state for future sessions |
| Feature | piia-engram | Claude Memory | Manual CLAUDE.md | Mem0 | Letta (MemGPT) |
|---|---|---|---|---|---|
| Primary purpose | User identity across tools | Per-conversation memory | Per-project notes | Agent vector memory | Agent self-editing memory |
| Cross-tool by design | ✅ MCP-native (43 tools) | ❌ Claude only | ❌ tool-specific | ⚠ requires per-tool wiring | ⚠ requires per-tool wiring |
| Storage | Local JSON in ~/.engram/ | Cloud | Local | Vector DB + Mem0 Cloud | Postgres or Letta Cloud |
| Local-first by default | ✅ | ❌ | ✅ | ⚠ Cloud is the default | ⚠ Cloud is the default |
| Encryption at rest | ✅ AES-256-GCM, PBKDF2 600k (opt-in) | depends on Cloud | ❌ plain Markdown | depends on store config | depends on Postgres config |
| Knowledge tiers (user gate) | ✅ staging → verified | ❌ | ❌ | ❌ | ❌ |
| Conflict detection | ✅ | ❌ | ❌ | ❌ | ❌ |
| MCP-native | ✅ | n/a | n/a | ⚠ third-party | ⚠ third-party |
| Price | Free, Apache 2.0 | Subscription-bundled | Free | Free / Cloud tiers | Free / Cloud tiers |
📊 For the full side-by-side, including when to choose a competitor over piia-engram, see docs/comparison.md.
What is piia-engram? piia-engram is a local-first AI identity layer — not session memory, not an agent framework. It stores who you are, how you work, what you've learned, and the decisions you've made — as local JSON files on your machine. Every MCP-compatible AI tool (Claude Code, Codex, Cursor) reads the same identity, so new chats, tool updates, and tool switches never erase your context.
How is piia-engram different from agent memory tools like Mem0, Zep, or Letta? Those tools store task context and session history for AI agents — what happened during a workflow. piia-engram stores who you are as a person — your identity, preferences, hard-won lessons, and key decisions. It's a different layer: identity persists across tools, sessions, and projects, while task memory is scoped to a single agent run. Your data is local JSON files you own and can edit directly.
Which AI tools does piia-engram support? piia-engram works with any MCP-compatible AI tool: Claude Code, OpenAI Codex, Cursor, Claude Desktop, and others. For tools without MCP support (ChatGPT, Gemini, Kimi), you can export a Markdown identity card and paste it in manually.
Why is the PyPI package called piia-engram if the product is just "piia-engram"? The project started as part of a larger personal-AI initiative called PIIA (Personal Intelligence Identity Asset) — piia-engram is the first and currently the only released tool in that line, so it kept the piia- prefix on PyPI. Day-to-day the product is just piia-engram — that's the CLI command (engram setup, piia-engram doctor), the import name (import piia_engram), and the MCP server name (engram). The piia- prefix only shows up at install time and may be retired in a future major version.
How do I install piia-engram?
pip install piia-engram
engram setup The setup wizard detects your AI tools and configures MCP automatically. Restart your AI tool after setup. The AI will call get_user_context at the start of each session.
After upgrading, my AI tool shows "MCP server disconnected". How do I fix it? Run piia-engram doctor --fix in a terminal, then restart your AI tool. This command scans all known MCP config files (Claude Code, Cursor, Claude Desktop), removes outdated server entries, and repairs broken paths in one step. piia-engram also runs this migration automatically the next time its server starts, so most users will never see this message.
Does piia-engram send data to the cloud? All identity and knowledge data is stored in ~/.engram/ on your local machine. Core identity and knowledge tools make no network requests. Anonymous usage statistics (tool call counts, knowledge totals, piia-engram version — never content, prompts, or file paths) can be optionally enabled during engram setup; they are off by default. You can inspect the exact payload with engram telemetry preview and disable anytime with engram telemetry off. The optional read_web_content tool makes outbound HTTP requests to a local Reader service (localhost:7890) which may in turn fetch external URLs — but only when explicitly invoked.
How many MCP tools does piia-engram provide? piia-engram exposes 43 MCP tools covering identity management, lessons learned, key decisions, project snapshots, bulk input, note ingestion, session insight extraction, weighted knowledge search, similarity discovery, merging, lifecycle review, digesting, reporting, linking, health checks, workflow shortcuts, and audit logging.
Is piia-engram free? Yes. piia-engram is free and open source under the Apache 2.0 license.
创新的AI身份管理层,为Agent增加记忆维度。架构清晰但文档需完善,适合专业开发者深度集成,生态价值高。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
AI Skill Hub 点评:皮亚身份层 的核心功能完整,质量良好。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | piia-engram |
| Topics | 身份管理AI记忆MCP工具Agent增强身份认证 |
| GitHub | https://github.com/Patdolitse/piia-engram |
| License | Apache-2.0 |
| 语言 | Python |
收录时间:2026-05-22 · 更新时间:2026-05-22 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端