psychology-agent-mcp-server

v3.0.2
psychology-agent-mcp-server Checked 2 days ago Published 1 month ago

Methodology-driven psychology analysis tools exposed as an MCP Server.

A runnable MCP Server that exposes the Psychology Agent Skill as structured tools. Current implementation targets the official MCP TypeScript SDK v2 stable line. The official SDK documentation states that v2 implements the 2026-07-28 protocol revision; stdio is intended for local spawned processes and Streamable HTTP for remote/server integrations. The package is published as psychology-agent-mcp-server and exposes a psychology-agent-mcp bin.

Summary extracted from the README.

Psychology Agent MCP Server v3.0.2

A runnable MCP Server that exposes the Psychology Agent Skill as structured tools.

Current implementation targets the official MCP TypeScript SDK v2 stable line. The official SDK documentation states that v2 implements the 2026-07-28 protocol revision; stdio is intended for local spawned processes and Streamable HTTP for remote/server integrations.

Quick start (npx)

The package is published as psychology-agent-mcp-server and exposes a psychology-agent-mcp bin.

# stdio (default — what MCP clients spawn)
npx -y psychology-agent-mcp-server

# Streamable HTTP
MCP_PORT=3333 MCP_AUTH_TOKEN=change-me npx -y psychology-agent-mcp-server -- --http

--help lists available flags.

Requirements

  • Node.js 20+
  • npm

Install from source

Dependency note: @modelcontextprotocol/server and @modelcontextprotocol/client are 2.3.1, while the Node adapter is intentionally pinned to 2.1.1. The official 2.3.1 release notes state that @modelcontextprotocol/node was unchanged.

cd mcp-server
npm install
npm run build       # tsc + shebang/chmod post-step

Run locally over stdio

npm run dev:stdio          # tsx (no build needed)
# or against compiled output
npm run start:stdio

Run Streamable HTTP

Windows PowerShell:

$env:MCP_AUTH_TOKEN="change-me"
$env:MCP_HOST="127.0.0.1"
$env:MCP_PORT="3333"
npm run dev:http

Endpoint:

http://127.0.0.1:3333/mcp

Health check:

http://127.0.0.1:3333/health

MCP clients

Claude Code / compatible JSON config (stdio via npx)

{
  "mcpServers": {
    "psychology-agent": {
      "command": "npx",
      "args": ["-y", "psychology-agent-mcp-server"]
    }
  }
}

Local install / source build

{
  "mcpServers": {
    "psychology-agent": {
      "command": "node",
      "args": ["/ABS/PATH/psychology-agent-skill-v3.0.2/mcp-server/dist/src/stdio.js"]
    }
  }
}

Remote Streamable HTTP

Use the MCP client's HTTP transport and point it at /mcp. Set Authorization: Bearer <MCP_AUTH_TOKEN> if MCP_AUTH_TOKEN is set on the server.

Tools

  • analyze_emotion
  • run_cbt
  • analyze_motivation
  • analyze_attachment
  • analyze_personality
  • score_scale
  • run_intervention
  • get_profile
  • analyze_trend

Publishing

npm login
npm publish --access public

prepublishOnly runs build and test automatically. prepare builds on npm install so consumers get a populated dist/.

The npm tarball is restricted via the files field to dist/src, README.md, and LICENSE — src/, test/, tsconfig.json, node_modules/, and .env* are not shipped.

Design rule

The server deliberately does not call an LLM. It performs method/rule/scoring operations and returns structured evidence and metadata. The host Agent supplies the conversational reasoning layer.

This makes the server suitable for a black-box service model: users can consume the capability without receiving the full internal method implementation.

Data

When PSY_STORE_PATH is set, v3 stores lightweight JSON state. For production, replace PsychologyStore with an encrypted database adapter and implement retention/deletion/audit policy before handling sensitive mental-health data.