setup
Install MCP servers and behavior guides
What this skill does
# omc-mcp-extension Setup
Complete setup for MCP servers with behavior guides.
## What This Does
1. **Backs up** `~/.claude.json` and `~/.claude/CLAUDE.md`
2. **Updates** `~/.claude.json` mcpServers (skips duplicates)
3. **Copies MCP guide files** to `~/.claude/` directory
4. **Adds `@import` references** to `~/.claude/CLAUDE.md`
## Execution Steps
### Step 1: Backup Existing Files
```bash
BACKUP_DIR="$HOME/.claude/backups"
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
mkdir -p "$BACKUP_DIR"
# Backup ~/.claude.json
if [[ -f "$HOME/.claude.json" ]]; then
cp "$HOME/.claude.json" "$BACKUP_DIR/claude.json.backup_$TIMESTAMP"
echo "✅ Backup: ~/.claude.json"
fi
# Backup CLAUDE.md
if [[ -f "$HOME/.claude/CLAUDE.md" ]]; then
cp "$HOME/.claude/CLAUDE.md" "$BACKUP_DIR/CLAUDE.md.backup_$TIMESTAMP"
echo "✅ Backup: CLAUDE.md"
fi
```
### Step 2: Update ~/.claude.json mcpServers (Skip Duplicates)
Add MCP servers to `~/.claude.json` mcpServers field. Skip if already exists.
**Ask user:** "Enter your MORPH_API_KEY (from https://morphllm.com) or press Enter to skip Morphllm:"
```bash
CLAUDE_JSON="$HOME/.claude.json"
# MORPH_API_KEY from user input
# Ensure mcpServers exists as object
if ! jq -e '.mcpServers | type == "object"' "$CLAUDE_JSON" > /dev/null 2>&1; then
jq '.mcpServers = {}' "$CLAUDE_JSON" > tmp.json && mv tmp.json "$CLAUDE_JSON"
fi
# Add context7 (skip if exists)
if ! jq -e '.mcpServers.context7' "$CLAUDE_JSON" > /dev/null 2>&1; then
jq '.mcpServers.context7 = {
"command": "npx",
"args": ["-y", "@upstash/context7-mcp"]
}' "$CLAUDE_JSON" > tmp.json && mv tmp.json "$CLAUDE_JSON"
echo "✅ Added: context7"
else
echo "⏭️ Skipped: context7 (already exists)"
fi
# Add serena (skip if exists)
if ! jq -e '.mcpServers.serena' "$CLAUDE_JSON" > /dev/null 2>&1; then
jq '.mcpServers.serena = {
"command": "uvx",
"args": ["--from", "git+https://github.com/oraios/serena", "serena", "start-mcp-server", "--context", "ide-assistant"]
}' "$CLAUDE_JSON" > tmp.json && mv tmp.json "$CLAUDE_JSON"
echo "✅ Added: serena"
else
echo "⏭️ Skipped: serena (already exists)"
fi
# Add sequential-thinking (skip if exists)
if ! jq -e '.mcpServers["sequential-thinking"]' "$CLAUDE_JSON" > /dev/null 2>&1; then
jq '.mcpServers["sequential-thinking"] = {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
}' "$CLAUDE_JSON" > tmp.json && mv tmp.json "$CLAUDE_JSON"
echo "✅ Added: sequential-thinking"
else
echo "⏭️ Skipped: sequential-thinking (already exists)"
fi
# Add morphllm-fast-apply (skip if exists, include API key in env)
if ! jq -e '.mcpServers["morphllm-fast-apply"]' "$CLAUDE_JSON" > /dev/null 2>&1; then
if [[ -n "$MORPH_API_KEY" && "$MORPH_API_KEY" != "" ]]; then
jq --arg apikey "$MORPH_API_KEY" '.mcpServers["morphllm-fast-apply"] = {
"command": "npx",
"args": ["@morph-llm/morph-fast-apply"],
"env": {
"MORPH_API_KEY": $apikey
}
}' "$CLAUDE_JSON" > tmp.json && mv tmp.json "$CLAUDE_JSON"
echo "✅ Added: morphllm-fast-apply (with API key)"
else
echo "⏭️ Skipped: morphllm-fast-apply (no API key provided)"
fi
else
echo "⏭️ Skipped: morphllm-fast-apply (already exists)"
fi
```
### Step 3: Copy MCP Guide Files
```bash
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$(pwd)}"
CLAUDE_DIR="$HOME/.claude"
for md_file in "$PLUGIN_DIR/mcp/MCP_"*.md; do
if [[ -f "$md_file" ]]; then
filename=$(basename "$md_file")
cp "$md_file" "$CLAUDE_DIR/$filename"
echo "✅ Copied: $filename"
fi
done
```
### Step 4: Add @import References to CLAUDE.md
```bash
CLAUDE_MD="$HOME/.claude/CLAUDE.md"
START_MARKER="<!-- OMC-MCP-EXT:START -->"
END_MARKER="<!-- OMC-MCP-EXT:END -->"
build_content() {
cat << 'EOF'
<!-- OMC-MCP-EXT:START -->
# MCP Server Guides (omc-mcp-extension)
@MCP_Context7.md
@MCP_Serena.md
@MCP_Sequential.md
@MCP_Morphllm.md
<!-- OMC-MCP-EXT:END -->
EOF
}
# Create CLAUDE.md if not exists
if [[ ! -f "$CLAUDE_MD" ]]; then
mkdir -p "$(dirname "$CLAUDE_MD")"
echo "# User Instructions" > "$CLAUDE_MD"
fi
# Remove existing markers if present
if grep -q "$START_MARKER" "$CLAUDE_MD"; then
temp_file=$(mktemp)
awk -v start="$START_MARKER" -v end="$END_MARKER" '
$0 ~ start { skip=1; next }
$0 ~ end { skip=0; next }
!skip { print }
' "$CLAUDE_MD" > "$temp_file"
mv "$temp_file" "$CLAUDE_MD"
fi
# Append new content
echo "" >> "$CLAUDE_MD"
build_content >> "$CLAUDE_MD"
echo "✅ Added @import references to CLAUDE.md"
```
### Step 5: Completion Message
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ omc-mcp-extension Setup Complete!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
BACKUPS:
~/.claude/backups/claude.json.backup_[timestamp]
~/.claude/backups/CLAUDE.md.backup_[timestamp]
MCP SERVERS (in ~/.claude.json → mcpServers):
• context7 (official library documentation)
• serena (semantic code analysis + memory)
• sequential-thinking (structured reasoning)
• morphllm-fast-apply (bulk code editing) - if API key provided
MCP GUIDE FILES:
~/.claude/MCP_Context7.md
~/.claude/MCP_Serena.md
~/.claude/MCP_Sequential.md
~/.claude/MCP_Morphllm.md
CLAUDE.MD IMPORTS:
@MCP_Context7.md
@MCP_Serena.md
@MCP_Sequential.md
@MCP_Morphllm.md
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ Restart Claude Code to apply MCP changes!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ADD MORPHLLM LATER (if skipped):
Edit ~/.claude.json and add to mcpServers:
"morphllm-fast-apply": {
"command": "npx",
"args": ["@morph-llm/morph-fast-apply"],
"env": { "MORPH_API_KEY": "your-key-here" }
}
RESTORE:
cp ~/.claude/backups/claude.json.backup_[timestamp] ~/.claude.json
cp ~/.claude/backups/CLAUDE.md.backup_[timestamp] ~/.claude/CLAUDE.md
```
## Uninstall
```bash
# Remove MCP servers from ~/.claude.json
jq 'del(.mcpServers.context7, .mcpServers.serena, .mcpServers["sequential-thinking"], .mcpServers["morphllm-fast-apply"])' \
~/.claude.json > tmp.json && mv tmp.json ~/.claude.json
# Remove from CLAUDE.md
sed -i '' '/<!-- OMC-MCP-EXT:START -->/,/<!-- OMC-MCP-EXT:END -->/d' ~/.claude/CLAUDE.md
# Remove MCP guide files
rm -f ~/.claude/MCP_Context7.md ~/.claude/MCP_Serena.md ~/.claude/MCP_Sequential.md ~/.claude/MCP_Morphllm.md
```
## Restore from Backup
```bash
# List backups
ls -la ~/.claude/backups/
# Restore
cp ~/.claude/backups/claude.json.backup_[timestamp] ~/.claude.json
cp ~/.claude/backups/CLAUDE.md.backup_[timestamp] ~/.claude/CLAUDE.md
```
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.