mcp-client-integration
Connect MCP servers to AI clients — Claude Desktop, Claude Code, Cursor, the Claude Agent SDK, and custom apps — including config file locations, auth, and debugging connection failures. Use this skill when the user wants to wire an MCP server into a client, troubleshoot "server not connecting" errors, or build a custom MCP client with the SDK. Activate when: MCP client, mcp.json, claude_desktop_config.json, connect MCP, MCP not working, list MCP tools, programmatic MCP client.
What this skill does
# MCP Client Integration
**Wire any MCP server into the client that will consume it — declaratively for IDEs, programmatically for custom apps.**
## When to Use
- Installing an MCP server into Claude Desktop, Claude Code, or Cursor
- Building a custom MCP client (web app, CLI, agent framework)
- Debugging "server failed to start" or "no tools showing up"
- Sharing MCP config across a team
## Config File Locations
| Client | Config path |
|---|---|
| Claude Desktop (macOS) | `~/Library/Application Support/Claude/claude_desktop_config.json` |
| Claude Desktop (Windows) | `%APPDATA%\Claude\claude_desktop_config.json` |
| Claude Code | `~/.claude/settings.json` (user) or `.mcp.json` (project) |
| Cursor | `~/.cursor/mcp.json` (user) or `.cursor/mcp.json` (project) |
## Declarative Install — stdio Server
```json
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
}
}
}
}
```
## Declarative Install — HTTP/SSE Server
```json
{
"mcpServers": {
"linear": {
"url": "https://mcp.linear.app/sse",
"headers": {
"Authorization": "Bearer ${LINEAR_TOKEN}"
}
}
}
}
```
Claude Code supports OAuth: omit `headers` and you'll be prompted to authenticate in-browser on first tool call.
## Project-Scoped Config
Check a `.mcp.json` into the repo so teammates auto-inherit the right servers:
```json
{
"mcpServers": {
"postgres-dev": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/dev"]
}
}
}
```
Claude Code reads this on startup. Add `.mcp.json` to `.gitignore` only if it contains secrets; otherwise commit it.
## Programmatic Client — TypeScript
```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
const transport = new StdioClientTransport({
command: "npx",
args: ["-y", "@modelcontextprotocol/server-github"],
env: { GITHUB_TOKEN: process.env.GITHUB_TOKEN! },
});
const client = new Client({ name: "my-app", version: "1.0.0" });
await client.connect(transport);
const tools = await client.listTools();
const result = await client.callTool({
name: "create_issue",
arguments: { repo: "owner/repo", title: "Bug", body: "..." },
});
```
## Programmatic Client — HTTP Transport
```ts
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
const transport = new StreamableHTTPClientTransport(
new URL("https://mcp.example.com"),
{ requestInit: { headers: { Authorization: `Bearer ${token}` } } },
);
await client.connect(transport);
```
## Using MCP with the Claude Agent SDK
```ts
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();
const response = await client.beta.messages.create({
model: "claude-sonnet-4-6",
max_tokens: 4096,
mcp_servers: [
{ type: "url", url: "https://mcp.linear.app/sse", name: "linear" },
],
messages: [{ role: "user", content: "List my open Linear issues" }],
});
```
The SDK handles tool-use loop internally.
## Debugging Connection Failures
1. **Check stderr** — Claude Desktop logs MCP server stderr to `~/Library/Logs/Claude/mcp*.log`. Tail it while restarting the client
2. **Run the command manually** — if `npx -y @modelcontextprotocol/server-github` fails in your terminal, it'll fail for Claude
3. **Absolute paths** — `command: "node"` depends on PATH; prefer `command: "/usr/local/bin/node"` or `npx`
4. **Env var substitution** — Claude Desktop doesn't expand `${VAR}` in all fields; inline the value or use an env manager
5. **Tool list empty?** — the server connected but registered no tools. Check server logs for schema validation errors
## Best Practices
1. Prefer `npx -y` over local installs — updates flow automatically
2. Pin versions (`@modelcontextprotocol/[email protected]`) for production CI
3. Use project-scoped `.mcp.json` for team-shared servers, user-scoped for personal ones
4. Never put secrets in committed config — use env var interpolation or OS keychain
5. When a server misbehaves, start with MCP Inspector before blaming the client
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.