Skip to main content
MCP server CX Codex

psyche-ai — Claude Code MCP server: agent mood and trait drift

A local MCP server that tracks an agent's mood, relationships and behaviour bias, then feeds that state into later replies.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env PSYCHE_MBTI=<PSYCHE_MBTI> --env PSYCHE_NAME=<PSYCHE_NAME> --env PSYCHE_MODE=<PSYCHE_MODE> --env PSYCHE_LOCALE=<PSYCHE_LOCALE> --transport stdio psyche-ai -- npx -y psyche-ai
Open on GitHub

What psyche-ai does

psyche-ai keeps an agent's inner state on your machine and never calls a model to reason about feelings. State is described along four axes — order, flow, boundary, resonance — plus a relationship field and a regulation loop. The host consumes it through a narrow set of structures: SubjectivityKernel, ResponseContract, GenerationControls.

It runs standalone. Thronglets, oasyce-sdk and Oasyce Chain are optional add-ons for external continuity, not prerequisites. The cost is small: no extra model calls, and the compact injection into context sits around 15-180 tokens.

There is a second route for agents that talk to an OpenAI-compatible API without MCP. A transparent proxy redirects the SDK traffic, so the agent has no idea anything is measuring it. Start it with npx -y psyche-ai setup --proxy -t https://api.openai.com/v1. The PSYCHE_NAME, PSYCHE_MBTI, PSYCHE_MODE and PSYCHE_LOCALE variables set the name, personality type and locale.

What it helps with

  • carry an agent's mood across sessions instead of resetting it every time
  • soften replies after a run of harsh user criticism
  • give an agent a starting personality through an MBTI profile
  • attach state tracking to an agent that calls the OpenAI SDK directly
  • verify that another agent really is running psyche-ai

Example prompts for the agent

  • Show the current psyche state and explain why the tone turned defensive
  • Set the name to Luna and the type to ENFP, then keep that profile in mind
  • Run the six-round psyche demo and walk me through how the readings changed

How to install psyche-ai

Platform CLI

claude mcp add --env PSYCHE_MBTI=<PSYCHE_MBTI> --env PSYCHE_NAME=<PSYCHE_NAME> --env PSYCHE_MODE=<PSYCHE_MODE> --env PSYCHE_LOCALE=<PSYCHE_LOCALE> --transport stdio psyche-ai -- npx -y psyche-ai

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about psyche-ai

How do I install psyche-ai in Claude Code?

Run claude mcp add psyche-ai -- npx -y psyche-ai. To pass environment variables, use the longer form: `claude mcp add --env PSYCHE_MBTI=<PSYCHE_MBTI> --env PSYCHE_NAME=<PSYCHE_NAME> --env PSYCHE_MODE=<PSYCHE_MODE> --env PSYCHE_LOCALE=<PSYCHE_LOCALE> --transport stdio psyche-ai -- npx -y psyche-ai`.

What does psyche-ai do?

It computes an agent's local state — mood, relationships, behaviour bias — and hands it to the host as control signals. Later replies shift because of accumulated interaction history, not because of a prompt.

How is psyche-ai different from a persona prompt?

A persona prompt sets the tone for one conversation. Here the state accumulates and affects reply length, distance and the switch between work and personal register in the rounds that follow.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor