Skip to content

terence-ma/clawconnect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clawconnect

    ████████████████████████████████████████
    ██                                    ██
    ██  ░░  ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄  ░░  ██
    ██  ░░ ██  ╔══╗  CLAW          ██ ░░  ██
    ██  ░░ ██  ║██║  CONNECT       ██ ░░  ██
    ██  ░░ ██  ╚══╝                ██ ░░  ██
    ██  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ██
    ████████████████████████████████████████
         CONSUME. CONNECT. CONTROL.

Cowork-style connectors for OpenClaw agents — via CLI, Telegram, and MCP.


What is clawconnect?

Claude Cowork has a polished connector store — authenticate Gmail, Slack, Notion, and dozens of other services in a few clicks, with explicit permission controls (read-only, write, approval required). OpenClaw agents have no equivalent: connectors are assembled through plugins, environment variables, and manual config.

clawconnect closes that gap. It gives OpenClaw users a Cowork-style connector experience from the terminal, with three components that work together:

  1. CLI — authenticate services, manage credentials, and execute actions directly
  2. MCP bridge — exposes all connected services as MCP tools, readable by both OpenClaw and Cowork custom connector slots
  3. Telegram companion — agents can request connector actions on your behalf; you approve via inline keyboard before anything executes

How clawconnect differs from existing tools

Several open-source Claude Cowork alternatives exist — OpenWork, Eigent, open-claude-cowork — but none of them solve the same problem:

OpenWork Eigent open-claude-cowork clawconnect
Target Cowork desktop replacement Multi-agent workforce Cowork desktop replacement OpenClaw connector layer
Interface Desktop GUI Desktop GUI Electron GUI CLI + Telegram + MCP
OpenClaw integration Partial (messaging only) ✓ Native via MCP
Cowork bridge ✓ Custom connector URL
Agent-initiated actions ✓ With user approval gate
Telegram approval flow ✓ (messaging only) ✓ Full connector approval
No GUI required
Custom connectors Via MCP Via MCP Via skills ✓ YAML/JSON drop-in
Requires Anthropic account

The specific gap clawconnect fills: OpenClaw agents can discover and call connector actions as MCP tools — and users can approve or deny those requests via Telegram — without any GUI, without Anthropic credentials, and without replacing their existing OpenClaw setup.


Built-in Connectors

Connector Auth Key Actions
gmail OAuth2 list, get, send, search messages
google-drive OAuth2 list, get, download, upload files
calendar OAuth2 list events, create event
slack OAuth2 list channels, send message, get messages
notion API Key databases, pages — list, query, create, update
github API Key repos, issues, PRs — list, create, get
custom API Key any MCP-compatible server URL

Install

pip install clawconnect

# Optional: YAML support for custom connectors
pip install pyyaml

# Or from source:
git clone https://github.com/terence-ma/clawconnect
cd clawconnect && pip install -e .

Quick Start

# 1. Initial setup
clawconnect init

# 2. Browse connectors
clawconnect connectors list

# 3. Connect services
clawconnect connect gmail          # OAuth2 — opens browser
clawconnect connect notion --api-key secret_xxx
clawconnect connect github --api-key ghp_xxx

# 4. Run an action
clawconnect run gmail list_messages --params '{"max_results": 5}'
clawconnect run slack send_message --params '{"channel": "#general", "text": "hello"}'

# 5. Start MCP bridge (OpenClaw + Cowork)
clawconnect bridge start

# 6. Start Telegram companion bot
clawconnect telegram start

MCP Bridge

The bridge server exposes all connected services as MCP tools over HTTP. One URL works in both OpenClaw and Cowork.

OpenClaw — add to ~/.openclaw/openclaw.json:

{
  "mcp": {
    "servers": {
      "clawconnect": {
        "url": "http://127.0.0.1:18800/mcp"
      }
    }
  }
}

Cowork — Settings → Connectors → Add custom connector:

URL: http://127.0.0.1:18800/mcp

Your agents can then call:

  • gmail__send_message, gmail__list_messages
  • slack__send_message, slack__list_channels
  • notion__create_page, notion__query_database
  • github__create_issue, github__list_repos
  • Any custom connector you've defined

Telegram Companion

Agents can request connector actions via the bridge. The Telegram bot surfaces those requests to you as inline keyboard approvals.

Agent wants to:  gmail → send_message
To:      [email protected]
Subject: Weekly report
Body:    Here is the summary...

[✅ Approve]  [❌ Deny]

Setup:

  1. Create a bot with @BotFather
  2. clawconnect init → enter bot token
  3. clawconnect telegram start

Custom Connectors

Method 1: Drop a YAML file (no Python required)

Create ~/.clawconnect/connectors/my-service.yaml:

name: my-service
display_name: My Service
description: Connect to My Service API
category: productivity
auth: api_key

actions:
  - name: list_items
    description: List all items
    params:
      limit: int
      query: str

  - name: create_item
    description: Create a new item
    params:
      title: str
      body: str

telegram_prompts:
  create_item:
    - field: title
      prompt: "Item title:"
    - field: body
      prompt: "Item content:"

# Auto-execute HTTP calls without writing Python
executor:
  base_url: https://api.my-service.com/v1
  auth_header: Authorization
  auth_prefix: Bearer
  actions:
    list_items:
      method: GET
      path: /items
      query_params: [limit, query]
    create_item:
      method: POST
      path: /items
      body_params: [title, body]

That's it. No code. Restart clawconnect and my-service appears in the connector list.

Method 2: Python executor (full control)

Add to connectors/registry.py and connectors/executor.py for connectors with complex auth, pagination, or response transformation needs. See existing connectors for the pattern.


Architecture

clawconnect/
├── cli.py                      # CLI entry point (click + rich)
├── connectors/
│   ├── registry.py             # Built-in connector definitions
│   ├── loader.py               # YAML/JSON custom connector loader
│   ├── oauth.py                # OAuth 2.0 browser flow
│   └── executor.py             # API call implementations
├── bridge/
│   └── server.py               # MCP JSON-RPC bridge server
└── telegram/
    └── bot.py                  # Telegram approval companion

Config: ~/.clawconnect/
├── settings.json               # Gateway URL, ports, bot token
├── tokens.json                 # Credentials (user-only permissions)
└── connectors/                 # Drop custom YAML/JSON connectors here
    └── example-connector.yaml.disabled

Security

  • Tokens stored at ~/.clawconnect/tokens.json with user-only file permissions
  • OAuth client secrets read from environment variables — never stored to disk
  • Every agent-initiated action requires explicit Telegram approval before execution
  • MCP bridge binds to 127.0.0.1 only — not exposed externally by default
  • Expose via Cloudflare Tunnel if remote access needed (not recommended without auth)

License

MIT — free to use, modify, and redistribute.

About

Cowork-style connectors for OpenClaw agents — CLI, Telegram approval, and MCP bridge

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages