---
name: mcp
description: |
  MCP server management and health check for SmartStack.
  Use this skill when:
  - User wants to check MCP status
  - User mentions "mcp", "healthcheck", "mcp status"
  - Before any MCP-dependent operation fails
  - After MCP configuration changes
  Subcommands: healthcheck, tools
model: haiku
allowed-tools: Read, Bash, Glob
---

## Current state (auto-injected)
- MCP cache: !`cat .claude/mcp-status.json 2>/dev/null || echo "no cache"`

# Skill MCP SmartStack

Manages MCP server connectivity and health verification.

> **Note:** The MCP server is now bundled inside `@atlashub/smartstack-cli`. There is no separate `@atlashub/smartstack-mcp` package.

## Subcommands

| Command | Description |
|---------|-------------|
| `/mcp healthcheck` | Full MCP health check with version verification. See [steps/step-01-healthcheck.md](steps/step-01-healthcheck.md) |
| `/mcp tools` | List all available MCP tools with descriptions. See [steps/step-02-tools.md](steps/step-02-tools.md) |

## Cache File

**Location:** `.claude/mcp-status.json`

```json
{
  "lastCheck": "2024-01-15T10:30:00.000Z",
  "mcpVersion": "2.0.0",
  "bundled": true,
  "status": "ok" | "error",
  "toolsAvailable": ["tool1", "tool2", ...],
  "errors": ["error1", ...] // only if status = error
}
```

**Validity:** 7 days

## Integration with Hook

The `mcp-check` hook automatically:
1. Reads this cache before any `mcp__smartstack__*` call
2. Displays warning if cache > 7 days
3. Blocks if last status was "error"

This skill provides the **full check** that the hook references.

<success_criteria>
- MCP server connectivity verified (healthcheck passes)
- Tool list displayed with descriptions
- Cache status updated in .claude/mcp-status.json
- Clear error message if MCP unavailable with remediation steps
</success_criteria>
