clarc MCP Server Guide

When to Use MCP vs CLI Commands

SurfaceAudienceOutput FormatUse When
MCP toolsAgents, CI/CD, programmatic clientsStructured JSONAnother AI tool or pipeline needs clarc data
CLI commandsHumans in terminalFormatted prose + checklistsYou are working interactively in Claude Code

Rule of thumb: If you are a human typing in a terminal, use CLI commands (/find-skill, /clarc-way). If you are an agent or script consuming data, use MCP tools.


Tool Reference

Shared-library tools (MCP and CLI use the same logic)

MCP ToolCLI EquivalentWhat they share
skill_search/find-skillscripts/lib/skill-search.js
get_project_contextsession-start.js detectionscripts/lib/project-detect.js

These return the same results. MCP returns JSON; CLI returns formatted terminal output.

Unique MCP tools (no CLI equivalent)

ToolPurpose
get_component_graphAgent→skill dependency graph. Answers "which agents use skill X?" or "what skills does agent Y need?". Reads uses_skills from agent frontmatter.
get_health_statusInstallation health check: symlink status, hook registration, INDEX.md freshness. Designed for CI/CD pipelines.
get_instinct_statusLearned instincts with confidence scores. Useful for meta-agents inspecting clarc's learned patterns.
get_session_contextLatest session snapshot. Useful for agent-to-agent context passing.
agent_describeFull agent instructions. Useful for meta-agents that need to inspect or compose with clarc agents.
rule_checkRule file content. Useful for compliance checking in CI.

Setup

Claude Desktop / Cursor / other MCP clients

Add to your client's MCP config:

{
  "mcpServers": {
    "clarc": {
      "command": "node",
      "args": ["/path/to/.clarc/mcp-server/index.js"]
    }
  }
}

For clarc installed via symlink at ~/.clarc/:

{
  "mcpServers": {
    "clarc": {
      "command": "node",
      "args": ["${HOME}/.clarc/mcp-server/index.js"]
    }
  }
}

As self-hosted (clarc inspecting itself)

Use mcp-configs/clarc-self.json:

# In ~/.claude/settings.json
{
  "mcpServers": {
    "clarc-self": {
      "command": "node",
      "args": ["${CLAUDE_PLUGIN_ROOT}/mcp-server/index.js"]
    }
  }
}

CI/CD health checks

# .github/workflows/clarc-health.yml
- name: Check clarc health
  run: |
    echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_health_status","arguments":{}}}' \
      | node .clarc/mcp-server/index.js | jq '.result.content[0].text | fromjson | .healthy'

Examples

Check which agents use a specific skill

{ "tool": "get_component_graph", "arguments": { "skill": "typescript-patterns" } }

Returns:

{
  "skill_to_agents": {
    "typescript-patterns": ["typescript-reviewer", "code-reviewer", "frontend-architect"]
  }
}

Search skills from an agent

{ "tool": "skill_search", "arguments": { "query": "react state management", "limit": 5 } }

Detect project type for a given directory

{ "tool": "get_project_context", "arguments": { "cwd": "/path/to/project" } }

Health check for CI gate

{ "tool": "get_health_status", "arguments": { "check": "symlinks" } }