openclaw - 💡(How to fix) Fix Enhancement: MCP client support in agent skills (enable imap-smtp-email and other MCP servers as backends)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Code Example

mcp_servers:
  - name: email
    command: npx gabigabogabu/email-mcp-server
    env:
      - EMAIL_USER
      - EMAIL_PASSWORD
      - IMAP_HOST
      - SMTP_HOST
RAW_BUFFERClick to expand / collapse

Background

While analyzing options for improving the an email skill, I investigated several IMAP/SMTP MCP servers:

These servers expose real capability that agent skills could benefit from -- but OpenClaw has no native MCP client support. Skills currently have to either ship custom CLI scripts or use binary CLIs like himalaya. There is no way to point a skill at an MCP server and call its tools.

Enhancement Request

Add MCP client support to the OpenClaw skill runtime, so SKILL.md authors can declare a dependency on an MCP server and call its tools natively.

Proposed interface (sketch):

In SKILL.md front matter:

mcp_servers:
  - name: email
    command: npx gabigabogabu/email-mcp-server
    env:
      - EMAIL_USER
      - EMAIL_PASSWORD
      - IMAP_HOST
      - SMTP_HOST

The skill could then call MCP tools as if they were native tools within the agent session.

extent analysis

TL;DR

Implementing an MCP client in OpenClaw's skill runtime would allow skills to natively call tools from MCP servers.

Guidance

  • Investigate the feasibility of adding an MCP client to the OpenClaw skill runtime, considering the proposed interface and potential integration with existing skill tools.
  • Research the MCP server implementations mentioned (e.g., gabigabogabu/email-mcp-server, non-dirty/imap-mcp) to understand their APIs and tool interfaces.
  • Determine the requirements for declaring dependencies on MCP servers in SKILL.md files and calling their tools within the agent session.
  • Consider the security implications of storing sensitive information like email credentials in the SKILL.md front matter.

Example

mcp_servers:
  - name: email
    command: npx gabigabogabu/email-mcp-server
    env:
      - EMAIL_USER
      - EMAIL_PASSWORD
      - IMAP_HOST
      - SMTP_HOST

This example illustrates the proposed interface for declaring an MCP server dependency in a SKILL.md file.

Notes

The implementation details of the MCP client and its integration with the OpenClaw skill runtime are not specified in the issue. Further discussion and design are necessary to determine the best approach.

Recommendation

Apply a workaround by using custom CLI scripts or binary CLIs like himalaya until native MCP client support is implemented in the OpenClaw skill runtime. This allows skills to utilize MCP servers while the native support is being developed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Enhancement: MCP client support in agent skills (enable imap-smtp-email and other MCP servers as backends)