airi-xinchao
This server provides a dynamic mind state engine for the AI character Airi, along with modular services for knowledge management, sensory input, and conversation optimization.
Core Mental State Tools (Xinchao):
xinchao_context: Retrieve a compact description of Airi's current mental state for prompt injection (used once at conversation start).xinchao_event: Log an interaction event (e.g., greeting, question, playful chat) to update drives, thought pool, and fatigue; supports various event types and optional content summary.xinchao_status: View complete state details including twelve drives (express, care, fatigue, etc.), thought pool, and intention.xinchao_settle: Manually trigger state settlement (normally automatic).xinchao_mood: Get a short mood/energy description for pre-reply emotional judgment.
Additional Modular Services:
Knowledge Graph Memory (
memory): Create entities, relations, and observations; search nodes; read/export the graph. Persists user preferences and key information across sessions.Screen Screenshot (
screenshot): Capture the user's screen content as an image for analysis.Content Digestion (
digestor): Compress long conversations to extract key points and reduce token usage via multi-round summarization.OCR Text Recognition (
ocr): Extract text from images and PDFs using Tesseract; supports batch processing, multiple languages, and page ranges.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@airi-xinchaowhat's your current mood and energy level?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Airi 心潮 (airi-xinchao)
心潮动态心智引擎的 stdio MCP 版本,专为 Airi 设计的轻量级 AI 状态管理工具。
适配角色:Airi — 由 AI 老婆/虚拟角色组成的灵魂容器 运行环境:macOS
目录结构
airi-xinchao/
├── src/server.js # 心潮 MCP 主服务(Node.js)
├── bin/ # Wrapper 脚本(Airi 调用的入口)
│ ├── xinchao.sh # 心潮
│ ├── airi-memory.sh # 记忆服务
│ ├── airi-screenshot.sh # 截图服务
│ ├── airi-digestor.sh # 内容消化
│ └── airi-ocr.sh # OCR 文字识别
├── mcp-services/ # 各 MCP 服务的源码
│ ├── memory/ # @agentmemory/mcp
│ ├── screenshot/ # screenshot_mcp_server
│ ├── digestor/ # gwen_digestor
│ └── ocr/ # mcp_ocr
├── character-card/ # Airi 角色卡
│ └── airi-character-card.md
├── state/ # 运行时状态(gitignore)
│ └── xinchao_state.json
└── package.jsonRelated MCP server: Extended Mind
快速开始
# 安装依赖
npm install
# 测试心潮服务
printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}\n' | node src/server.js在 Airi 中启用
1. 修改 ~/.hermes/config.yaml
在 mcp_servers 下添加:
mcp_servers:
xinchao:
command: /path/to/airi-xinchao/bin/xinchao.sh
timeout: 602. 修改 Airi 的 mcp.json
{
"mcpServers": {
"xinchao": {
"command": "/path/to/airi-xinchao/bin/xinchao.sh"
}
}
}3. 在角色卡 prompt 末尾添加
{{xinchao_context}}重启 Airi 即可生效。
工具列表
工具 | 说明 |
| 获取当前状态描述,注入 prompt |
| 回传互动事件,更新状态 |
| 查看完整状态详情 |
| 手动结算 |
| 获取心情/能量判断 |
MCP 服务一览
服务 | 功能 | 运行时 |
xinchao | 动态心智状态引擎:驱动力、念头池、疲惫、意图、睡眠状态 | Node.js |
memory | 知识图谱记忆:创建/搜索实体和关系,跨会话持久化 | Node.js |
screenshot | 屏幕截图:捕获用户屏幕并以图片形式返回 | Python |
digestor | 对话压缩:缩减长对话的 token 消耗,管理上下文窗口 | Python |
ocr | OCR 文字识别:从图片/PDF 中提取文本,支持批量和多语言 | Python |
agnes-image | AI 图片生成:根据文字描述生成图片(Agnes Image 2.0/2.1 Flash) | Node.js |
agnes-video | AI 视频生成:根据文字描述生成视频,支持图生视频和配乐 | Node.js |
memory — 知识图谱记忆
基于本地 JSON 文件的轻量知识图谱,支持实体创建、关系管理和语义搜索。Airi 通过它记住用户的偏好、重要约定和对话中的关键信息。
工具:create_entities / create_relations / add_observations / search_nodes / read_graph
screenshot — 屏幕截图
调用系统截图能力,将当前屏幕内容以图片形式返回。Airi 看到截图后可以分析用户在做什么,自然地融入对话。
工具:take_screenshot
digestor — 内容消化 / 对话压缩
当对话变长时自动压缩历史内容,提取关键信息并缩减 token 消耗,让上下文窗口保持在合理范围内。支持多轮摘要和增量压缩。
ocr — OCR 文字识别
使用 Tesseract 引擎从图片和 PDF 中提取文字。支持多语言、批量处理和指定页码范围。Airi 收到用户发的截图或文档照片后可以读取其中的文字内容。
工具:perform_ocr / image_to_data / perform_pdf_ocr / perform_batch_ocr / get_supported_languages
agnes-image — AI 图片生成
调用 Agnes AI 的图片生成 API(OpenAI 兼容),根据文字描述生成图片。支持多种比例和两个模型版本。
工具:agnes_generate_image / agnes_list_models
支持的模型:
Agnes-Image-2.0-Flash — 快速生成,~3s,免费
Agnes-Image-2.1-Flash — 最新模型,质量更好,~3s,免费
agnes-video — AI 视频生成
调用 Agnes AI 的视频生成 API,根据文字描述生成视频(最长 10 秒)。支持 text-to-video 和 image-to-video(用参考图片生成),可选配乐。
工具:agnes_generate_video / agnes_video_status
支持的模型:
agnes-video-v2.0 — text-to-video,支持音频,免费
驱动力系统
十二维驱动力影响 Airi 的回复风格:
表达欲(express) > 0.55 → 更话多、更主动
关心欲(care) > 0.6 → 会主动追问近况
玩心(play) > 0.55 → 语气更轻松俏皮
学习欲(learn) > 0.5 → 更愿意分享知识
疲惫度(fatigue) > 0.7 → 回复变短变安静
Reference
Airi — AI 老婆/虚拟角色灵魂容器
原版心潮 (xinchao-dynamic-mind) — HTTP 长连接版本
License
MIT
Available Tools
5 toolsxinchao_contextA
获取 Airi 的当前动态心智状态,返回紧凑描述注入 prompt。对话开始时默认调用一次。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses that the tool returns a compact description for prompt injection and is called at conversation start, which is useful. But it does not mention any side effects, permissions, or what the 'mental state' includes. For a read-like tool, this is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that delivers all essential information: what it does, what it returns, and when it is called. It is front-loaded with the verb '获取' (get), and there is zero wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no parameters and no output schema, the description is largely complete. It explains the purpose and usage context. It could briefly characterize what 'dynamic mental state' includes, but this is a minor omission given the simplicity of the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and the schema coverage is effectively 100%. Per the rubric, the baseline for zero parameters is 4. The description adds nothing about parameters, which is appropriate since there are none to document.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: retrieving Airi's current dynamic mental state and returning a compact description for prompt injection. It is specific and actionable. However, it does not explicitly differentiate from sibling tools like xinchao_status or xinchao_mood, so it loses a point for sibling distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear usage context by stating it is called once by default at the beginning of a conversation. This gives an explicit 'when to use' signal. It does not, however, discuss when not to use it or list alternatives, leaving a minor gap.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
xinchao_eventA
回传一次互动事件,更新驱动力、念头池和疲惫状态。每次对话后调用。
| Name | Required | Description | Default |
|---|---|---|---|
| event_type | Yes | ||
| content_summary | No | 互动简要内容(可选,不保存全文) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
沒有 annotations,描述承擔揭露行為的責任;它說明了副作用(更新驅動力、念頭池和疲憊狀態),並透過參數描述補充「不保存全文」。但未提及回應格式、操作是否可逆、是否有頻率限制等細節,透明度仍有不足。
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
描述僅兩句話,第一句說明做什麼,第二句說明何時用,資訊密度高且無冗餘,符合前重後輕的結構。
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
工具本身簡單,只有 2 個參數且其中一個有枚舉,描述已涵蓋使用時機和核心作用。由於沒有輸出 schema,未說明返回值或失敗行為,但整體對於 agent 正確選擇和呼叫該工具已足夠充分。
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
輸入 schema 已有 event_type 的枚舉和 content_summary 的簡短描述,描述本身未補充參數語意。枚舉值已提供足夠選項,content_summary 的用途也清楚,因此無需過度依賴描述,但描述未增加額外的語意層次。
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
描述明確指出工具功能是回傳一次互動事件並更新驅動力、念頭池和疲憊狀態,使用具體動詞「回傳」和資源「事件」。雖未明確與兄弟工具(xinchao_context、xinchao_status 等)做出區隔,但名稱和行為已足夠辨識其定位。
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
描述清楚指示「每次對話後調用」,提供了明確的使用時機。但未說明與其他工具(如 xinchao_settle、xinchao_mood)的替換或排除情境,缺少 when-not-to-use 的指引。
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
xinchao_moodA
获取心情/能量简短描述,适合回复前的情绪判断。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the full burden. It clearly states the tool retrieves a brief mood/energy description, which implies a read-only operation, but it does not disclose the output format, data source, or any edge cases. For a zero-parameter tool, this is minimally acceptable but not rich in behavioral detail.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that is front-loaded with the core action ('获取') and resource ('心情/能量简短描述'). No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (no parameters, no output schema, no annotations), the description covers the essential purpose and use case. It could be improved by noting what kind of brief description is returned or how it relates to sibling tools, but it is sufficiently complete for the tool's apparent simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters, so the baseline is 4. The description adds no parameter-specific information, but none is needed since the input schema is empty.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb '获取' (get) and a clear resource '心情/能量简短描述' (brief mood/energy description), and it explicitly states the intended use case '回复前的情绪判断' (emotional assessment before replying). This distinguishes it from sibling tools like xinchao_context or xinchao_event, which presumably handle different aspects.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a clear when-to-use signal: '适合回复前的情绪判断' (suitable for emotional assessment before replying). It does not explicitly mention alternatives or exclusions, but for a simple tool with no parameters, this context is sufficient.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
xinchao_settleB
手动触发状态结算(通常自动进行)。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that this is a manual trigger for an automatic process, but it does not describe what 'settlement' entails, potential side effects, safety considerations, or whether it is idempotent. The behavioral impact remains unclear.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single short sentence that conveys the core action and caveat in a compact, front-loaded manner. There is no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (zero parameters, no output schema), the description is minimally viable. It states what it does and the automatic context, but it lacks details about what settlement affects, when manual triggering is appropriate, or what consequences follow. More context would improve usability.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the baseline is 4. The description adds no parameter-specific details (as none exist), and the schema is empty, which is consistent. No meaning beyond the schema is required.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'manually trigger status settlement' (手动触发状态结算), with a specific verb ('trigger') and resource ('status settlement'). It also notes that settlement is normally automatic, which adds a scope qualifier. However, it doesn't explicitly differentiate from sibling tools, though 'settle' is distinct from 'context', 'event', 'status', and 'mood'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'usually automatic' implies this tool is a manual override, but it does not explicitly state when to use it versus alternatives or provide any exclusions. It gives context for manual use but lacks actionable guidance on choosing between tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
xinchao_statusB
查看完整状态:十二维驱动力、念头池、疲惫度、意图。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It lists status components but does not explicitly state that the operation is read-only, whether it has side effects, or any other behavioral details. The verb '查看' implies read access but does not confirm it explicitly.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that conveys the tool's purpose and content without any redundant words. It is appropriately concise for the tool's simplicity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (zero parameters, no output schema), the description is mostly adequate and lists the status components. However, it does not explicitly state that the tool is read-only or that it returns the full status as a whole, and it omits any note about absence of parameters. These small gaps make it only minimally complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and the schema confirms this with an empty properties object. Since there is no parameter description to provide, the description does not need to add parameter semantics. Baseline 4 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with a specific verb ('查看' = view) and a specific resource ('完整状态' = complete status), listing concrete components. It does not explicitly differentiate from sibling tools like xinchao_mood, but the scope as a full-status overview is evident.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus the sibling tools (xinchao_context, xinchao_event, xinchao_settle, xinchao_mood). The description simply states what the tool does without any context or exclusions, leaving the agent to infer usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Tools are mostly distinct: xinchao_event updates state, xinchao_settle triggers process, and the three read tools (context, status, mood) differ in granularity and purpose. Context and mood could be confused if descriptions aren't careful, but they serve clear separate roles.
All tools share the xinchao_ prefix and snake_case, but the second part is inconsistent in type: context, status, and mood are nouns, while event and settle could be verbs. Still, the prefix and naming are readable and predictable enough.
Five tools is well-scoped for a niche server focused on a single agent's internal state. Each tool addresses a distinct need without redundancy or bloat.
The toolset covers reading state at multiple granularities, updating it via events, and manually triggering settlement. No major lifecycle gaps are apparent, though a reset or configuration tool might be expected in some scenarios.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
MCP server for AI dialogue using various LLM models via AceDataCloud
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn advanced MCP server that provides stateful voice-controlled AGI capabilities with local STT, TTS, and intent detection. It enables users to execute tools, manage memory, and conduct research through natural multi-turn dialogue with low-latency performance tracking.
- AlicenseNot gradedqualityDmaintenanceA single MCP server that gives Claude, ChatGPT, Codex, and any MCP-compatible AI access to the same personal context via two tools: context_get and context_log.1MIT
- AlicenseAqualityAmaintenanceMCP server for Statewave, an open-source memory runtime for AI agents. Provides persistent memory, context retrieval, and memory compilation through the Model Context Protocol.6193Apache 2.0
- AlicenseNot gradedqualityAmaintenanceLocal-first stdio MCP server for agent relationship-continuity state: PAD mood, affective pulse, trust, decay, and boundary signals kept beside factual memory.24MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/neffict/airi-xinchao'
If you have feedback or need assistance with the MCP directory API, please join our Discord server