Installation
This guide covers all the ways to install and run the AT Protocol MCP Server.
Prerequisites
Before installing, ensure you have:
- Node.js 20 or higher - Download Node.js
- npm, pnpm, or yarn - Package manager (npm comes with Node.js)
- Git (optional) - For cloning the repository
- AT Protocol account (optional) - Only needed for authenticated operations
Verify Prerequisites
# Check Node.js version (should be 20+)
node --version
# Check npm version
npm --version
Installation Methods
Method 1: Global Installation (Recommended)
Install globally to use the server from anywhere:
npm install -g atproto-mcp
After installation, you can run the server with:
atproto-mcp
Method 2: Using npx (No Installation)
Run directly without installing:
npx atproto-mcp
This is perfect for:
- Quick testing
- One-time usage
- CI/CD pipelines
Method 3: Local Project Installation
Install as a dependency in your project:
# Using npm
npm install atproto-mcp
# Using pnpm
pnpm add atproto-mcp
# Using yarn
yarn add atproto-mcp
Then add to your package.json
scripts:
{
"scripts": {
"mcp": "atproto-mcp"
}
}
Run with:
npm run mcp
Method 4: From Source (Development)
Clone and build from source for development or customization:
# Clone the repository
git clone https://github.com/cameronrye/atproto-mcp.git
cd atproto-mcp
# Install dependencies
npm install
# Build the project
npm run build
# Run the server
npm start
# Or run in development mode with hot reload
npm run dev
Docker Installation
Using Docker Compose (Recommended)
The easiest way to run with Docker:
# Clone the repository
git clone https://github.com/cameronrye/atproto-mcp.git
cd atproto-mcp
# Copy environment file
cp .env.example .env
# Edit .env with your credentials (optional)
nano .env
# Start all services
docker-compose up -d
This starts:
- AT Protocol MCP Server
- Redis (for caching)
- Prometheus (for metrics)
- Grafana (for monitoring)
Using Docker Directly
Run a single container:
# Pull the image
docker pull ghcr.io/cameronrye/atproto-mcp:latest
# Run the container
docker run -d \
--name atproto-mcp \
-p 3000:3000 \
-e ATPROTO_IDENTIFIER=your.handle \
-e ATPROTO_PASSWORD=your-password \
ghcr.io/cameronrye/atproto-mcp:latest
Building Docker Image Locally
# Build the image
docker build -t atproto-mcp .
# Run the container
docker run -d \
--name atproto-mcp \
-p 3000:3000 \
atproto-mcp
Verification
After installation, verify the server is working:
Check Version
atproto-mcp --version
Check Help
atproto-mcp --help
Test Basic Functionality
Start the server:
atproto-mcp
You should see output like:
[INFO] AT Protocol MCP Server starting...
[INFO] Server initialized successfully
[INFO] Registered 30 tools, 3 resources, 2 prompts
[INFO] Server ready on stdio transport
Health Check (Docker)
If running with Docker:
curl http://localhost:3000/health
Expected response:
{
"status": "healthy",
"timestamp": "2024-01-01T00:00:00.000Z",
"version": "0.1.0"
}
Troubleshooting Installation
Node.js Version Issues
If you get errors about Node.js version:
# Install nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
# Install Node.js 20
nvm install 20
nvm use 20
Permission Errors (Global Install)
On Linux/macOS, you might need sudo:
sudo npm install -g atproto-mcp
Or configure npm to install globally without sudo:
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
Build Errors (From Source)
If you encounter build errors:
# Clean and reinstall
rm -rf node_modules package-lock.json
npm install
# Clear npm cache
npm cache clean --force
# Try with different package manager
pnpm install
Docker Issues
If Docker containers won't start:
# Check Docker is running
docker ps
# View container logs
docker logs atproto-mcp
# Restart containers
docker-compose restart
# Rebuild containers
docker-compose up -d --build
Port Already in Use
If port 3000 is already in use:
# Use a different port
atproto-mcp --port 8080
# Or find what's using port 3000
lsof -i :3000 # macOS/Linux
netstat -ano | findstr :3000 # Windows
Updating
Global Installation
npm update -g atproto-mcp
Local Installation
npm update atproto-mcp
Docker
# Pull latest image
docker pull ghcr.io/cameronrye/atproto-mcp:latest
# Restart containers
docker-compose down
docker-compose up -d
From Source
git pull origin main
npm install
npm run build
Uninstallation
Global Installation
npm uninstall -g atproto-mcp
Local Installation
npm uninstall atproto-mcp
Docker
# Stop and remove containers
docker-compose down
# Remove images
docker rmi atproto-mcp
# Remove volumes (optional, deletes data)
docker-compose down -v
Next Steps
Now that you have the server installed:
- Quick Start - Get up and running
- Configuration - Configure the server
- Authentication - Set up authentication (optional)
Previous: Introduction ← | Next: Quick Start →