m5-petit-desire
Click on "Deploy 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., "@m5-petit-desire check my current desire levels"
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.
M5 Petit Desire
EnglishPage
M5 Petitに、時間経過とセンサー入力に基づいて変化する内的な「欲求」を持たせる自律欲求システムです。
desire_config.json(キャラクターごとの設定ファイル)で定義した欲求それぞれについて、3段階で欲求レベル(0.0〜1.0)を計算します。
時間ベース計算 — m5-petit-memoryのSQLite DBをキーワード検索し、最後にその欲求が満たされてからの経過時間を欲求レベルに変換
センサー効果の適用 — M5の
/sensorsエンドポイント(m5-petit-mcpが公開)から取得したセンサー値で欲求を増減欲求間の相互作用 — ある欲求が閾値を超えたときに他の欲求へ影響を与える(
cross_effects)
desire_updater.pyをcronで定期実行してdesires.jsonを更新し、MCPサーバー(server.py)がそれを読んでClaudeにツールとして提供します。
Related MCP server: AstrBot Desire System
必要環境
Python 3.10+
セットアップ
uvが未インストールの場合は先にインストールします。
curl -LsSf https://astral.sh/uv/install.sh | shgit clone https://github.com/PetitOnes/m5-petit-desire.git
cd m5-petit-desire
uv syncdesire_config.jsonをキャラクターごとに用意します($PETIT_DATA_DIR/characters/<character_id>/config/desire_config.json)。
{
"desires": {
"curiosity": {
"name_ja": "知りたい",
"description": "気になることを調べたい、新しいことを知りたい好奇心",
"satisfaction_hours": 2.0,
"keywords": ["調べた", "検索した", "発見した", "学んだ"],
"color": "#5bc8d4"
},
"miss_companion": {
"name_ja": "会いたい",
"description": "一緒にいる人と話したい、一緒にいたい気持ち",
"satisfaction_hours": 3.0,
"keywords": []
}
},
"sensor_effects": [
{
"sensor": "battery",
"condition": { "op": "range", "min": 1, "max": 20 },
"effects": { "*": { "multiply": 0.5 } },
"description": "電池が減ると他の欲求が下がる"
}
],
"cross_effects": [],
"priority": ["miss_companion", "curiosity"]
}keywordsが空の欲求のうちmiss_companionは、COMPANION_NAME環境変数から自動でキーワードを生成します(「〇〇と話した」「〇〇に伝えた」など)time_driven: falseを指定すると時間経過では変化せず、base_levelに留まります(センサー・相互作用のみで変化)
cronで5分ごとに更新します。
# crontab -e
*/5 * * * * cd /path/to/m5-petit-desire && CHARACTER_ID=petit uv run desire-updater環境変数
変数名 | デフォルト | 説明 |
|
| キャラクターID。 |
|
| データディレクトリ(m5-petit-appと共有) |
|
| 一緒にいる人の名前( |
|
| m5-petit-memoryが使うSQLite DBのパス |
|
| 欲求レベルの出力先 |
Claude Code連携
.mcp.json(または~/.claude/settings.json)に追加します。
{
"mcpServers": {
"desire-system": {
"command": "uv",
"args": ["run", "--directory", "/path/to/m5-petit-desire", "desire-system"],
"env": {
"CHARACTER_ID": "petit"
}
}
}
}ツール一覧
get_desires
現在の欲求レベルを取得します。レベルが0.7以上の欲求があれば、すぐに行動することが期待されます。
satisfy_desire
行動した後に欲求を満たします(レベルが0.4下がる)。
{ "desire_name": "curiosity" }boost_desire
驚き・新規性による欲求のブースト(ドーパミン応答のシミュレーション)。
{ "desire_name": "curiosity", "amount": 0.3 }開発
# 開発依存をインストール
uv sync --all-extras
# テスト実行
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run pytest
# lint
uv run ruff check .アーキテクチャ
m5-petit-desire/
├── desire_updater.py # 欲求レベルの計算・desires.jsonへの保存(cronから実行)
├── server.py # MCPサーバー(get_desires/satisfy_desire/boost_desireを提供)
└── tests/License
Apache License 2.0
本プロジェクトは lifemate-ai/embodied-claude(MITライセンス)の desire-system コンポーネントを元に、M5 Petit向けに大幅に改変したものです。元のライセンスと著作権表示は NOTICE を参照してください。
Available Tools
3 toolsboost_desireA
Boost a desire level due to novelty/surprise (dopamine/prediction error). Call when you feel surprised or encounter unexpected info. Simulates dopamine response to novelty.
Inputs: amount (required), desire_name (required).
get_desiresA
Get current desire levels. Act immediately on any desire with level >= 0.7.
Inputs: no named parameters.
satisfy_desireA
Satisfy a desire after taking an action. Pass the desire_name you just acted on. The level drops by 0.4. Call again if still high.
Inputs: desire_name (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a distinctly different purpose: get_desires reads current levels, satisfy_desire reduces a desire, and boost_desire increases a desire. There is no overlap or confusion between them.
All tool names follow a consistent verb_noun pattern: get_desires, satisfy_desire, boost_desire. The naming is uniform and predictable.
Three tools is an appropriate scope for a desire management system, covering the essential operations (read, decrease, increase) without unnecessary bloat.
The tool set provides complete coverage of the domain: it allows checking desire levels, satisfying desires to lower them, and boosting desires to raise them. There are no obvious missing operations for the stated purpose.
Maintenance
Related MCP Connectors
Persistent AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
Durable, user-controlled goals for AI agents, kept across any MCP client.
A personal agent with lasting memory and a morning brief, inside the Claude or ChatGPT you use.
Give Claude an honest self-model — behavioral tendencies built from evidence, not session memory. Mi
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceAn AI desire-driven system that maintains nine core drive dimensions, generates thoughts and behavior suggestions, and provides tools to inspect and trigger events via MCP.-
- FlicenseNot gradedqualityBmaintenanceMCP server that simulates an AI's desire-driven internal state with nine dimensions, event-based updates, dynamic heartbeat, thought pool, and persistent storage, enabling behavior suggestions and inner monologue generation.-
- FlicenseNot gradedqualityDmaintenanceAn MCP server implementing a desire-driven system for AI, managing nine drive dimensions, thought pools, and generating behavior suggestions and inner monologues. It provides tools to view status, trigger events, run heartbeats, and resolve thoughts with persistent storage.-
- FlicenseNot gradedqualityAmaintenanceEnables Claude to persistently store and retrieve memories across conversations, tagging each with continuous valence/arousal emotional coordinates and keeping them as Obsidian-compatible Markdown files that decay, merge, and resurface by emotional weight. Exposes five MCP tools for surfacing unresolved memories, holding new ones, digesting diary entries, tracing metadata, and reporting system status.-