OpenClaw is an open-source AI agent that lives on your computer and talks to you through WhatsApp, Telegram, or whatever chat app you prefer. You tell it to do things — check your servers, summarize a repo, send an email — and it actually does them. Not in a hypothetical “here’s how you’d do it” way. It runs commands, reads files, calls APIs. This guide walks you through setting it up from scratch, connecting it to a messaging app, giving it useful tools, and running your first real task.

What You Need Before Starting

OpenClaw itself is free and open-source (MIT license). The costs come from the AI model it uses to think. Here’s what you need:

Requirement Options
**Machine** Mac, Linux, or Windows (WSL2). A spare Mac Mini, a Linux box, or even a $5/month VPS works.
**Node.js** Version 24 (recommended) or 22 LTS (22.16+). The installer handles this for you.
**AI model** An API key from Anthropic (Claude), OpenAI, Google (Gemini), or a local model via Ollama.
**Messaging** WhatsApp, Telegram, Discord, Slack, iMessage, or just the terminal.

Cost estimates for the AI model:

  • Casual use (a few messages a day): **$5-15/month**
  • Regular use (daily tasks, multi-step workflows): **$25-50/month**
  • Heavy automation: **$50-150/month**

These costs depend entirely on which model you pick. Claude Sonnet hits a good balance of quality and price for most people. GPT-4o-mini is dirt cheap if you want to experiment first.

Install OpenClaw

One command on Mac or Linux:

curl -fsSL https://openclaw.ai/install.sh | bash

Or if you prefer npm:

npm install -g openclaw@latest
openclaw onboard --install-daemon

The installer detects your system, installs Node if needed, and launches an onboarding wizard. The wizard walks you through three things:

  1. **Model provider** — Pick your AI backend. You’ll paste in an API key from Anthropic, OpenAI, or whichever provider you choose. If you want to run a local model, select “Custom Provider” and point it to your Ollama instance.
  1. **Gateway connection** — This is how OpenClaw communicates with your messaging apps. The wizard sets up a local gateway on port 18789.
  1. **Messaging channel** — Connect WhatsApp, Telegram, or another platform. For WhatsApp, you’ll scan a QR code (like WhatsApp Web). For Telegram, you’ll create a bot via BotFather and paste the token.

Once the wizard finishes, verify everything works:

openclaw doctor    # checks all dependencies
openclaw status    # shows running services

You should see your gateway running and your messaging channel connected. At this point, send a test message from your phone — something like “hey, are you there?” — and you should get a response back within a few seconds.

Give It Tools with MCP Servers

Right now your OpenClaw can chat, but it can’t do much else. It’s a brain without hands. To make it useful, you need to give it tools via MCP servers.

If you read my previous post on AI agents, you know that MCP (Model Context Protocol) is the standard way to give AI models the ability to interact with external systems. OpenClaw has native MCP support — you add tool servers to your config file and the agent discovers them automatically.

Your configuration lives in openclaw.json. Here’s what adding an MCP server looks like:

{
  "agents": [{
    "name": "main",
    "model": "claude-sonnet-4-5",
    "mcpServers": {
      "filesystem": {
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/user/projects"]
      },
      "github": {
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/server-github"],
        "env": { "GITHUB_TOKEN": "ghp_your_token_here" }
      }
    }
  }]
}

Each MCP server gives your agent a new set of capabilities. Some useful ones to start with:

MCP Server What It Does
`server-filesystem` Read and write files on your machine
`server-github` Browse repos, open issues, create PRs
`server-brave-search` Search the web
`server-fetch` Fetch and read web pages
`server-memory` Persistent memory across conversations

Install them by adding entries to your mcpServers config. No extra installation step needed — the npx command downloads and runs them on demand.

After adding servers, restart OpenClaw and ask it what tools it has. It’ll list every capability from every connected MCP server. You should see things like read_file, write_file, search_repositories, create_issue, and so on.

Your First Real Task

Time to make it do something actually useful. Here’s a concrete task you can try right now.

Send this to your OpenClaw via WhatsApp (or whatever you connected):

Clone the repo github.com/expressjs/express, look at the project structure, read the main entry point, and give me a summary of how the framework is architected. Include the key design patterns you spot.

Watch what happens. In the background, OpenClaw will:

  1. Call a shell tool to run `git clone`
  2. List the directory structure with `ls` or `find`
  3. Read `package.json` to understand the project
  4. Read the main entry point file
  5. Possibly read a few more files to understand the routing and middleware system
  6. Send you back a structured summary

The whole thing takes 30-60 seconds. You’ll get back something like a 2-3 paragraph analysis of Express’s middleware pipeline, router design, and module structure. That’s 15 minutes of manual work done in under a minute.

If that worked, try something more practical:

Check if my server at [your-ip] is reachable. Try to SSH in, check disk usage, and list any Docker containers running. Summarize the health status.

Or for a developer workflow:

Look at my project in ~/projects/my-app. Find any TODO comments in the code, group them by file, and create a GitHub issue for each group with a descriptive title.

The pattern is always the same: describe what you want in plain language, and the agent figures out which tools to call and in what order. When it works, it feels like magic. When it doesn’t, it usually means the agent needs a tool it doesn’t have, or the context window filled up on a large task.

What to Watch Out For

A few things I’ve learned the hard way:

Start with read-only tools. Give it server-filesystem pointed at a specific folder, not your entire home directory. Add server-github with a token that only has read access. Once you trust the setup, gradually expand permissions. The worst OpenClaw stories all start with someone giving it unrestricted root access on day one.

Context windows fill up fast. Every message, every tool result, every file it reads goes into the context. OpenClaw’s system prompt alone eats 5,000-10,000 tokens. On a long conversation with multiple file reads, you can hit the limit and the agent starts forgetting earlier context. Start fresh conversations for new tasks.

Model routing saves money. You can configure OpenClaw to use a cheap model (GPT-4o-mini) for simple questions and a smarter one (Claude Sonnet) for complex tasks. This cuts costs significantly without sacrificing quality where it matters.

It will confidently do the wrong thing. If you ask it to “clean up old files” without being specific, it might delete things you didn’t want deleted. Be precise with destructive operations. “List files older than 30 days in /tmp” is safer than “clean up /tmp.”

Keep it running as a daemon. The onboarding wizard sets this up, but make sure OpenClaw starts automatically on boot. Otherwise you’ll send a message from your phone and wonder why nobody’s answering.

Is It Worth It?

Honestly, it depends on what you need.

If you already use Claude Code for development work and don’t need a persistent agent running 24/7, OpenClaw might be overkill. Claude Code is simpler, doesn’t need a gateway or messaging setup, and works great for coding tasks right in your terminal.

But if you want an always-on assistant you can message from your phone — one that can check on your servers, manage files, interact with APIs, and automate recurring tasks — OpenClaw is the most mature option out there. 247k GitHub stars and a growing ecosystem of MCP tools means you’re not betting on a dead project.

The sweet spot is using both: Claude Code for hands-on development sessions, OpenClaw for everything else. Set up OpenClaw on a spare machine, connect it to Telegram, give it access to your infrastructure monitoring, and you’ve got a sysadmin in your pocket that costs $15/month.