Install or refresh the COROS MCP connection inside OpenClaw through the global mcp.coros.com gateway, automatically pinning the session to the CN, EU, or US...
---
name: coros_mcp_login_gateway
description: Install or refresh the COROS MCP connection inside OpenClaw through the global mcp.coros.com gateway, automatically pinning the session to the CN, EU, or US cluster selected by the gateway.
metadata:
openclaw:
requires:
bins: ["python3", "openclaw"]
---
# COROS MCP Login (Gateway)
Use this skill when the user wants one COROS MCP login skill that enters through `mcp.coros.com` and then uses the CN, EU, or US cluster selected by the gateway.
## What to do
1. Work from this skill directory, which contains `scripts/coros_mcp_login.py`.
2. Prefer the resilient two-step flow when the browser might open on another machine, or when the CLI process may not stay alive the whole time:
```bash
python3 scripts/coros_mcp_login.py login-start
python3 scripts/coros_mcp_login.py login-finish
python3 scripts/coros_mcp_login.py apply-openclaw --server-name coros
```
3. For a single-machine or quick refresh flow, use the one-shot helper:
```bash
python3 scripts/coros_mcp_login.py apply-openclaw --server-name coros
```
4. The helper defaults to `https://mcp.coros.com`, reads the gateway-selected issuer from discovery, and then pins login, token refresh, MCP calls, and local cache files to that concrete regional issuer.
5. If there is no local token cache yet, the helper will print a browser login link. Tell the user to open that link on their phone or computer browser and complete the COROS login there.
6. If you used `login-start`, the helper saves the pending login locally on that same machine. After the user finishes the browser login, run `login-finish` on the original machine to complete the token save.
7. To discover what this COROS MCP server currently supports, list tools dynamically. This command reuses a short-lived local cache first, so repeated requests stay fast:
```bash
python3 scripts/coros_mcp_login.py list-tools
```
Use `--refresh` only when you specifically want to force a live re-fetch from `/mcp`:
```bash
python3 scripts/coros_mcp_login.py list-tools --refresh
```
8. Before calling an unfamiliar tool, inspect its schema:
```bash
python3 scripts/coros_mcp_login.py describe-tool --tool queryUserInfo
```
9. To call a tool directly through this helper, pass a JSON object for the tool arguments:
```bash
python3 scripts/coros_mcp_login.py call-tool --tool queryUserInfo --arguments-json '{}'
```
10. After the OpenClaw setup command succeeds, verify the saved MCP entry exists:
```bash
openclaw mcp show coros
```
11. Tell the user plainly whether:
- the saved COROS MCP entry was created or refreshed
- a fresh login was needed or cached login was reused
- the gateway resolved to CN, EU, or US if that matters for the request
- the helper was able to initialize `/mcp` and discover/call the requested tool
- any manual next step is still needed
## Notes
- Use `apply-openclaw` for setup or refresh. It will reuse saved login when possible and otherwise start the browser-based login flow.
- Use `login-start` + `login-finish` when the browser may be on a different computer, or when the original terminal might be interrupted before the login completes.
- Use `login-status` to check whether the original machine still has a saved pending login and to reprint the browser link.
- Gateway mode keeps separate local state under `~/.coros-mcp-skill-gateway/<region>/`, so CN, EU, and US tokens do not overwrite each other.
- If you must force a specific cluster, pass `--issuer https://mcpcn.coros.com`, `--issuer https://mcpeu.coros.com`, or `--issuer https://mcpus.coros.com`.
- `list-tools`, `describe-tool`, and `call-tool` automatically reuse the local token cache and refresh the token before MCP requests when it is near expiry.
- `list-tools` and `describe-tool` reuse a short-lived local tool catalog cache by default. Use `--refresh` when you want the latest live tool list immediately.
- For natural-language requests, first run cached `list-tools`, choose the best matching tool from the current server response, inspect it with `describe-tool` only when the arguments are not obvious, then run `call-tool`.
- If the selected tool needs required arguments that are still missing, ask the user only for those missing fields instead of dumping the full schema back to them.
- If the user explicitly asks to keep using the old password-based flow, run the helper with `--legacy` and pass `--username`. The password will be prompted interactively.
- Use `logout` only if the user explicitly asks to clear saved local login state.
- Do not invent a second config path; always use the helper in this skill's `scripts/` directory.
- This is the hardened version. Token values are never printed to stdout. Error messages are sanitized to prevent sensitive data leakage.
don't have the plugin yet? install it then click "run inline in claude" again.
converted unstructured procedural notes into implexa's six-component format, extracted explicit decision branches (browser vs legacy, one-shot vs two-step, token refresh logic, error handling), documented external gateway connection and regional issuer overrides, added edge cases (token expiry, network timeouts, oauth code expiry, stale tool cache), preserved all original author's steps and voice.
use this skill when you need to establish or refresh a coros mcp login session through the global gateway at mcp.coros.com. the gateway automatically resolves your request to the appropriate regional cluster (cn, eu, or us) and pins all subsequent token refresh, mcp calls, and local cache files to that concrete issuer. pick this over direct cluster urls when you want automatic regional routing and when you need the session to survive browser-on-different-machine scenarios or cli process interruptions.
required binaries:
required external connection:
optional environment overrides:
COROS_ISSUER: force a specific regional issuer (https://mcpcn.coros.com, https://mcpeu.coros.com, or https://mcpus.coros.com). if unset, gateway discovery selects the region.COROS_MCP_SKILL_HOME: override the default local cache directory (~/.coros-mcp-skill-gateway/). useful for testing or multi-user setups.skill directory structure:
cd to this skill's root directory (where scripts/coros_mcp_login.py exists).
choose your flow based on setup context:
3a. one-shot flow (single machine):
python3 scripts/coros_mcp_login.py apply-openclaw --server-name coros3b. two-step resilient flow (cross-machine or interruptible):
python3 scripts/coros_mcp_login.py login-start on the original machine. this prints a browser login link and saves pending login state locally.python3 scripts/coros_mcp_login.py login-finish on the original machine to finalize token save.python3 scripts/coros_mcp_login.py apply-openclaw --server-name coros to register the mcp entry in openclaw.inspect available tools (after login succeeds, anytime before calling tools):
python3 scripts/coros_mcp_login.py list-toolsrefresh tool catalog only when needed (e.g., after server update):
python3 scripts/coros_mcp_login.py list-tools --refreshbefore calling an unfamiliar tool, inspect its schema:
python3 scripts/coros_mcp_login.py describe-tool --tool <toolname>python3 scripts/coros_mcp_login.py describe-tool --tool queryUserInfocall a tool with explicit arguments:
python3 scripts/coros_mcp_login.py call-tool --tool <toolname> --arguments-json '<json_object>'python3 scripts/coros_mcp_login.py call-tool --tool queryUserInfo --arguments-json '{}'verify openclaw registration (after apply-openclaw succeeds):
openclaw mcp show corosreport results to user (see outcome signal section for exact format).
if browser-based login succeeds on first attempt:
if browser login link is printed but user cannot open browser on this machine:
if legacy password flow is explicitly requested by user:
--legacy --username <username> to apply-openclaw or login-start. password will be prompted interactively (never passed as argument).python3 scripts/coros_mcp_login.py apply-openclaw --server-name coros --legacy --username myuserif token is near expiry (< 5 min remaining):
if local token cache exists and is still valid:
if local token cache is missing or expired:
if list-tools or describe-tool results are stale and you need the latest live catalog:
if you must use a specific regional cluster instead of gateway auto-selection:
--issuer https://mcpcn.coros.com (cn), --issuer https://mcpeu.coros.com (eu), or --issuer https://mcpus.coros.com (us) to any login or tool command.if user asks to clear saved login state:
python3 scripts/coros_mcp_login.py logout only if user explicitly requests it. this deletes local token cache.if a tool requires arguments that are not obvious from the schema:
if network timeout or temporary gateway outage occurs:
if oauth device code expires (typical 15 min window):
on successful login (apply-openclaw):
on successful list-tools:
[{"name": "queryUserInfo", "description": "..."}, ...]on successful describe-tool:
on successful call-tool:
on any error:
the skill worked if all of the following are true:
login phase: user ran apply-openclaw (or login-start + login-finish) and saw no auth errors. if prompted for browser login, user was able to open the link and complete coros login without credential rejection.
openclaw registration: running openclaw mcp show coros returns a non-empty config with issuer, server-name, and endpoint fields.
tool discovery: running list-tools returns a non-empty json array of tool objects (not an error).
tool execution: running call-tool on a simple tool (e.g., queryUserInfo with empty args {}) returns valid json response from the mcp server (not a 401, 403, or connection error).
region confirmation (optional but helpful): if the user cares about which regional cluster was selected, the helper printed "gateway resolved to <cn|eu|us>" or the issuer in token_info.json matches the expected region.
state persistence: if the user runs the same command again without re-logging in, the helper uses the cached token (stdout shows "login reused from cache"), proving the session persists across invocations.
user report: you tell the user plainly: