Alignment Forum Server
БесплатноНе проверенEnables semantic search and retrieval of AI alignment articles from Alignment Forum and LessWrong, allowing users to explore research and discover unknown unkno
Описание
Enables semantic search and retrieval of AI alignment articles from Alignment Forum and LessWrong, allowing users to explore research and discover unknown unknowns through natural language queries.
README
An MCP (Model Context Protocol) server that provides access to alignment-related posts from LessWrong and Alignment Forum. This server acts as a research mentor, helping you quickly understand AI alignment concepts and discover unknown unknowns through semantic search and content retrieval.
Features
- Semantic Search: Search through 60+ alignment posts using natural language queries
- Recent Posts: Browse the latest alignment research chronologically
- Full Article Access: Retrieve complete article content including HTML, metadata, and images
- Daily Updates: Automatically syncs with LessWrong via GitHub Actions
- Efficient Storage: CSV-based approach with plaintext descriptions
- High-Quality Content: Includes major works by Eliezer Yudkowsky, Paul Christiano, Nate Soares, and others
Quick Start (Recommended)
The easiest way to use this MCP server is with the hosted deployment. Just add this to your Claude Desktop config:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"alignment-forum": {
"url": "https://alignmentforum.fastmcp.app/mcp",
"transport": "sse"
}
}
}
Then completely quit and restart Claude Desktop. That's it! You can now search and read Alignment Forum posts directly in Claude.
Local Installation (Optional)
Prerequisites
- Python 3.10 or higher
- pip or uv package manager
Setup
Clone the repository:
cd ~/Github git clone https://github.com/YOUR_USERNAME/mcp-alignmentforum.git cd mcp-alignmentforumInstall dependencies:
pip install -e .Or using
uv(recommended):uv pip install -e .Update configuration:
- Edit
src/mcp_alignmentforum/server.py - Replace
YOUR_USERNAMEwith your GitHub username in the CSV_URL constant
- Edit
Run initial data collection (optional):
export OPENROUTER_API_KEY="your-api-key-here" python scripts/update_posts.py
Testing the Server
Before configuring Claude Desktop, you can test the MCP server using the MCP Inspector:
# Test remote server (recommended)
npx @modelcontextprotocol/inspector sse \
https://alignmentforum.fastmcp.app/mcp
# Test local server
npx @modelcontextprotocol/inspector \
/usr/local/bin/uv \
--directory /Users/ram/Github/mcp-alignmentforum \
run \
mcp-alignmentforum
This will:
- Start the MCP server
- Open a web interface at
http://localhost:5173 - Allow you to interactively test all three tools:
search_posts- Semantic search through alignment postslist_recent_posts- Browse recent posts chronologicallyfetch_article_content- Get full article content
Usage with Claude Desktop
Remote Server (Recommended)
See the Quick Start section above to use the hosted deployment at https://alignmentforum.fastmcp.app/mcp.
Local Server (Advanced)
If you've installed the server locally, add the following to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"alignment-forum": {
"command": "/usr/local/bin/uv",
"args": [
"--directory",
"/Users/ram/Github/mcp-alignmentforum",
"run",
"mcp-alignmentforum"
]
}
}
}
Note: Replace /Users/ram/Github/mcp-alignmentforum with the actual path to your cloned repository.
Restart Claude Desktop
After updating the configuration, completely quit and restart Claude Desktop for the changes to take effect.
Remote Deployment (Railway)
Note: A public deployment is already available at https://alignmentforum.fastmcp.app/mcp (see Quick Start). The instructions below are for deploying your own custom instance.
Deploy to Railway
Or manually deploy:
Push your code to GitHub (if not already done)
Create a new project on Railway:
- Go to railway.app
- Click "New Project"
- Select "Deploy from GitHub repo"
- Choose
mcp-alignmentforum
Railway will automatically:
- Detect the Dockerfile
- Install dependencies from
pyproject.toml - Start the server using the Procfile
- Assign a public URL (e.g.,
https://your-app.railway.app)
Get your deployment URL:
- Go to your Railway project settings
- Copy the public domain URL
- Your SSE endpoint will be:
https://your-app.railway.app/mcp
Use Custom Remote Deployment in Claude Desktop
Update your Claude Desktop config to use your custom deployment:
{
"mcpServers": {
"alignment-forum-custom": {
"url": "https://your-app.railway.app/mcp",
"transport": "sse"
}
}
}
Replace your-app.railway.app with your actual Railway deployment URL.
Environment Variables (Optional)
Railway deployment doesn't require any environment variables, but you can add:
PORT- Railway sets this automatically (default: 8000)HOST- Defaults to0.0.0.0
Monitoring
- Railway Dashboard: Monitor logs, metrics, and deployments
- Health Check: Railway automatically checks
/endpoint - Auto-deploy: Pushes to GitHub automatically trigger redeployments
Available MCP Tools
1. search_posts
Search through Alignment Forum posts using natural language queries with semantic search.
Parameters:
query(string, required): Natural language search query (e.g., "mesa-optimization risks")limit(integer, optional): Maximum results to return (default: 20, max: 100)offset(integer, optional): Results to skip for pagination (default: 0)
Returns: JSON object with matching posts and similarity scores
Example usage in Claude:
Search for posts about mesa-optimizers and inner alignment
Find articles discussing deceptive alignment
2. list_recent_posts
List recent Alignment Forum posts in chronological order (newest first).
Parameters:
limit(integer, optional): Maximum results to return (default: 20, max: 100)offset(integer, optional): Results to skip for pagination (default: 0)
Returns: JSON object with posts array and pagination info
Example usage in Claude:
Show me the 10 most recent alignment forum posts
What are the latest posts on the alignment forum?
3. fetch_article_content
Fetch the full content of a specific Alignment Forum article.
Parameters:
post_id(string, required): The post ID (_idfield) or slug from the databaseurl(string, optional): Direct URL to the post (used as fallback)
Returns: Complete article with HTML content, metadata, and statistics
Example usage in Claude:
Fetch the full article content for post ID abc123xyz456789ab
Get the complete text of the article with slug "risks-from-learned-optimization"
Daily Updates
GitHub Actions Workflow
The repository includes a GitHub Actions workflow that automatically updates the CSV file daily:
- Schedule: 3:47 AM UTC every day
- Manual trigger: Can be run manually from the Actions tab
Setup for Automated Updates
Go to your GitHub repository settings → Secrets and variables → Actions
Add a new secret:
- Name:
OPENROUTER_API_KEY - Value: Your OpenRouter API key from https://openrouter.ai/
- Name:
Enable GitHub Actions:
- Go to the "Actions" tab
- Enable workflows if prompted
The workflow will:
- Fetch all posts from Alignment Forum
- Generate summaries using OpenRouter (or use fallback descriptions)
- Write to
data/alignment-forum-posts.csv - Commit and push changes
Development
Project Structure
mcp-alignmentforum/
├── README.md # This file
├── pyproject.toml # Python project configuration
├── .gitignore # Git ignore rules
├── src/
│ └── mcp_alignmentforum/
│ ├── __init__.py # Package initialization
│ └── server.py # MCP server with 3 tools
├── scripts/
│ └── update_posts.py # Daily update script
├── data/
│ ├── .gitkeep # Track directory in git
│ └── alignment-forum-posts.csv # Generated by GitHub Actions
└── .github/
└── workflows/
└── update-posts.yml # Daily GitHub Actions workflow
Running Locally
Start the MCP server:
python src/mcp_alignmentforum/server.py
The server will run on stdio and wait for MCP protocol messages.
Run the update script:
# Without OpenRouter (uses plaintext descriptions)
python scripts/update_posts.py
# With OpenRouter (generates AI summaries)
export OPENROUTER_API_KEY="your-key"
python scripts/update_posts.py
Testing
You can test the GraphQL queries directly at: https://www.alignmentforum.org/graphiql
Code Quality
# Install dev dependencies
pip install -e ".[dev]"
# Format code
black src/ scripts/
# Lint code
ruff check src/ scripts/
# Type check
mypy src/
API Details
Alignment Forum GraphQL API
- Endpoint:
https://www.alignmentforum.org/graphql - GraphiQL Explorer:
https://www.alignmentforum.org/graphiql - Rate Limits: Be respectful, add delays between requests
- Documentation: Based on LessWrong codebase
OpenRouter API
- Endpoint:
https://openrouter.ai/api/v1/chat/completions - Model Used:
openai/gpt-3.5-turbo(reliable and cost-effective) - Purpose: Generate 2-3 sentence summaries of posts
- Fallback: Uses
plaintextDescriptionif API fails or key not provided
Troubleshooting
MCP server not appearing in Claude Desktop
- Check that the path in
claude_desktop_config.jsonis correct - Ensure Python 3.10+ is installed:
python3 --version - Verify dependencies are installed:
pip list | grep mcp - Check Claude Desktop logs:
- macOS:
~/Library/Logs/Claude/ - Look for error messages related to mcp-alignmentforum
- macOS:
CSV file not found (404 error)
- Make sure you've updated the
CSV_URLinserver.pywith your GitHub username - Verify the CSV file exists at:
https://raw.githubusercontent.com/YOUR_USERNAME/mcp-alignmentforum/main/data/alignment-forum-posts.csv - Run the update script to generate the initial CSV:
python scripts/update_posts.py - Commit and push the CSV file to GitHub
GitHub Actions not running
- Go to repository Settings → Actions → General
- Ensure "Allow all actions and reusable workflows" is selected
- Check that the workflow file is in
.github/workflows/ - Manually trigger from Actions tab to test
Import errors when running server
# Reinstall dependencies
pip install --upgrade mcp httpx 'gql[httpx]' pydantic
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Acknowledgments
- Alignment Forum for providing the content and API
- Model Context Protocol for the MCP specification
- Anthropic for Claude and Claude Desktop
Support
For issues, questions, or suggestions, please open an issue on GitHub.
Установка Alignment Forum Server
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/rapturt9/mcp-alignmentforumFAQ
Alignment Forum Server MCP бесплатный?
Да, Alignment Forum Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Alignment Forum Server?
Нет, Alignment Forum Server работает без API-ключей и переменных окружения.
Alignment Forum Server — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Alignment Forum Server в Claude Desktop, Claude Code или Cursor?
Открой Alignment Forum Server на 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 Forum Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
