Connectors
Connector refers to the three ways Markus “connects through” to external systems/platforms: external agent platform connectors (gateway type, wiring agent platforms like OpenClaw into Markus), IM communication adapters (bringing chat platforms like Feishu/Slack/Telegram/WhatsApp in as messaging channels), and MCP integration (providing new tools via MCP servers). This page explains these three paths and the connector descriptor format. ← Back to Assets · 中文原版
1. Three Access Paths at a Glance
| Access | Mechanism | Purpose |
|---|---|---|
| External platform connector | Connector descriptor (JSON) + config read/write + skill template injection | Wire external agent platforms (OpenClaw / Hermes…) into Markus |
| IM communication adapter | @markus/comms CommAdapter + MessageRouter | Use Feishu/Slack/Telegram/WhatsApp/WebUI as messaging channels |
| MCP skill | mcpServers in a SKILL package | Provide brand-new tools to Agents (external API access, etc.) — see Skills |
2. External Agent Platform Connectors (Gateway Connector)
The core of this connector type is a connector descriptor (Connector Descriptor, a JSON file) describing how to detect, install, and wire up a given external agent platform. Load order: built-in (ships with the CLI package) → development directory (packages/cli/connectors/) → user directory (~/.markus/connectors/, same name overrides built-in). Files starting with _ are skipped.
Descriptor Format
{
"platform": "openclaw", // platform name, decisive identifier
"displayName": "OpenClaw",
"description": "Open-source AI coding agent",
"homepage": "https://github.com/...",
"detection": {
"configPaths": ["~/.openclaw/openclaw.json", "~/.openclaw/openclaw.json5"],
"binaryName": "openclaw", // probe in PATH
"processName": "openclaw" // probe whether the process is running
},
"installation": {
"npmPackage": "openclaw",
"initCommand": "openclaw init",
"startCommand": "openclaw start --daemon",
"stopCommand": "openclaw stop"
},
"integration": {
"type": "gateway",
"configFormat": "json5", // json | json5
"configPath": "~/.openclaw/openclaw.json",
"tokenField": "integrations.markus.token", // dotted-nested write
"urlField": "integrations.markus.url",
"llmProvidersField": "models.providers", // read shared providers dimension
"skillDir": "~/.openclaw/skills",
"skillTemplateName": "openclaw-markus-skill"
},
"defaultCapabilities": ["code", "review", "test", "debug", "documentation"],
"defaultAgentName": "OpenClaw Agent"
}
Connector Service Capabilities (connector-service)
- Detect:
scanInstalledPlatforms()returns each platform’sinstalled / binaryFound / running(checks config paths, binaries in PATH, process names). This is the input tomarkus doctor/ the install wizard. - Read config:
readPlatformConfigparses the external platform’s config; json5 is cleaned (comments/trailing commas) before parsing. - Write config:
writePlatformConfigwrites Markus’s URL + token into the external config (dotted-nested fields), creating them if missing. - Install skill template: copies Markus integration skill templates into the external platform’s skills directory (
installSkillTemplate). - LLM reuse:
readPlatformLLMProvidersreads the external platform’s providers, reusable in Markus.
In one sentence: a connector lets Markus “recognize, install, and configure” an external agent platform, and share messages and LLM config bidirectionally with it.
3. IM Communication Adapters (Comms Layer)
packages/comms provides a unified messaging adapter layer so Agents can send/receive messages over mainstream IM platforms:
Built-in Adapters
| Platform | Module |
|---|---|
| Feishu | comms/src/feishu/ (adapter + cards + client) |
| Slack | comms/src/slack/ |
| Telegram | comms/src/telegram/ |
comms/src/whatsapp/ | |
| WebUI | comms/src/webui/ (built-in browser UI) |
MessageRouter Routing Model
MessageRouter
├─ registerAdapter(adapter) # register adapter by platform
├─ bindAgentToChannel(agentId, platform, channelId) # bind a channel to an Agent
├─ connectAll(configs) # batch-connect and attach onMessage
├─ sendToChannel / sendAsAgent # send to a channel / send as an Agent
└─ routeIncomingMessage # route inbound message platform:channelId → agent
- Each adapter implements the
CommAdapterinterface (connect / disconnect / onMessage / sendMessage / isConnected). - Inbound messages are routed precisely by
{platform}:{channelId}to the bound Agent; the Agent can reply (replying in the original thread when a threadId exists). - Platform integration landing (Feishu platform page + install steps): see Feishu Integration →.
ℹ️ For currently officially supported platform integration details, see Feishu Integration (Feishu is the reference implementation; other platforms will be filled in once landed).
4. MCP Integration (MCP-Based Skills)
MCP (Model Context Protocol) integration means “turning external capabilities into Agent tools via a standard protocol”, carried by MCP-based skills:
- Declare servers
{command, args, env}underskill.mcpServersinskill.json; the command can be any executable (node/python3/npx/ …). - MCP servers use JSON-RPC 2.0 over stdio, implementing
initialize/tools/list/tools/call. - Exposed tools are automatically prefixed with the server name (e.g.
my-api__search); Agents call them by the prefixed name. - Can use the Markus Hub / external MCP server formats;
markus skill importalso normalizes themcp-serverformat (containingmcp.json/.mcp.json). - Community MCP servers can be used directly as tools (e.g. activated via
discover_tools). - MCP details: see Skills / MCP-based section; an external skill’s
mcpServersonly take effect if the local runtime (npx/uvxinstalled) is present.
5. Next Steps
- How to build MCP-based skills → Skills / MCP-based.
- Specific platform integration (Feishu is currently officially supported) → Feishu Integration →.
- External agent platform connection is the foundation of platform integration → read it together with the platform integration category.