Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .agent/aidevops/mcp-integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ tools:
- Perplexity MCP: `PERPLEXITY_API_KEY` required
- Google Search Console: `GOOGLE_APPLICATION_CREDENTIALS` (service account JSON)

**Document Processing**:
- Unstract MCP: `UNSTRACT_API_KEY` + `API_BASE_URL` required (Docker-based, self-hosted default)

**Development**:
- Claude Code MCP: Claude Code automation (forked server)
- Next.js DevTools MCP
Expand Down Expand Up @@ -60,6 +63,10 @@ This document provides comprehensive setup and usage instructions for advanced M
- **Claude Code MCP**: Run Claude Code as an MCP server for automation
- **Next.js DevTools MCP**: Next.js development and debugging assistance

### **📄 Document Processing**

- **Unstract MCP**: LLM-powered structured data extraction from unstructured documents (PDF, images, DOCX)

### **📧 CRM & Marketing**

- **FluentCRM MCP**: WordPress CRM with contacts, campaigns, automations, and email marketing
Expand Down Expand Up @@ -202,6 +209,64 @@ export FLUENTCRM_API_PASSWORD="your_application_password"

See `services/crm/fluentcrm.md` for detailed documentation.

### **Unstract MCP**

```bash
# 1. Self-hosted (recommended): unstract-helper.sh install
# 2. Or cloud: Sign up at https://unstract.com/start-for-free/
# 3. Create a Prompt Studio project, define schema, deploy as API
# 4. Store credentials in ~/.config/aidevops/mcp-env.sh:
export UNSTRACT_API_KEY="your_api_key_here"
export API_BASE_URL="http://backend.unstract.localhost/deployment/api/your-id/"
chmod 600 ~/.config/aidevops/mcp-env.sh
```

**Note**: The MCP expects `API_BASE_URL` (not prefixed) - this matches the official Unstract spec.

**For OpenCode** - Docker-based, disabled globally, enabled on-demand:

```json
{
"unstract": {
"type": "local",
"command": ["/bin/bash", "-c", "source ~/.config/aidevops/mcp-env.sh && docker run -i --rm -v /tmp:/tmp -e UNSTRACT_API_KEY -e API_BASE_URL -e DISABLE_TELEMETRY=true unstract/mcp-server:${UNSTRACT_IMAGE_TAG:-latest} unstract"],
"enabled": false
}
}
```

**For Claude Desktop** (Docker):

```json
{
"mcpServers": {
"unstract_tool": {
"command": "/usr/local/bin/docker",
"args": [
"run", "-i", "--rm",
"-v", "/tmp:/tmp",
"-e", "UNSTRACT_API_KEY",
"-e", "API_BASE_URL",
"-e", "DISABLE_TELEMETRY=true",
"unstract/mcp-server", "unstract"
],
"env": {
"UNSTRACT_API_KEY": "your_api_key",
"API_BASE_URL": "http://backend.unstract.localhost/deployment/api/.../"
}
}
}
}
```

**Per-Agent Enablement**: The `services/document-processing/unstract.md` subagent has `unstract_tool: true` in its tools section. Agents needing document extraction reference this subagent.

**Available Tools**: `unstract_tool` - submits files, polls for completion, returns structured JSON. Supports optional metadata and metrics.

**Image Pinning**: Set `UNSTRACT_IMAGE_TAG` env var to pin a specific version for reproducibility.

See `services/document-processing/unstract.md` for detailed documentation.

## 🔧 **Configuration Examples**

### **Advanced Chrome DevTools Configuration**
Expand Down Expand Up @@ -277,6 +342,12 @@ export AHREFS_API_KEY="your_40_char_ahrefs_key"
export PERPLEXITY_API_KEY="your_perplexity_key"
export CLOUDFLARE_ACCOUNT_ID="your_account_id"
export CLOUDFLARE_API_TOKEN="your_api_token"

# Unstract - document processing (see services/document-processing/unstract.md)
export UNSTRACT_API_KEY="your_unstract_api_key"
export API_BASE_URL="http://backend.unstract.localhost/deployment/api/your-id/"
# Optional: pin image version for reproducibility
export UNSTRACT_IMAGE_TAG="latest"
```

## 🚀 **Getting Started**
Expand Down
28 changes: 27 additions & 1 deletion .agent/scripts/setup-mcp-integrations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ get_mcp_command() {
"stagehand-both") echo "both" ;;
"dataforseo") echo "npx dataforseo-mcp-server" ;;
# serper - REMOVED: Uses curl subagent (.agent/seo/serper.md), no MCP needed
"unstract") echo "docker:unstract/mcp-server" ;;
*) echo "" ;;
esac
return 0
}

# Available integrations list
MCP_LIST="chrome-devtools playwright cloudflare-browser ahrefs perplexity nextjs-devtools google-search-console pagespeed-insights grep-vercel claude-code-mcp stagehand stagehand-python stagehand-both dataforseo"
MCP_LIST="chrome-devtools playwright cloudflare-browser ahrefs perplexity nextjs-devtools google-search-console pagespeed-insights grep-vercel claude-code-mcp stagehand stagehand-python stagehand-both dataforseo unstract"

# Check prerequisites
check_prerequisites() {
Expand Down Expand Up @@ -280,6 +281,31 @@ install_mcp() {
;;
# "serper" - REMOVED: Uses curl subagent (.agent/seo/serper.md), no MCP needed
# Get API key from https://serper.dev/ and set SERPER_API_KEY in mcp-env.sh
"unstract")
print_info "Setting up Unstract self-hosted document processing platform..."
print_info "This installs the full Unstract platform locally via Docker Compose"
print_info "Requirements: Docker, Docker Compose, Git, 8GB RAM"
echo

# Run the helper script for installation
local helper_script="${SCRIPT_DIR}/unstract-helper.sh"
if [[ -f "$helper_script" ]]; then
bash "$helper_script" install
else
print_error "unstract-helper.sh not found at ${helper_script}"
print_info "Manual install:"
print_info " git clone https://github.com/Zipstack/unstract.git ~/.aidevops/unstract"
print_info " cd ~/.aidevops/unstract && ./run-platform.sh"
return 1
fi

echo
print_info "Your existing LLM API keys can be used as Unstract adapters:"
print_info " Run: unstract-helper.sh configure-llm"
print_info ""
print_info "The MCP connects to your local instance by default."
print_info "Config template: configs/mcp-templates/unstract.json"
;;
*)
print_error "Unknown MCP integration: $mcp_name"
print_info "Available integrations: $MCP_LIST"
Expand Down
Loading