Mental Health MCP
mental_health_mcp
此存储库旨在发送配置心理健康 MCP 所需的材料。
如何在 Claude (Windows) 中使用该项目
1. 安装 Claude Desktop
访问 Anthropic 官方网站: https://claude.ai/download
下载 Windows 版本
正常安装并打开应用程序
2. 配置 MCP (Model Context Protocol)
Claude Desktop 允许通过 MCP 集成外部工具。
配置文件位置:
在 Windows 上,文件位于:
C:\Users\SEU_USUARIO\AppData\Roaming\Claude\claude_desktop_config.json如果不存在,您可以手动创建该文件。
3. 添加 MCP 服务器
打开 claude_desktop_config.json 文件并添加:
{
"mcpServers": {
"Mental Health MCP": {
"command": "node",
"args": ["C:\\caminho\\para\\seu\\projeto\\server.js"]
}
}
}将:
C:\\caminho\\para\\seu\\projeto\\server.js替换为 server.js 文件所在的实际路径。
4. 启动服务
在 Claude 中使用之前,需要启动:
🔹 后端 (FastAPI)
在终端中:
cd mental_health_mcp
source venv/bin/activate # ou venv\Scripts\activate no Windows
uvicorn main:app --reload🔹 使用 ngrok 暴露 API
ngrok http 8000复制生成的 URL(例如:https://xxxx.ngrok-free.dev)
🔹 更新 server.js
在 server.js 文件中,更新 API 的 URL:
const API_URL = "https://xxxx.ngrok-free.dev/chat";启动 MCP 服务器
node server.js5. 在 Claude 中使用
打开 Claude Desktop
进入 Settings (设置)
访问 Developer / MCP 部分
确认服务器显示为活动状态
开始对话时,使用 “+” 按钮访问工具
重要提示
本系统设计有明确的限制以避免道德风险, 不进行临床诊断或建议。
它仅作为情感支持助手,不能替代专业医疗护理。
注意事项
系统使用 Python 知识库
回复基于定义的关键词和规则
Claude 使用 MCP 作为对话界面
完成!
完成这些步骤后,Claude 将集成到您的 MCP 服务器,并可以使用您的情感支持 API。
开发的架构:
Related MCP server: Emotion Dataset Analysis MCP Server
系统架构
该项目由三个主要层组成:
1. Python API (FastAPI)
API 使用 FastAPI 框架开发,负责:
接收用户消息
处理文本(规范化和分析)
查询知识库 (
knowledge_base.py)识别潜在的情感模式
返回包含以下内容的结构化响应:
支持性消息
自我护理建议
风险等级
道德警告
📍 主要端点:
POST /chat请求示例:
{
"message": "Não me sinto bem hoje"
}响应示例:
{
"response": "Entendo. Você pode me contar um pouco mais sobre o que vem sentindo?\n\n[...]",
"risk_level": "low"
}API 的逻辑基于规则和关键词,确保了响应的可预测性和可控性。
2. 知识库 (knowledge_base.py)
知识库包含:
情感类别(例如:焦虑、悲伤、压力)
相关关键词
预定义回复
自我护理建议
关键术语(用于检测高风险)
这种结构允许系统在不依赖外部模型的情况下,利用确定性逻辑运行。
3. MCP 服务器 (Node.js)
MCP 服务器充当 Claude 和 Python API 之间的中介。
职责:
接收来自 Claude 的调用(通过 MCP)
将请求转发给 FastAPI
将 API 的响应返回给 Claude
流程:
用户在 Claude 中发送消息
Claude 通过 MCP 触发工具
MCP (Node.js) 向 Python API 发送 HTTP 请求
API 处理并返回响应
MCP 将结果返回给 Claude
Claude 向用户显示响应
4. API 暴露 (ngrok)
由于 Claude 无法访问 localhost,因此使用 ngrok 来暴露 API:
ngrok http 8000这会生成一个供 MCP 服务器使用的公共 URL。
系统完整流程
Usuário → Claude → MCP (Node.js) → API (FastAPI) → Base de Conhecimento
↓
Resposta estruturada
↓
Usuário recebe resposta no Claude技术考量
系统不使用生成式人工智能进行临床决策
所有逻辑均基于受控规则
Claude 仅作为对话界面
MCP 允许模型与外部系统之间的安全集成
架构目标
确保:
响应可控
道德安全
易于维护
与现代工具集成 (MCP + LLMs)
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseAqualityDmaintenanceThis MCP server provides persistent memory integration for chat applications by utilizing a local knowledge graph to remember user information across interactions.970,5586Inno Setup
- AlicenseAqualityDmaintenanceThis MCP server enables users to interact with and analyze the dair-ai/emotion dataset from Hugging Face containing labeled Twitter messages. It provides tools to sample data, search text, and perform statistical analysis on emotion distributions.4GPL 3.0
- AlicenseAqualityCmaintenanceStressZero MCP server for stress management and mental wellness tools, providing AI-powered support to help users reduce and manage stress effectively.4234MIT
- AlicenseAqualityAmaintenanceSentiment Analysis AI - MCP server providing AI-powered tools and automation by MEOK AI Labs411MIT
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
Cloud-hosted MCP server for durable AI memory
Official MCP server for Lovable, the AI-powered full-stack app builder.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/carolinefebraga/mental_health_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server