Mental Health MCP
mental_health_mcp
Этот репозиторий предназначен для отправки материалов, необходимых для настройки mental health 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 необходимо запустить:
🔹 Backend (FastAPI)
В терминале:
cd mental_health_mcp
source venv/bin/activate # ou venv\Scripts\activate no Windows
uvicorn main:app --reload🔹 Публикация API через ngrok
ngrok http 8000Скопируйте сгенерированный URL (например, https://xxxx.ngrok-free.dev)
🔹 Обновление server.js
В файле server.js обновите URL API:
const API_URL = "https://xxxx.ngrok-free.dev/chat";Запуск MCP Server
node server.js5. Использование в Claude
Откройте Claude Desktop
Перейдите в Settings (Настройки)
Перейдите в раздел Developer / MCP
Убедитесь, что сервер отображается как активный
При начале разговора используйте кнопку "+" для доступа к инструменту
Важное предупреждение
Эта система была разработана с намеренными ограничениями для предотвращения этических рисков, она не ставит диагнозы и не дает клинических рекомендаций.
Она действует только как помощник для эмоциональной поддержки и не заменяет профессиональное наблюдение.
Примечания
Система использует базу знаний на Python
Ответы основаны на ключевых словах и заданных правилах
Claude выступает в качестве разговорного интерфейса с использованием MCP
Готово!
После выполнения этих шагов Claude будет интегрирован с вашим MCP-сервером и сможет использовать ваш API эмоциональной поддержки.
Разработанная архитектура:
Related MCP server: Emotion Dataset Analysis MCP Server
Архитектура системы
Проект состоит из трех основных уровней:
1. API на Python (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 и API на Python.
Обязанности:
Получение вызовов от Claude (через MCP)
Пересылка запросов к API FastAPI
Возврат ответа API в Claude
Поток:
Пользователь отправляет сообщение в Claude
Claude активирует инструмент через MCP
MCP (Node.js) отправляет HTTP-запрос к API Python
API обрабатывает и возвращает ответ
MCP возвращает результат в Claude
Claude отображает ответ пользователю
4. Публикация API (ngrok)
Поскольку Claude не имеет доступа к localhost, для публикации API был использован ngrok:
ngrok http 8000Это генерирует публичный URL, который используется MCP-сервером.
Полный поток системы
Usuário → Claude → MCP (Node.js) → API (FastAPI) → Base de Conhecimento
↓
Resposta estruturada
↓
Usuário recebe resposta no ClaudeТехнические соображения
Система не использует генеративный искусственный интеллект для принятия клинических решений
Вся логика основана на контролируемых правилах
Claude выступает только как разговорный интерфейс
MCP обеспечивает безопасную интеграцию между моделью и внешними системами
Цель архитектуры
Обеспечить:
контроль ответов
этическую безопасность
простоту обслуживания
интеграцию с современными инструментами (MCP + LLM)
Available Tools
1 toolmental_health_helperD
Assistente de apoio emocional
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. The description 'Assistente de apoio emocional' gives no insight into the tool's behavior: it doesn't indicate whether this is a read-only or mutating operation, what kind of response to expect, whether it requires authentication, any rate limits, or potential side effects. For a tool with zero annotation coverage, this is a complete lack of transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise—a single Portuguese phrase—but this brevity comes at the cost of being under-specified rather than efficient. While it's front-loaded (the entire description is one phrase), it fails to convey necessary information. Conciseness should not sacrifice clarity; here, the description is too sparse to be helpful.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (a mental health tool with no annotations, no output schema, and 1 undocumented parameter), the description is completely inadequate. It doesn't explain what the tool does, how to use it, what behavior to expect, or what the parameter means. For a tool that could involve sensitive emotional interactions, this lack of context is particularly problematic and fails to meet minimum viability.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 1 parameter with 0% description coverage, meaning the schema provides no documentation for the 'message' parameter. The description adds no information about parameters—it doesn't explain what the 'message' should contain (e.g., 'a user's emotional query', 'a description of feelings'), its format, or examples. With low schema coverage and no compensation from the description, parameters remain entirely undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Assistente de apoio emocional' (Emotional support assistant) is a tautology that essentially restates the tool name 'mental_health_helper' in Portuguese. It doesn't specify what action the tool performs (e.g., 'provides emotional support responses', 'analyzes emotional state', 'offers coping strategies') or what resource it operates on. While it hints at the domain (emotional support), the purpose remains vague and lacks a clear verb+resource combination.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool. It doesn't specify the context (e.g., 'when a user expresses emotional distress', 'for general mental health queries'), mention any prerequisites, or differentiate it from alternatives (though there are no sibling tools, it still fails to define its scope). Without any usage context, the agent has no basis for deciding when to invoke this tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- First observed
mental_health_helper
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'mental_health_helper' has a distinct and clear purpose as an emotional support assistant.
The single tool name 'mental_health_helper' follows a clear and consistent pattern with snake_case and a descriptive noun_verb structure. With only one tool, naming consistency is inherently perfect.
A single tool is too few for a server named 'Mental Health MCP', which suggests a broad domain. While the tool description indicates emotional support, the scope feels thin, lacking coverage for other potential mental health aspects like resources, assessments, or tracking.
The tool set is severely incomplete for a mental health domain. It only provides emotional support assistance, with obvious gaps such as accessing mental health resources, self-assessment tools, crisis management, or progress tracking, which are common in this context.
Maintenance
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Cloud-hosted MCP server for durable AI memory
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.9231,505 npm6MIT
- 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.435 npmMIT
- AlicenseAqualityBmaintenanceSentiment Analysis AI - MCP server providing AI-powered tools and automation by MEOK AI Labs44 npm53 PyPIMIT