| name | mcp-client |
| description | Use this skill when the user asks to look up library documentation, check API references, query MCP servers, or needs up-to-date docs for any programming library or framework. Triggers on: "check the docs for X", "how does X API work", "what's the latest X syntax", "look up X documentation", "find me examples for X", "how do I use X in version Y", or any request for current library/framework reference material. Uses Context7 MCP server for live, version-accurate documentation.
|
MCP Client
Overview
Connects OpenClaw to MCP (Model Context Protocol) servers over HTTP using the
streamable-http transport. Primary integration: Context7 — live, up-to-date
documentation for any programming library or framework. Easily extensible to
additional MCP servers.
Quick Start
~/.agents/skills/mcp-client/scripts/context7-resolve.sh "next.js"
~/.agents/skills/mcp-client/scripts/context7-resolve.sh "react" "hooks and state"
~/.agents/skills/mcp-client/scripts/context7-docs.sh "/vercel/next.js" "how to use app router"
~/.agents/skills/mcp-client/scripts/context7-docs.sh "/websites/react_dev" "useEffect cleanup"
~/.agents/skills/mcp-client/scripts/test-mcp.sh
Workflow
User asks about library X
│
▼
context7-resolve.sh "X"
→ Returns library ID (e.g. /vercel/next.js)
│
▼
context7-docs.sh <id> "<specific question>"
→ Returns live documentation & code examples
│
▼
Synthesize answer for user
Important: Both context7-resolve.sh and context7-docs.sh require a
descriptive query parameter for relevance ranking. Be specific:
- ✅
"how to configure JWT auth in middleware"
- ❌
"auth"
Generic MCP Calls
Use mcp-call.sh directly to call any tool on any MCP server:
~/.agents/skills/mcp-client/scripts/mcp-call.sh \
<server-url> <tool-name> '<args-json>'
~/.agents/skills/mcp-client/scripts/mcp-call.sh \
https://mcp.context7.com/mcp \
resolve-library-id \
'{"libraryName": "tailwindcss", "query": "responsive grid layout"}'
~/.agents/skills/mcp-client/scripts/mcp-call.sh \
https://mcp.context7.com/mcp \
query-docs \
'{"libraryId": "/tailwindlabs/tailwindcss", "query": "responsive grid layout"}'
Session IDs are cached in /tmp/mcp-session-<hash>.txt (5-minute TTL) to
avoid redundant initialize handshakes. Context7 is stateless and works without
a session ID.
Server Registry
See references/servers.md for the full list of configured MCP servers,
their endpoints, exact tool schemas (with required fields), and verified
library IDs.
Scripts
| Script | Purpose |
|---|
mcp-call.sh | Generic MCP JSON-RPC caller — handles init, stateless fallback, SSE parsing |
context7-resolve.sh | Resolve library name → Context7 library ID |
context7-docs.sh | Fetch live docs for a library with a topic query |
test-mcp.sh | End-to-end connectivity + smoke test (prints PASS/FAIL) |