Connect Hermes Agent or OpenClaw to a Social Media MCP Server
Connect Hermes Agent or OpenClaw to a social media MCP server so the agent can discover connected accounts, draft posts for human approval and schedule reviewed content. This guide covers client setup and the publishing workflow without requiring a separate integration for every social platform.
Before you start: prerequisites and secret handling
Hermes Agent OpenClaw social media MCP setup starts with three prerequisites: an access key, at least one connected social account on the integrations page, and Hermes Agent or OpenClaw already running. Keep the access key private and treat the placeholder shown in the Hermes environment file entry example as a placeholder in every example. The key is sent in the Authorization header, so it should not be pasted into public repositories, issues, screenshots, or chat messages. Before connecting, confirm which social account you intend to use for the first test, because the safest first step is listing accounts rather than publishing.
Connect Hermes Agent
Hermes Agent reads MCP servers from ~/.hermes/config.yaml, with secrets supplied through ~/.hermes/.env. Put the environment entry shown in the Hermes environment file entry example first, then add a single server block under the existing mcp_servers section using the Hermes Agent MCP configuration example. Do not create a second mcp_servers section with the same name. The field map in the Hermes Agent configuration field map table shows the exact keys: url, headers, Authorization, and enabled. After saving the configuration, run the test command shown in the Test the Hermes Agent MCP connection example. If Hermes Agent is already open, use the Reload MCP servers inside Hermes Agent example in the chat or restart the agent so it can discover the new tools for accounts, posts, scheduling, and analytics.
Connect OpenClaw
OpenClaw can save a remote MCP server from the command line using the add command in the Add the MCP server in OpenClaw example. The important inputs are the server name, the --url value, --transport set to streamable-http, and --header carrying the Authorization value. After adding the server, run the Probe the OpenClaw MCP connection example to check that OpenClaw can reach the server and discover its tools. If OpenClaw was already running, reload the MCP registry with the Reload the OpenClaw MCP registry example or restart the agent. Because OpenClaw stores the header in its local configuration, protect that file with the same care as the key itself.
Try one safe workflow: list, draft, approve, then schedule
Do not make the first test a live post. Start with the Prompt to list connected accounts safely example, which asks for platform, account name, and account ID while explicitly forbidding post creation. Verify that the accounts match your intent, especially if you have both personal and company profiles. Then provide a real source such as a changelog entry or blog URL and use the Prompt to draft, approve, then schedule posts example: one X post under 240 characters and one LinkedIn post for the named accounts, shown for approval before any scheduling, with scheduling only after approval for 10:00 AM tomorrow in Asia/Jerusalem and a returned post ID. Finally, open the posts page and check the copy, selected accounts, time, and timezone, cancelling or rescheduling while the posts are still queued if anything looks wrong.
If it does not work
When authentication fails with a 401 Unauthorized status, the most common explanations are a missing key, a typo introduced while replacing the placeholder, or a header that never reaches the server. Confirm the placeholder has been replaced with a real value, that the header name and Bearer prefix remain exactly as configured, and that the agent picked up the updated environment or local configuration after the change. A different symptom is an agent that reports no available tools at all; in that case the agent-specific diagnostic in the Failure matrix for MCP connection problems is the right next step, followed by a reload or a full restart. A third pattern is a post aimed at an unintended profile. That happens when a platform label alone is ambiguous, so the remedy is to request a fresh account listing and then specify the precise account ID in the scheduling instruction.
MCP or Agent Skills?
Use MCP when you want the same social media MCP server connection in both Hermes Agent and OpenClaw, with tools discovered from the hosted server. Use Agent Skills when the agent works mainly through shell commands or needs a repeatable API workflow that is easier to package as instructions and scripts. You do not need both for this setup. Choose MCP for shared, tool-based access across agents, and choose Agent Skills for a shell-centred workflow in a single environment. The decision table below turns that distinction into concrete criteria.
| Field or input | Value or format | Where it goes | Requiredness |
|---|---|---|---|
| SOCIAL_MCP_API_KEY | YOUR_API_KEY placeholder | ~/.hermes/.env | Required secret input |
| mcp_servers.social-mcp.url | {{MCP_BASE_URL}}/mcp | ~/.hermes/config.yaml | Required |
| mcp_servers.social-mcp.headers.Authorization | Bearer ${SOCIAL_MCP_API_KEY} | ~/.hermes/config.yaml | Required |
| mcp_servers.social-mcp.enabled | true | ~/.hermes/config.yaml | Required in source example |
Exact field map preserved from source configuration; origin modularized as {{API_BASE_URL}}; public identifiers neutralized.
| CLI input | Value or format | Purpose |
|---|---|---|
| social-mcp | Server name argument | Identifies the saved MCP server |
| --url | {{MCP_BASE_URL}}/mcp | Remote MCP server address |
| --transport | streamable-http | Transport selection |
| --header | Authorization: Bearer YOUR_API_KEY | Authentication header |
Exact CLI inputs preserved from source; origin modularized as {{API_BASE_URL}}; public identifiers neutralized.
| Symptom | Likely cause | Diagnostic command | Fix |
|---|---|---|---|
| 401 Unauthorized | Key missing, mistyped, or not passed in Authorization header | Agent-specific test or doctor probe | Replace placeholder, check Bearer format, reload configuration |
| No MCP tools appear | Server not loaded or agent not reloaded | hermes mcp test social-mcp or openclaw mcp doctor social-mcp --probe | Reload MCP registry or restart the agent |
| Wrong account selected | Platform name matched the wrong profile | List connected accounts again | Name the exact account ID in the scheduling prompt |
Failure mapping preserved from source troubleshooting guidance.
| Criterion | Choose MCP | Choose Agent Skills |
|---|---|---|
| Primary interface | Hosted tools discovered by the agent | Shell commands and packaged instructions |
| Sharing across agents | Same connection in Hermes Agent and OpenClaw | Best for one shell-centred environment |
| Workflow shape | Tool calls for accounts, posts, scheduling, and analytics | Repeatable API workflow as scripts |
| Setup scope | One server definition per agent | Installable skill for the agent |
Decision criteria derived from source comparison section.
openclaw mcp add social-mcp \
--url {{MCP_BASE_URL}}/mcp \
--transport streamable-http \
--header "Authorization: Bearer YOUR_API_KEY"