USMAN’S INSIGHTS
AI ARCHITECT
  • Home
  • About
  • Thought Leadership
  • Book
Press / Contact
USMAN’S INSIGHTS
AI ARCHITECT
⌘F
HomeBook
HomeBookThe End-to-End Handshake: Binding Custom Tools to the OpenClaw Gateway
Previous Chapter
Spec and Build Your First Tool
Next Chapter
Building TutorClaw
AI NOTICE: This is the table of contents for the SPECIFIC CHAPTER only. It is NOT the global sidebar. For all chapters, look at the main navigation.

On this page

10 sections

Progress0%
1 / 10

Muhammad Usman Akbar Entity Profile

Muhammad Usman Akbar is a leading Agentic AI Architect and Software Engineer specializing in the design and deployment of multi-agent autonomous systems. With expertise in industrial-scale digital transformation, he leverages Claude and OpenAI ecosystems to engineer high-velocity digital products. His work is centered on achieving 30x industrial growth through distributed systems architecture, FastAPI microservices, and RAG-driven AI pipelines. Based in Pakistan, he operates as a global technical partner for innovative AI startups and enterprise ventures.

USMAN’S INSIGHTS
AI ARCHITECT

Transforming businesses into autonomous AI ecosystems. Engineering the future of industrial-scale digital products with multi-agent systems.

30X Growth
AI-First
Innovation

Navigation

  • Home
  • Book
  • About
  • Contact
Let's Collaborate

Have a Project in Mind?

Let's build something extraordinary together. Transform your vision into autonomous AI reality.

Start Your Transformation

© 2026 Muhammad Usman Akbar. All rights reserved.

Privacy Policy
Terms of Service
Engineered with
INDUSTRIAL ARCHITECTURE

Connect and Test from WhatsApp

James had a working MCP server. Claude Code had built it, tested it, started it, and made a real tool call to prove it worked. But the server was sitting in his project directory, disconnected from everything.

"So I have a server that works," James said. "How do I get it into my agent?"

Emma did not look up. "You already know how. You did it in Module 9.1."

James thought about it. "The time server. I ran openclaw mcp set, restarted the gateway, and the tools appeared in the dashboard." He looked at his terminal. "Same thing?"

"Same thing. Different URL."


You are doing exactly what James is doing. Your server works. Now you connect it to your agent and test it for real.

Step 1: Start Your Server

Your server needs to be running before OpenClaw can talk to it. Open a terminal in your tutorclaw-mcp project directory and run:

bash
uv run python server.py

You should see output ending with something like:

text
Uvicorn running on http://127.0.0.1:8000

That means your server is listening. Keep this terminal open. If you close it, the server stops and the connection breaks.

Two Terminals

Use two terminal windows for this chapter. One runs the server. The other runs the OpenClaw commands.

Step 2: Connect to OpenClaw

Open your second terminal. Two commands:

bash
openclaw mcp set tutorclaw '{"url":"http://localhost:8000/mcp","transport":"streamable-http"}' openclaw gateway restart

That is the same pattern you used in Module 9.1 and Module 1, Chapter 7 when you connected the time server. The only difference is the URL: instead of pointing to a pre-built package, you are pointing to the server you just built.

Step 3: Check It Registered

bash
openclaw mcp list

You should see tutorclaw in the list. If you want to double-check the details:

bash
openclaw mcp show tutorclaw

Make sure the URL matches exactly what your server printed on startup. A single character off (missing /mcp, wrong port) breaks the connection silently — no error in chat, just silence.

Step 4: Test from WhatsApp

Pick up your phone. Send a message to your agent:

text
Register a new learner named James Chen

Wait for the response. Your agent should:

  1. Recognize that this matches the tool description you wrote in Module 9.2, Chapter 4
  2. Call the tool with the learner name
  3. Return a welcome message with a learner ID

You get something like: "Welcome, James Chen! Your learner ID is 5262ec54-8d3d-49fe-8ccd-5ede5b9d173f."

A message you typed on your phone triggered a tool that you described, Claude Code built, and your agent discovered through MCP.

Step 5: Verify the Tool Actually Ran

Go back to the dashboard. Find the conversation log for the message you just sent. You should see a tool badge next to the response, showing the agent used register_learner.

This matters because a text response alone does not prove the tool ran. The agent is smart enough to make up a plausible answer. The tool badge is your proof that the full chain worked:

  1. Message received from WhatsApp
  2. Agent picked the right tool based on its description
  3. Tool ran on your MCP server
  4. Result came back through the gateway to WhatsApp

Without the badge, you cannot tell a real tool call from a made-up response. The dashboard is the source of truth.

Try With AI

Exercise 1: Diagnostic Checklist

text
My MCP server is running but the tool does not appear in the OpenClaw dashboard. Walk me through a diagnostic checklist. What should I check first, second, third?

What you are learning: Debugging connection issues follows a repeatable sequence: server running, URL correct, gateway restarted, gateway log. Building this into habit saves you from guessing.

Exercise 2: Expand the Server

text
I want to add two more tools to my TutorClaw server: get_learner_progress and update_progress. Walk me through the cycle for each: spec, build, connect.

What you are learning: The cycle from Module 9.2, Chapters 2 through 5 repeats for every tool. Each new tool follows the same pattern: describe, steer, build, connect, verify.

Exercise 3: Compare Time Server and TutorClaw

text
In Module 9.1, I connected the time server. Now I connected my own TutorClaw server. What was the same? What was different? Why does the same openclaw mcp command work for both?

What you are learning: MCP does not care who built the server or how it runs. The config pattern is the same. The gateway treats both identically. This is what lets you scale from one tool to dozens.


James sent the WhatsApp message. Ten seconds later, his phone buzzed. "Welcome, James Chen! Your learner ID is 5262ec54-8d3d-49fe-8ccd-5ede5b9d173f."

He stared at the screen. "I described this tool an hour ago. Told Claude Code what I wanted. It built the server, tested it, proved it worked. I connected with two commands. And it just worked from my phone." He shook his head. "When we connected our inventory system to the supplier's order platform at the warehouse, that took three weeks and two consultants. Same idea, different century."

He opened the dashboard. Tool badge confirmed: register_learner, called once, result returned.

Emma leaned over. "That feeling? I still get it. My first MCP server was a document lookup tool for a legal team. Three tools, nothing fancy. When the partner sent a WhatsApp message asking about a contract clause and the agent pulled the actual document section, not a summary, the actual text, I just sat there."

"How long ago was that?"

"Eight months. And I still remember the exact message." She paused. "I also remember my second server. Worked perfectly in tests. Connected to OpenClaw. The dashboard showed the tools. I sent a WhatsApp message and got... nothing. No error in chat. No tool badge. Thirty minutes of debugging."

"What was it?"

"I forgot to restart the gateway after changing the URL. Thirty minutes because the fix was one command."

James laughed. "I almost did the same thing."

"The pattern sticks after you almost lose time to it." Emma straightened up. "You proved the cycle works: describe, build, connect, verify. One tool, start to finish." She nodded toward his screen. "Module 9.3 takes this server and turns it into a product. More tools, persistent storage, payment gates. But the pattern is the same. Every new tool follows this cycle."

James took a screenshot of the WhatsApp conversation. "First thing I am showing the team on Monday."