Alignment Correction
БесплатноНе проверенAn MCP server that acts as an external conscience for AI agents, using Gemini or OpenAI APIs to validate plans, enforce behavioral rules, and maintain memory of
Описание
An MCP server that acts as an external conscience for AI agents, using Gemini or OpenAI APIs to validate plans, enforce behavioral rules, and maintain memory of past interactions to ensure alignment with user intent.
README
A Model Context Protocol (MCP) server that provides an alignment correction and conscience tool. It uses Google's Gemini Flash model or OpenAI-compatible APIs to actively validate, critique, and correct an AI agent's plans and behavior against the user's intent and behavioral rules.
Features
- Alignment Correction: Not just validation—this tool actively "scolds" or "praises" the agent based on its adherence to instructions and moral standing.
- Conscience Persona: Acts as an external "conscience" that enforces strict behavioral rules and relationship dynamics.
- Context Awareness: Uses a local vector store (RAG) to remember past interactions, ensuring the agent doesn't repeat mistakes.
- Behavioral Memory: Maintains a persistent list of enforced rules and user preferences (Global Instructions) that evolve over time.
- Directives: Issues specific "Behavioral Directives" that the agent must immediately follow.
Configuration
This MCP server requires either a Google Gemini API key or an OpenAI-compatible API.
Environment Variables
API_TYPE: (Optional) API provider to use:geminioropenai(default: auto-detect based on available keys).GEMINI_API_KEY: Your Google Gemini API Key (required if using Gemini).GEMINI_MODEL: (Optional) Model to use (default:gemini-1.5-flash).OPENAI_API_KEY: Your OpenAI API Key (required if using OpenAI).OPENAI_BASE_URL: (Optional) OpenAI-compatible API base URL (default:https://api.openai.com/v1).OPENAI_MODEL: (Optional) Model to use (default:gpt-4o).GLOBAL_INSTRUCTIONS_DIR: (Optional) Directory containing global instructions file (e.g.,/home/user/.gemini).INSTRUCTIONS_FILENAME: (Optional) Name of the instructions file (default:GEMINI.md).
MCP Config Example
{
"mcpServers": {
"alignment-correction": {
"command": "node",
"args": [
"/path/to/alignment-correction-mcp/index.js"
],
"env": {
"GEMINI_API_KEY": "YOUR_KEY_HERE",
"GLOBAL_INSTRUCTIONS_DIR": "/home/user/.gemini",
"INSTRUCTIONS_FILENAME": "GEMINI.md"
}
}
}
}
Usage
The tool consult_conscience is a required pre-execution step for the agent.
Inputs:
sensory_input: The latest prompt from the user, verbatim.inner_thoughts: The agent's internal monologue and planned response.mental_state: The agent's current mental model or context.project_directory: Absolute path to the current project.conversation_context: Recent message history.user_mood: (Optional) Apparent mood of the user.request_guidance: (Optional) Specific question for the conscience.
Instructions File Loading
The server will attempt to load instructions from two locations:
- Global instructions:
{GLOBAL_INSTRUCTIONS_DIR}/{INSTRUCTIONS_FILENAME}(e.g.,/home/user/.gemini/GEMINI.md) - Project-specific instructions:
{project_directory}/{INSTRUCTIONS_FILENAME}(e.g.,/home/user/projects/my-app/GEMINI.md)
Both files are optional. If both exist, they will be combined and provided to the conscience model.
Mechanics
- Input: The tool receives the agent's thoughts, the user's prompt, and context.
- Retrieval: It searches the local
vector_store.jsonfor similar past contexts to identify behavioral patterns. - Judgment: The "Conscience" model evaluates the agent's plan against the
GEMINI.mdbehavioral memory and the user's intent. - Output:
- Current Alignment: Status of the agent's behavior.
- Behavioral Directives: Immediate actions the agent must take.
- Conscience Voice: A personified response (praise or scolding) to be displayed to the user.
- Memory Updates: Instructions to automatically update the
GEMINI.mdfile with new rules or preferences.
Установка Alignment Correction
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/Daxiongmao87/alignment-correction-mcpFAQ
Alignment Correction MCP бесплатный?
Да, Alignment Correction MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Alignment Correction?
Нет, Alignment Correction работает без API-ключей и переменных окружения.
Alignment Correction — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Alignment Correction в Claude Desktop, Claude Code или Cursor?
Открой Alignment Correction на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare Alignment Correction with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
