OpenClaw has two MCP roles. openclaw mcp serve exposes OpenClaw to another MCP client. TokConnect needs the other role: OpenClaw saves TokConnect as an outbound MCP server that an eligible OpenClaw runtime can consume.
Add an outbound server
OpenClaw stores managed definitions under mcp.servers. Add this entry to your OpenClaw configuration, then set TOKCONNECT_TOKEN in the environment that starts the OpenClaw gateway or runtime.
{
"mcp": {
"servers": {
"tokconnect": {
"url": "https://mcp.tokconnect.com/mcp",
"transport": "streamable-http",
"headers": {
"Authorization": "Bearer ${TOKCONNECT_TOKEN}"
}
}
}
}
}
OpenClaw's configuration reference documents streamable-http and sse for remote entries. The type: "http" form is a CLI alias that OpenClaw normalizes. Use the documented transport name in the file so the configuration stays clear.
Keep the two MCP directions separate
| Command or setting | Direction | What it does for TokConnect |
|---|---|---|
mcp.servers or openclaw mcp add | Outbound | Registers a remote server that OpenClaw can call. |
openclaw mcp status, doctor, probe | Outbound inspection | Shows saved configuration, diagnoses it, and tests a server connection. |
openclaw mcp serve | Inbound | Publishes OpenClaw as a server for another MCP client. It does not add TokConnect. |
Use only the outbound row for this integration. Confusing serve with a remote-client command can leave you with a healthy local OpenClaw server and no TokConnect entry at all. The endpoint belongs in the saved outbound registry, and the runtime that needs research must be eligible to consume that registry entry.
Keep the key with OpenClaw
TokConnect uses a static bearer key. Do not set auth: "oauth" for this server; OpenClaw reserves that option for an OAuth-enabled HTTP MCP server. Keep the value outside the configuration file where your deployment supports secret injection. The header must reach the process that opens the MCP connection, which can differ from your interactive shell or a browser-based control panel.
Set a tool filter only after you have inspected the server's tool list. A narrow initial filter can hide the tool you plan to test and make a valid connection look incomplete.
For a persistent deployment, inject TOKCONNECT_TOKEN through the same service, container, or gateway environment that starts the OpenClaw runtime. An export in an unrelated interactive terminal has no effect on a daemon that was already running. OpenClaw's reference describes the connection fields; use your deployment's established secret store for lifetime and rotation rather than copying a key into JSON.
Make the server available to a runtime
A saved entry is a registry definition. OpenClaw's documentation says its runtimes later consume eligible saved servers, so check the runtime adapter or agent configuration that you use after the probe succeeds. The entry does not make an external MCP client call TokConnect, and openclaw mcp serve does not import third-party servers.
Probe before an agent turn
OpenClaw documents status, doctor, and probe for outbound MCP definitions. Start with:
openclaw mcp status --verbose
openclaw mcp probe tokconnect
status tells you whether OpenClaw saved the definition. probe opens a live MCP connection and lists capabilities. This distinction avoids sending an agent into a session with a misspelled endpoint or missing header.
Call search_hashtags with keyword “walking pad” and count 3. Return name, id, viewCount, videoCount, hasMore, and nextCursor.
The editorial MCP environment returned three records and nextCursor: 3. The first was walkingpad, ID 1641091308962818, with viewCount 3829074122 and videoCount 298098. See the protocol fixture. No OpenClaw probe ran.
Use nextCursor only to continue this same hashtag query. A cursor belongs to the server's result set; do not reuse it after changing the keyword or count. Once you have a short list, pass a candidate tag into the hashtag research workflow and record the observed counts with the date of the call.
Read failures by stage
| Stage | Signal | Check |
|---|---|---|
| Saved definition | Missing from status | Inspect the mcp.servers.tokconnect path and reload the configuration. |
| Connection | Probe returns 401 | Check the process environment, header spelling, and bearer-key value. |
| Discovery | Probe connects but a needed tool is absent | Remove or adjust toolFilter, then probe again. |
| Research | Tool returns no matches | Change the keyword or language. The MCP connection has already succeeded. |
Change or disable an entry
Stop the relevant gateway or runtime before changing its configuration, update the one mcp.servers.tokconnect entry, and reload it by the deployment procedure you already use. Run openclaw mcp status --verbose before probe; status confirms which definition OpenClaw read, while probe confirms whether it can reach that definition. To retire the connection, delete the tokconnect mapping from the outbound registry, reload the configuration, and use status to confirm it is no longer registered.
An agent response is not the connection test. First inspect the status and capabilities, then give the agent one bounded hashtag request. That ordering produces a clean audit trail: configuration read, remote capability discovery, and research result each have a distinct signal.
OpenClaw's MCP CLI reference names the outbound registry and its probe workflow. The TokConnect troubleshooting guide covers the endpoint and research-result checks.
Use the TikTok MCP guide to select an agent task, then apply hashtag records in the hashtag research workflow.