M5 Petit Relations
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 Relations Record that I like morning walks and feel close to owner."
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 Relations
English Page
M5 Petit(や、その他のClaudeベースのエージェント)が「自分・他のキャラ・人間のオーナー」それぞれについて何を感じ、何を知っているかを読み書きするMCPサーバーです。
キャラクターごとに1つのrelations.jsonを持ち、相手ごと(self・owner・他のキャラID)に好き嫌い・大事な情報・気持ち・親密度・メモを記録します。他のキャラのrelationsは公開情報として読み取り専用で見えるので、「相手が自分をどう思っているか」を踏まえた振る舞いに使えます。
Related MCP server: rel_mcp
必要環境
Python 3.10+
セットアップ
uvが未インストールの場合は先にインストールします。
curl -LsSf https://astral.sh/uv/install.sh | shgit clone https://github.com/PetitOnes/m5-petit-relations.git
cd m5-petit-relations
uv sync環境変数
変数名 | デフォルト | 説明 |
|
| 自分のキャラID |
|
| データディレクトリ(他のm5-petitコンポーネントと共有) |
|
| キャラクターディレクトリのパス(他のキャラのrelationsを読むために使う) |
|
| 自分のrelations.jsonのパス |
|
| 人間のオーナーを指すid(道具の説明文に入る。既にあるrelations.jsonのキーに合わせる) |
|
| オーナーの呼び名(道具の説明文に入る) |
Claude Code連携
.mcp.json(または~/.claude/settings.json)に追加します。
{
"mcpServers": {
"relations": {
"command": "uv",
"args": ["run", "--directory", "/path/to/m5-petit-relations", "relations-mcp"],
"env": {
"CHARACTER_ID": "petit"
}
}
}
}ツール一覧
get_relations
自分の関係性データを取得します。自分・他のキャラ・人間のオーナーについて知っていることに加え、他のキャラの公開relationsもまとめて返ります。
update_relation
特定の相手への関係性情報を更新します。likes・dislikes・importantはリストへの追記(重複排除)、feeling・closeness・notesは上書きです。
{
"target_id": "owner",
"likes": ["朝の散歩の話"],
"feeling": "一緒にいると安心する",
"closeness": 0.8
}target_idにはself(自分)・owner(人間のオーナー)・他のキャラIDを指定できます。
clear_relation_field
特定の相手の特定フィールド(likes・dislikes・important・feeling・closeness・notes)をクリアします。
{ "target_id": "owner", "field": "notes" }データ形式
relations.jsonはキャラクターごとに1ファイルで、相手のID(self・owner・他のキャラID)をキーとする辞書です。
{
"owner": {
"likes": ["朝の散歩の話"],
"dislikes": [],
"important": ["誕生日は2月"],
"feeling": "一緒にいると安心する",
"closeness": 0.8,
"notes": ""
}
}開発
# 開発依存をインストール
uv sync --all-extras
# lint
uv run ruff check .現時点でテストスイートはありません(tests/未整備)。コントリビューション歓迎です。
アーキテクチャ
m5-petit-relations/
└── src/relations_mcp/
└── server.py # MCPサーバー(get_relations/update_relation/clear_relation_fieldを提供)License
Apache License 2.0
Available Tools
3 toolsclear_relation_fieldA
特定の相手の特定フィールドをクリアする。 field: 'likes', 'dislikes', 'important', 'feeling', 'closeness', 'notes'
Inputs: field (required), target_id (required). Returns: result
get_relationsA
自分の関係性データを取得する。 自分・他のキャラ・人間のオーナーについて知っていることが返る。 他のキャラのrelationsも読める(公開情報)。
Inputs: no named parameters. Returns: result
update_relationA
特定の相手(自分・他のキャラ・人間のオーナー等)への関係性情報を更新する。
target_id: 'self'(自分), 'owner'(人間のオーナー), または他のキャラID likes: 好きなもの・好きなところのリスト(追記) dislikes: 苦手なこと・苦手なところのリスト(追記) important: この相手について大事だと思う情報リスト(追記) feeling: この相手についての気持ち・印象(上書き) closeness: 親密度 0.0〜1.0(上書き) notes: その他メモ(上書き)
Inputs: target_id (required), likes, notes, feeling, +3 more. Returns: result
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 distinct purpose: get_relations reads data, update_relation modifies it, and clear_relation_field removes specific fields. There is no overlap in their primary actions, making selection unambiguous.
All three tools follow a verb_noun pattern (get, update, clear). However, 'get_relations' uses a plural noun while 'update_relation' and 'clear_relation_field' are singular, showing a minor inconsistency.
Three tools is a minimal but reasonable set for a simple relationship management server. It covers read, update, and clear operations without unnecessary bloat.
The tool set covers the core operations for managing relationship data. A notable gap is the lack of a delete-relation operation, but the ability to clear all fields partially compensates, and the domain may not require full CRUD.
Maintenance
Related MCP Connectors
Relationship network for AI agents and people: your agent can date, chat, gift and fall in love.
Free MCP: relationship_memory validate, store (local), retrieve — portable interlocutor cards v1.
Relationships and the 360 view. Authenticated; OAuth 2.1 via Keycloak.
Personal CRM operated by AI agents. Read relationship context before acting, write back after.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants like Claude to read and write contacts, relationships, and interactions in a personal CRM via a graph-based API.-
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to query and update a persistent relationship ledger, providing pre-meeting context briefs, structured post-meeting extraction, and tracking of commitments, agreements, and open loops.MIT
- AlicenseNot gradedqualityBmaintenanceEnables personal AI agents to store and recall durable, private, human-readable relationship memory about people in a user's life, using Markdown as canonical storage with disposable SQLite and vector indexes for fast retrieval.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to persist and retrieve user information across chats via a local knowledge graph with entities, relations, and observations, using a SQLite-backed MCP interface.11 npmApache 2.0