add-gmail-tool

Wires the Gmail MCP server into NanoClaw agent groups using OneCLI-managed OAuth credential stubs.

2|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/RADHA0-max/selfhealbackend --skill add-gmail-tool-radha0-max
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-gmail-tool
Source: https://github.com/RADHA0-max/selfhealbackend/tree/main/nanoclaw/.claude/skills/add-gmail-tool
Command: npx skills add https://github.com/RADHA0-max/selfhealbackend --skill add-gmail-tool-radha0-max

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @gongrzhe/server-gmail-autoauth-mcp, zod-to-json-schema.

What problem does it solve? It connects Gmail (read, search, send, label, draft) to NanoClaw agent groups without ever placing raw OAuth credentials inside containers, by routing token injection through the OneCLI gateway. ## Core Features & Use Cases - OneCLI-native credential handling: Writes stub credential files containing onecli-managed placeholders; the OneCLI gateway swaps in the real OAuth bearer token at request time, so containers never hold usable secrets. - Container image integration: Adds a pinned GMAIL_MCP_VERSION ARG and a pnpm install -g block for @gongrzhe/server-gmail-autoauth-mcp to the Dockerfile, guarded by two structural tests. - Per-group wiring: Registers the gmail MCP server and the .gmail-mcp mount in the central SQLite DB per agent group, exposing mcp__gmail__* tools to the agent. - Use Case: After running the skill, a user can tell their personal agent "search my inbox for invoices from last month" and the agent calls mcp__gmail__search_emails with OneCLI injecting the real token in flight. ## Quick Start Ask the agent to add the Gmail tool to your NanoClaw agent groups using OneCLI-managed OAuth, then verify by asking the wired agent to list your Gmail labels.

Frequently Asked Questions about add-gmail-tool

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Gmail tools to a NanoClaw agent?

Install the `@gongrzhe/server-gmail-autoauth-mcp` package in the container Dockerfile, register the `gmail` MCP server per group with `ncl groups config add-mcp-server`, and add a `.gmail-mcp` mount in the central DB. Rebuild the image and restart the service.

How does OneCLI inject Gmail OAuth tokens into containers?

The container holds stub credential files with `onecli-managed` placeholder tokens. The OneCLI gateway intercepts outbound calls to gmail.googleapis.com and rewrites the Authorization header with the real OAuth bearer from its vault, so raw credentials never exist in the container.

Why does the Gmail MCP server fail with ERR_PACKAGE_PATH_NOT_EXPORTED?

The server's loose dependency range lets pnpm resolve zod-to-json-schema 3.25.x, which imports a zod subpath missing from the resolved zod 3.24.x. Pinning zod-to-json-schema to 3.22.5 in the Dockerfile install avoids the mismatch.

Why does the agent say it has no Gmail tools after setup?

The `gmail` MCP server is not registered in that group's mcpServers map, or the agent-runner image is stale. Re-run the add-mcp-server step for the group, rebuild with ./container/build.sh, and restart the service.

Can this skill receive inbound email as an agent trigger?

No. This skill is tool-only, exposing Gmail actions the agent can call. Inbound email as a channel requires a separate `src/channels/gmail.ts` adapter that polls the inbox, which has not been ported to the v2 channel architecture.