nefesh-mcp-server
The Nefesh MCP Server gives AI agents real-time awareness of human physiological and emotional states, enabling adaptive, context-aware behavior based on biometric and behavioral signals.
Get Human State (
get_human_state): Retrieve the current unified stress state (calm/relaxed/focused/stressed/acute_stress), a stress score (0–100), a confidence rating, and a suggested machine-readable action (e.g.,maintain_engagement,simplify_and_focus,de-escalate_and_shorten,pause_and_ground). On the 2nd+ call, also receive adaptation effectiveness feedback showing whether the previous action reduced or worsened stress (stress_deltaandeffectiveboolean).Ingest Biometric Signals (
ingest): Send 30+ sensor signals (heart rate, HRV/RMSSD, EDA, SpO2, EEG bands, vocal tone, facial expression, text sentiment, glucose, respiratory rate, sleep stage, etc.) and receive a fused unified human state in return. Includingsubject_id,user_message, andai_responseenables cross-session trigger memory tracking.Get Trigger Memory (
get_trigger_memory): Retrieve a cross-session psychological trigger profile identifying which conversation topics consistently cause stress (active triggers) vs. those resolved over time, with observation counts, average/peak scores, and timestamps.Get Session History (
get_session_history): Fetch a timestamped history of stress scores, states, and heart rate readings for a session, with a configurable lookback window (up to 60 minutes) and an overall trend indicator (rising/falling/stable).Autonomous API Provisioning: AI agents can self-provision free API keys (1,000 calls/month, no credit card required) via email verification without manual signup.
Multi-Protocol Support: Works with both Model Context Protocol (MCP) for tool-calling and Agent-to-Agent (A2A) protocol for peer-to-peer communication.
Privacy-Focused: Edge processing with no video/audio uploads; GDPR/BIPA compliant with cascading deletion capabilities.
Enables Amazon Kiro to access real-time human physiological state data, stress scores, and adaptation effectiveness feedback for context-aware AI interactions.
Integrates with the Windsurf editor to provide AI agents with unified human state awareness, including stress levels and suggested actions for response adaptation.
Allows AI agents within JetBrains IDEs to query human physiological state, track psychological triggers, and adapt interactions based on stress scores and session history.
Enables the OpenAI Codex CLI to ingest biometric signals and retrieve human state data with adaptation effectiveness metrics for stress-aware coding assistance.
Integrates with Replit to provide physiological state awareness and trigger memory capabilities to agents running in Replit environments.
Nefesh MCP + A2A Server
A Model Context Protocol and Agent-to-Agent (A2A) server that gives AI agents real-time awareness of human physiological state.
What it does
Send sensor data (heart rate, voice, facial expression, text sentiment), get back a unified state with a machine-readable action your agent can follow directly. Zero prompt engineering required.
On the 2nd+ call, the response includes adaptation_effectiveness — telling your agent whether its previous approach actually worked. A closed-loop feedback system for self-improving agents.
Related MCP server: synapsen-mcp
Adaptation Effectiveness (Closed-Loop)
Most APIs give you a state. Nefesh tells you whether your reaction to that state actually worked.
On the 2nd+ call within a session, every response includes:
{
"state": "focused",
"stress_score": 45,
"suggested_action": "simplify_and_focus",
"adaptation_effectiveness": {
"previous_action": "de-escalate_and_shorten",
"previous_score": 68,
"current_score": 45,
"stress_delta": -23,
"effective": true
}
}Your agent can read effective: true and know its previous de-escalation worked. If effective: false, the agent adjusts its strategy. No other human-state system provides this feedback loop.
Setup
Option A: Connect first, get a key through your agent (fastest)
Add the config without an API key — your agent will get one automatically.
{
"mcpServers": {
"nefesh": {
"url": "https://mcp.nefesh.ai/mcp"
}
}
}Then ask your agent:
"Get me a free Nefesh API key using my email address"
The agent calls request_api_key → you click one email link → the agent picks up the key. No signup form, no manual copy-paste. After that, add the key to your config for future sessions:
{
"mcpServers": {
"nefesh": {
"url": "https://mcp.nefesh.ai/mcp",
"headers": {
"X-Nefesh-Key": "nfsh_free_..."
}
}
}
}Option B: Get a key first, then connect
Sign up at nefesh.ai/signup (1,000 calls/month, no credit card), then add the config with your key:
{
"mcpServers": {
"nefesh": {
"url": "https://mcp.nefesh.ai/mcp",
"headers": {
"X-Nefesh-Key": "YOUR_API_KEY"
}
}
}
}Agent-specific config files
Agent | Config file |
Cursor |
|
Windsurf |
|
Claude Desktop |
|
Claude Code |
|
VS Code (Copilot) |
|
Cline |
|
Continue.dev |
|
Roo Code |
|
Kiro (Amazon) |
|
OpenClaw |
|
JetBrains IDEs | Settings > Tools > MCP Server |
Zed |
|
OpenAI Codex CLI |
|
Goose CLI |
|
ChatGPT Desktop | Settings > Apps > Add MCP Server (UI) |
Gemini CLI | Settings (UI) |
Augment | Settings Panel (UI) |
Replit | Integrations Page (web UI) |
LibreChat |
|
{
"servers": {
"nefesh": {
"type": "http",
"url": "https://mcp.nefesh.ai/mcp",
"headers": {
"X-Nefesh-Key": "<YOUR_API_KEY>"
}
}
}
}{
"context_servers": {
"nefesh": {
"settings": {
"url": "https://mcp.nefesh.ai/mcp",
"headers": {
"X-Nefesh-Key": "<YOUR_API_KEY>"
}
}
}
}
}[mcp_servers.nefesh]
url = "https://mcp.nefesh.ai/mcp"mcpServers:
- name: nefesh
type: streamable-http
url: https://mcp.nefesh.ai/mcpAll agents connect via Streamable HTTP — no local installation required.
A2A Integration (Agent-to-Agent Protocol v1.0)
Nefesh is also available as an A2A-compatible agent. While MCP handles tool-calling (your agent calls Nefesh), A2A enables agent-collaboration — other AI agents can communicate with Nefesh as a peer.
Agent Card: /.well-known/agent-card.json
A2A Endpoint: POST https://mcp.nefesh.ai/a2a (JSON-RPC 2.0)
A2A Skill | Description |
| Stress state (0-100), suggested_action, adaptation_effectiveness |
| Send biometric signals, receive unified state |
| Psychological trigger profile (active vs resolved) |
| Timestamped history with trend |
Same authentication as MCP — X-Nefesh-Key header or Authorization: Bearer token. Free tier works on both protocols.
Source: nefesh-ai/nefesh-a2a · Docs: nefesh.ai/docs/a2a
MCP Tools
Tool | Auth | Description |
| No | Request a free API key. You MUST ask the user for their real email first. Do not invent or guess emails. The user receives a verification link they must click. Poll with |
| No | Poll for API key activation using the same email the user provided. Returns |
| Yes | Get stress state (0-100), |
| Yes | Send biometric signals (heart rate, HRV, voice tone, expression, sentiment, 30+ fields) and get unified state back. Include |
| Yes | Get psychological trigger profile — which topics cause stress (active) and which have been resolved over time. |
| Yes | Get timestamped state history with trend (rising/falling/stable). |
How self-provisioning works
Your AI agent can get a free API key autonomously. You only click one email link.
Agent asks you: "What is your email address?"
Agent calls
request_api_key(your_real_email). No API key needed for this call.You receive a verification email and click the link
Agent polls
check_api_key_status(your_real_email)every 10 secondsOnce verified, the agent receives the API key and can use all other tools
Important: The agent must use your real, accessible email address. Disposable emails are blocked. The verification link must be clicked by you to activate the key.
Free tier: 1,000 calls/month, all signal types, 10 req/min. No credit card.
Quick test
After adding the config, ask your AI agent:
"What tools do you have from Nefesh?"
It should list the 6 tools above.
Pricing
Plan | Price | API Calls |
Free | $0 | 1,000/month, no credit card |
Solo | $25/month | 50,000/month |
Enterprise | Custom | Custom SLA |
CLI Alternative
Prefer the terminal over MCP? Use the Nefesh CLI (10-32x lower token cost than MCP for AI agents):
npm install -g @nefesh/cli
nefesh ingest --session test --heart-rate 72 --tone calm
nefesh state test --jsonGitHub: nefesh-ai/nefesh-cli
Gateway Alternative
Want the AI to adapt automatically? Use the Nefesh Cognitive Compute Router. Change your LLM base URL to gateway.nefesh.ai and the gateway adjusts system prompt and temperature based on biometric state. Three modes: OpenAI-compatible (/v1/chat/completions), Anthropic passthrough (/v1/messages), and Unified Anthropic for any backend. Zero code changes.
GitHub: nefesh-ai/nefesh-gateway
Human State Protocol (HSP)
Nefesh implements and maintains the Human State Protocol, an open specification for exchanging human physiological state between AI systems. HSP defines a standard JSON format for stress scores, behavioral recommendations, and adaptation feedback so any agent can produce or consume human state data interoperably. Apache 2.0.
GitHub: nefesh-ai/human-state-protocol · Docs: nefesh.ai/docs/hsp
Documentation
Privacy
No video or audio uploads — edge processing runs client-side
No PII stored
GDPR/BIPA compliant — cascading deletion via
delete_subjectNot a medical device — for contextual AI adaptation only
License
MIT — see LICENSE.
Available Tools
6 toolscheck_api_key_statusA
Check the status of a pending API key request.
Use the exact same email the user provided to request_api_key.
Poll this every 10 seconds. Once the user clicks the verification
link in their inbox, status changes from 'pending' to 'ready'
and the response includes the API key.
Inputs: email (required).
get_human_stateA
Get current unified human state for a session. Call this before generating important responses.
Returns:
- state: calm | relaxed | focused | stressed | acute_stress
- stress_score: 0-100 (lower = calmer)
- confidence: 0.0-1.0 (based on signal quality and device type)
- suggested_action: maintain_engagement | simplify_and_focus | de-escalate_and_shorten | pause_and_ground
- action_reason: human-readable explanation of why this action was suggested
- adaptation_effectiveness (on 2nd+ call): shows whether your previous suggested_action actually reduced stress — contains previous_action, stress_delta, and effective boolean. Use this to self-improve.
Use suggested_action to adapt your response: calm/relaxed = full complexity, focused = shorter and structured, stressed = max 2 sentences, acute_stress = one grounding sentence only.
Requires a prior ingest call to have data. Not a medical device.
Inputs: session_id (required).
get_session_historyA
Get state history for a session over time.
Returns timestamped datapoints with stress_score, state, and heart_rate for each observation.
Includes an overall trend: rising | falling | stable.
Use minutes parameter to control the lookback window (default: 5, max: 60).
Useful for detecting stress patterns during a conversation. Not a medical device.
Inputs: session_id (required), minutes.
get_trigger_memoryA
Retrieve psychological trigger profile for a subject.
Returns which conversation topics consistently cause stress (active triggers) and which have been resolved over time.
- active triggers: topics where stress was elevated across multiple sessions. Tread carefully.
- resolved triggers: topics where stress has decreased. Safe to explore deeper.
Each trigger includes observation_count, avg_score, peak_score, and last_seen.
Requires prior ingest calls with the same subject_id. Not a medical device.
Inputs: subject_id (required).
ingestA
Send biometric signals from any sensor, get unified state back.
Required: session_id + timestamp (ISO 8601) + at least one signal.
Send whatever you have — the API fuses all signals into one state.
Common signals (highest impact):
- heart_rate (bpm, 30-220) + rmssd (ms) — cardiovascular
- tone: calm | tense | anxious | hostile — vocal
- sentiment: -1.0 to 1.0 — textual
- expression: relaxed | neutral | tense — visual
For trigger memory (cross-session psychological tracking):
- Include subject_id (consistent per user, hashed)
- Include user_message + ai_response to detect stress topics
Returns same fields as get_human_state plus signals_received list and topics_detected.
source_device is optional but improves confidence scoring. Not a medical device.
Inputs: timestamp (required), session_id (required), eda, gaze, +33 more.
request_api_keyA
Request a free Nefesh API key. No existing key needed.
IMPORTANT: You MUST ask the user for their real email address before
calling this tool. Do NOT invent, guess, or generate an email address.
The user will receive a verification link they must click to activate
the key. Without clicking that link, no API key will be issued.
Disposable or temporary email services are blocked.
Example prompt to the user: "What is your email address? You will
receive a verification link to activate your free API key."
Flow: call this with the user's real email, then poll
check_api_key_status every 10 seconds until status is 'ready'.
Free tier: 1,000 API calls/month, no credit card required.
Inputs: email (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clear distinct role: ingest submits data, get_human_state reads current state, get_trigger_memory and get_session_history cover long-term and recent context, and the two API key tools handle onboarding. Even where get_human_state and ingest both return state-like data, their write/read purposes are explicitly separated by the descriptions.
Most tools follow a verb_noun snake_case pattern (get_human_state, get_trigger_memory, get_session_history, request_api_key, check_api_key_status). The one outlier is 'ingest', which is a bare verb rather than verb_noun, but it is still lowercase and style-consistent. This is a minor deviation rather than a mixed-convention problem.
Six tools is a well-scoped count for a specialized server. Two focus on API key access and four cover the core state/ingest/history/memory workflows, with no redundant helpers or unnecessary bulk. The count feels right for both the domain and the agents that would consume it.
The core workflow is covered: send signals, check current human state, pull session history, and retrieve trigger memory. The primary gaps are not fatal—there is no way to enumerate known sessions/subjects or revoke an API key—but those are auxiliary management features rather than dead ends in the primary state-tracking workflow.
Maintenance
Related MCP Connectors
16 AI-native tools with dual SSE + streamable-http transport. Free tier available.
ERC-8004 agent identity, on-chain subscriptions, reputation, A2A tasks and chat over 53 tools.
Agent-native video API: create live video sessions, mint restricted app keys and verify recorded camera and mic media. No sign-in needed to connect and browse: initialize, tools/list, resources/list and ping work without a token, so clients can show every tool straight away. Tool calls need OAuth 2.1 sign-in or a Synento API key.
AI Agent Utility Layer for agent safety, web monitoring, crypto research and tool discovery.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceExposes personal health data (recovery, sleep, strain, etc.) as MCP tools for AI agents to query and analyze.5MIT
- AlicenseBqualityBmaintenanceEnables AI agents to share a homeostatic internal state across process and session boundaries, with tools to read, modify, and explain the state based on simulated neurotransmitter dynamics.71PolyForm Noncommercial 1.0.0
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to query a user's WHOOP recovery, sleep, HRV, strain, workouts and body measurements through 16 read-only tools, including today's status, personal baselines, sleep debt, trends and period comparisons. Runs locally, requires no data exports, and supports aggregate mode that limits responses to high-level summaries.14 npm-
- AlicenseNot gradedqualityCmaintenanceExposes wellness data such as sleep, activity, heart rate, and stress as MCP tools so AI agents can retrieve current vitals, pull historical records, and analyze trends. Supports simulated physiology along with Fitbit and planned Apple Health providers.MIT