clarc-mcp-integration
Patterns for using clarc MCP server in multi-agent workflows, CI pipelines, and external tools
Best use case
clarc-mcp-integration is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Patterns for using clarc MCP server in multi-agent workflows, CI pipelines, and external tools
Teams using clarc-mcp-integration should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/clarc-mcp-integration/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How clarc-mcp-integration Compares
| Feature / Agent | clarc-mcp-integration | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Patterns for using clarc MCP server in multi-agent workflows, CI pipelines, and external tools
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# clarc MCP Integration
## When to Activate
- Building a multi-agent workflow where one agent needs to inspect clarc state
- Setting up a CI/CD pipeline that checks clarc installation health
- Integrating clarc into Claude Desktop, Cursor, or another MCP-compatible client
- An agent needs to discover available skills or agents programmatically
## MCP vs CLI: The Core Decision
**Use MCP when:** another tool or agent is the consumer (structured JSON input/output required)
**Use CLI commands when:** a human is working interactively in a terminal
Both surfaces share the same underlying logic via shared library modules:
- `scripts/lib/skill-search.js` — powers both `skill_search` MCP tool and `/find-skill` CLI
- `scripts/lib/project-detect.js` — powers both `get_project_context` MCP tool and `session-start.js`
## Unique MCP Tools (no CLI equivalent)
### `get_component_graph`
Returns the agent→skill dependency graph built from `uses_skills` frontmatter in agent files.
```json
// Request
{ "name": "get_component_graph", "arguments": { "skill": "go-patterns" } }
// Response
{
"agents": 61,
"skills_referenced": 42,
"skill_to_agents": {
"go-patterns": ["go-reviewer", "go-build-resolver"]
}
}
```
**Use cases:**
- Determine which agents to invoke for a Go project
- Validate that a new skill is referenced by at least one agent
- CI check: ensure `uses_skills` references are not dangling
### `get_health_status`
Checks clarc installation integrity. Returns `healthy: true/false` and an `issues` array.
```json
// Request
{ "name": "get_health_status", "arguments": {} }
// Response
{
"healthy": true,
"issues": [],
"checks": {
"symlinks": { "agents": "symlink", "skills": "symlink", "hooks": "symlink" },
"hooks": { "claude_hooks_file": "present" },
"index": { "present": true, "age_hours": 2, "stale": false }
}
}
```
**CI gate pattern (one-liner):**
```bash
node mcp-server/index.js <<< '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_health_status","arguments":{}}}' \
| jq -e '.result.content[0].text | fromjson | .healthy'
```
**CI gate script (full — save as `scripts/ci/check-clarc-health.js`):**
```javascript
#!/usr/bin/env node
// check-clarc-health.js — exits 0 if clarc is healthy, 1 otherwise
// Usage: node scripts/ci/check-clarc-health.js
// Add to CI as a pre-step gate before running agents.
import { spawn } from 'child_process';
import { fileURLToPath } from 'url';
import { dirname, resolve } from 'path';
const __dirname = dirname(fileURLToPath(import.meta.url));
const mcpServer = resolve(__dirname, '../../mcp-server/index.js');
const request = JSON.stringify({
jsonrpc: '2.0', id: 1, method: 'tools/call',
params: { name: 'get_health_status', arguments: {} }
});
const proc = spawn('node', [mcpServer], { stdio: ['pipe', 'pipe', 'inherit'] });
let output = '';
proc.stdout.on('data', chunk => { output += chunk; });
proc.stdin.write(request + '\n');
proc.stdin.end();
proc.on('close', () => {
try {
const parsed = JSON.parse(output);
const status = JSON.parse(parsed.result.content[0].text);
if (status.healthy) {
console.log('clarc health: OK');
process.exit(0);
} else {
console.error('clarc health: FAILED');
console.error('Issues:', status.issues.join(', '));
process.exit(1);
}
} catch (err) {
console.error('clarc health: could not parse response', err.message);
process.exit(1);
}
});
```
## Multi-Agent Pattern: clarc-aware orchestrator
An orchestrator agent can use `get_component_graph` to dynamically route work to the right specialist:
```
1. Detect project type → get_project_context({ cwd })
2. Find relevant agents → get_component_graph({ skill: detected_primary_skill })
3. Invoke matching reviewer agent → agent_describe({ name: reviewer })
4. Run review with full agent instructions
```
## CI Integration Checklist
- [ ] MCP server path configured in CI environment
- [ ] `get_health_status` runs as a pre-step gate
- [ ] `healthy: false` fails the build (exit code 1)
- [ ] INDEX.md freshness check: `stale: false`
## Setup Reference
See [docs/mcp-guide.md](../../docs/mcp-guide.md) for full setup instructions, config examples, and all tool reference documentation.Related Skills
configure-clarc
Interactive installer for clarc — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.
clarc-way
The clarc Way — opinionated end-to-end software development methodology. 8-stage pipeline from idea to shipped code: /idea → /evaluate → /explore → /prd → /plan → /tdd → /code-review → commit. Activate when a user asks how to structure their workflow, which commands to use, or when to use clarc.
clarc-onboarding
Staged learning path for clarc — Day 1 survival commands, Week 1 workflow integration, Month 1 advanced agents. Includes solo, team, and role-specific paths.
clarc-hooks-authoring
Reference guide for writing, testing, and configuring clarc hooks — PreToolUse, PostToolUse, SessionStart, SessionEnd patterns with suppression and cooldown.
zero-trust-patterns
Zero-Trust security patterns — mTLS between microservices (Istio/SPIFFE), SPIRE workload identity, OPA/Envoy authorization, NetworkPolicy default-deny-all, short-lived credentials, service mesh security, and Kubernetes RBAC hardening.
wireframing
Wireframing and prototyping workflow: fidelity levels (lo-fi sketch → mid-fi wireframe → hi-fi prototype), tool selection (Figma, Excalidraw, Balsamiq), user flow diagrams, wireframe annotation standards, information architecture (IA) mapping, and the handoff from wireframe to visual design. For developers who need to communicate UI structure before writing code.
webrtc-patterns
WebRTC patterns — peer connection setup, ICE/STUN/TURN configuration, signaling server design, SFU vs mesh topology, screen sharing, media track management, and reconnect/ICE restart handling.
webhook-patterns
Webhook patterns for receiving, verifying (HMAC), and idempotently processing third-party events. Covers Stripe, GitHub, and generic webhook patterns, delivery guarantees, retry handling, and testing.
web-performance
Web performance optimization: Core Web Vitals (LCP, CLS, INP), Lighthouse CI with budget configuration, bundle analysis (webpack-bundle-analyzer, vite-bundle-visualizer), hydration performance, network waterfall reading, image optimization (WebP/AVIF, srcset), and font performance.
wasm-performance
WebAssembly performance: wasm-opt binary optimization, size reduction (panic=abort, LTO, strip), profiling WASM in Chrome DevTools, memory management (linear memory, avoiding GC pressure), SIMD, and multi-threading with SharedArrayBuffer.
wasm-patterns
WebAssembly patterns: wasm-pack, wasm-bindgen (JS↔Wasm interop), WASI, Component Model, wasm-opt, Rust-to-WASM compilation, JS integration (web workers, streaming instantiation), and production deployment (CDN, Content-Type headers).
visual-testing
Visual Regression Testing: tool comparison (Chromatic/Percy/Playwright screenshots/BackstopJS), pixel-diff vs AI-based comparison, baseline management, flakiness strategies (masks, tolerances, waitForLoadState), CI integration with GitHub Actions, and Storybook integration.