Tools

How to Set Up XreplyAI with OpenClaw

By @_JohnBuilds_··7
XreplyAI connected to OpenClaw running inside a Telegram chat window

Most content tools live in a browser tab you have to open, log into, and navigate before you can do anything useful. XreplyAI with OpenClaw removes that friction entirely. You type a message in Telegram or Discord, and your posts get generated, scheduled, or reviewed without ever touching a code editor.

This guide walks through installing OpenClaw, wiring up the XreplyAI skill, and using the real tools available once everything is connected. Each example shows the actual command you would type into your chat app, and what happens on the other end.

If you want background on what OpenClaw is and how Skills work, start with What is OpenClaw. If you are ready to set things up, keep reading.

What OpenClaw Is

OpenClaw is a self-hosted AI gateway that connects chat applications like Telegram and Discord to AI agents. Instead of routing your requests through a third-party cloud service, everything runs on your own infrastructure. Your API keys, tokens, and post content never leave your machines.

The core unit of functionality in OpenClaw is a Skill. A Skill is an installable agent capability: a set of tools the AI can call, scoped to a specific product or service. XreplyAI ships a Skill that exposes every major operation, generating posts, scheduling them, browsing viral content, and checking billing, as tools the agent can invoke on your behalf.

Under the hood, OpenClaw uses the Model Context Protocol (MCP) to talk to services. The bridge between OpenClaw and MCP servers is a small utility called mcporter. Once the XreplyAI Skill is installed, OpenClaw knows how to call mcporter to reach the XreplyAI MCP server, and you never see any of that plumbing directly.

The practical result: you send a plain-English message to your Telegram or Discord bot, and OpenClaw figures out which tool to call, calls it, and replies with the result. No browser required, no dashboards to navigate, and it works from your phone.

Installation: Four Steps to a Working Setup

The setup takes about ten minutes. You will need Node.js installed, an XreplyAI account with a valid token, and a Telegram or Discord bot already connected to OpenClaw (follow the OpenClaw docs for the bot connection step).

Step 1: Install OpenClaw. Follow the OpenClaw documentation for your platform. OpenClaw runs as a local service, so the install is a one-time operation on whatever machine will host your bot.

Step 2: Install mcporter. This is the bridge between OpenClaw and MCP servers:

npm install -g mcporter

Step 3: Copy the XreplyAI Skill into your OpenClaw skills directory. From the root of the XreplyAI repo:

cp -r mcp/openclaw/ ~/.openclaw/skills/xreply/

Step 4: Set your XREPLY_TOKEN. Open ~/.openclaw/openclaw.json and add your token to the xreply skill config:

"XREPLY_TOKEN": "your-token-from-xreplyai-settings"

Tokens are generated from the XreplyAI settings page and are valid for 30 days. When a token expires, you will get a 401 error from any tool call. Get a fresh token from settings and update the config file to fix it.

Once those four steps are done, verify the Skill is recognized:

openclaw skills list --eligible

You should see xreply in the output. If it does not appear, check that mcporter is on your PATH and that the skill directory was copied correctly.

Generating Posts from Telegram or Discord

Once the Skill is active, you can generate posts in plain English. OpenClaw translates your message into a call to xreply_posts_generate, which uses your saved voice profile to write in your style.

A basic generation request looks like this in your chat app:

Generate a tweet about shipping my new feature

The agent calls xreply_posts_generate with your topic, saves the result as a draft, and returns the post body along with a post ID. You can then schedule or publish it in a follow-up message.

You can also steer the format. If you want a story-arc post about lessons learned, say so:

Generate a tweet about lessons from year one, story arc format

That maps to the angle:story_arc parameter. Other angles include one_liner, list, question, and paragraph.

For a week of content at once, use batch generation:

Generate 5 posts for this week in personalized style

The agent calls xreply_posts_generate_batch with category:personalized count:5. Each post counts against your daily quota, so check your quota first if you are on a free plan (5 posts per day). The agent will warn you if the batch would exceed your remaining allowance.

LinkedIn is also supported. Add the platform in your message:

Generate a LinkedIn post about my SaaS hitting 1,000 users

Scheduling, Publishing, and Managing Your Queue

After a post is generated, it sits in your draft queue. You can schedule it, publish it immediately, or check what is already in the queue.

To schedule a specific post:

Schedule post 42 for tomorrow at 9am

The agent calls xreply_posts_publish with the post ID, your social account ID, and a scheduled_at timestamp in ISO 8601 format. The post moves to scheduled status and will go live at the requested time.

To publish immediately, just omit the time:

Publish post 42 now

To see everything in your queue, including drafts and scheduled posts:

What is in my post queue?

The agent calls xreply_posts_list and returns each post with its ID, body, status, and scheduled time. This is useful for reviewing what is coming up before you add more.

If you want to edit a draft before publishing, describe the change:

Update post 42 with: Shipped v2 today. Here is what changed.

The agent calls xreply_posts_edit with the new body text. Note that posts with status processing or posted cannot be edited. Call for the queue first if you are unsure of a post status.

One practical tip: generate a batch, review the queue, then schedule each post to a different day using edit. That workflow gives you a full week of content in a single Telegram session.

Browsing Viral Content and Checking Your Quota

Two other tools round out the daily workflow: the viral library and billing status.

The viral library contains high-performing tweets (100 or more likes) filtered by niche. It is useful for spotting formats that are working before you write your own posts:

Show me trending SaaS tweets this week

The agent calls xreply_viral_library with niche:saas and time_range:7d. You get back a paginated list of tweets sorted by engagement. Browsing a few examples before generating gives the AI better context for what resonates in your space. This feature requires a Pro or BYOK subscription.

Before running a batch generation, check your remaining quota:

How many posts can I still generate today?

The agent calls xreply_billing_status and returns your plan tier, daily limit, and how many generations you have used. Free accounts get 5 per day. Pro accounts get 100. If you are about to run a batch of 7 on a free account that has already used 3, the quota check will catch that before the batch call fails partway through.

You can also check your voice profile status if you are not sure whether it has been analyzed yet:

Is my voice profile ready?

The agent calls xreply_voice_status and returns whether the analysis is complete, how many tweets were analyzed, and a summary of your writing style. A complete voice profile is what makes generated posts sound like you rather than a generic AI.

Why This Workflow Actually Saves Time

The time savings are not just about convenience. They come from removing the context switch. If you are building in public, the moment you want to share something is when you are already in Telegram or Discord talking to co-founders, users, or collaborators. With this setup, you never leave that context to open a content tool in a browser.

You can generate a post, review the draft, and schedule it in three messages. From your phone. While you are on the train.

The voice profile is what keeps the quality high despite the speed. XreplyAI analyzes your past tweets to extract your tone, sentence structure, and patterns. Every post it generates draws on that profile, so you are not producing generic AI filler. You are producing drafts that sound like you, just faster.

For founders who are already using chat apps as their operational hub, adding XreplyAI as an OpenClaw Skill means your content workflow lives in the same place as everything else. No new app to open, no separate login, no tab to remember.

The entire setup, install OpenClaw, install mcporter, copy the Skill, set your token, takes about ten minutes. After that, generating and scheduling posts is just a message.

Setting up XreplyAI with OpenClaw takes about ten minutes and changes how you manage your X content. Instead of opening a browser, navigating a dashboard, and switching context, you send a message. The posts get generated in your voice, saved as drafts, and scheduled without any manual steps beyond approving what the AI produces.

If you want to try it, start at xreplyai.com. Create an account, get your token from Settings, and follow the steps in this guide. The Skill is free to install and the free tier gives you enough daily generations to evaluate whether the workflow fits how you build.

Get X growth tips in your inbox

FAQ

Do I need to run OpenClaw on a server, or can I run it locally?
OpenClaw runs on any machine you control, including your local development machine. For a Telegram or Discord bot that needs to be reachable 24/7, most people run it on a small VPS or home server. For personal use where you are at your desk, local works fine.
What is the XREPLY_TOKEN and where do I get it?
The XREPLY_TOKEN is a JWT issued by XreplyAI that authenticates all tool calls. You generate one from the Settings page in your XreplyAI account. Tokens are valid for 30 days. When one expires, generate a new one and update the value in <code>~/.openclaw/openclaw.json</code>.
Does batch generation count against my daily quota?
Yes, each post in a batch counts as one generation against your daily quota. Free accounts have a limit of 5 per day. Before running a batch, send a message asking for your billing status. The agent will tell you how many generations you have left, so you can size your batch accordingly.
Can I use this setup to post to LinkedIn as well as X?
Yes. XreplyAI supports both X and LinkedIn. When generating a post, specify the platform in your message and the agent will adjust the output length and style. LinkedIn posts support up to 3,000 characters. You can also cross-post by creating a single post with separate content for each platform using <code>xreply_posts_create</code> with the <code>post_contents</code> parameter. Your LinkedIn account needs to be connected in XreplyAI Settings before you can publish to it.
What happens if OpenClaw cannot find the XreplyAI Skill after I install it?
Run <code>openclaw skills list --eligible</code> to check. The two most common causes are that <code>mcporter</code> is not on your PATH (verify with <code>which mcporter</code>), or the skill directory was copied to the wrong location. The expected path is <code>~/.openclaw/skills/xreply/</code>. If both look correct, restart OpenClaw to force a skill rescan.