Agent Skill
2/7/2026

smelteros-mcp-management

Model Context Protocol (MCP) management and integration skill. Covers ACP, UCP, Sanity MCP, Composio, World Labs API, Crawlers (Firecrawl, Apify, Tavily, Serper), and Sandboxes (E2B, CodeSandbox). Use this when working with AI agent protocols and external service integrations.

A
achvmr
0GitHub Stars
1Views
npx skills add ACHVMR/SmelterOS

SKILL.md

Namesmelteros-mcp-management
DescriptionModel Context Protocol (MCP) management and integration skill. Covers ACP, UCP, Sanity MCP, Composio, World Labs API, Crawlers (Firecrawl, Apify, Tavily, Serper), and Sandboxes (E2B, CodeSandbox). Use this when working with AI agent protocols and external service integrations.

name: smelteros-mcp-management description: Model Context Protocol (MCP) management and integration skill. Covers ACP, UCP, Sanity MCP, Composio, World Labs API, Crawlers (Firecrawl, Apify, Tavily, Serper), and Sandboxes (E2B, CodeSandbox). Use this when working with AI agent protocols and external service integrations.

SmelterOS MCP & Integration Management

Comprehensive guide for managing Model Context Protocol (MCP) servers, crawlers, sandboxes, and related agentic communication protocols within the SmelterOS ecosystem.


๐Ÿ”‘ Environment Setup (NO HARDCODING)

All API keys and secrets are stored in .env.local. See .env.example for the full template.

# Copy the template
cp .env.example .env.local

# Edit with your keys
code .env.local

Key Categories:

  • AI Providers: OpenRouter, OpenAI, Anthropic, Google AI
  • World Labs: 3D world generation API
  • MCP Crawlers: Firecrawl, Apify, Tavily, Serper
  • Sandboxes: E2B, CodeSandbox
  • CMS: Sanity
  • Unified MCP: Composio

Model Context Protocol (MCP)

The Model Context Protocol is an open standard for connecting AI assistants to external data sources, tools, and services. It provides a unified way for AI agents to:

  • Access files and databases
  • Execute tools and commands
  • Integrate with third-party services
  • Maintain context across sessions

Related Protocols

ProtocolFull NamePurpose
MCPModel Context ProtocolCore protocol for AI-to-service communication
ACPAgentic Communication Protocol / Agent Client ProtocolAgent-to-agent and agent-to-client messaging
UCPUniversal Communication ProtocolCross-platform, protocol-agnostic integration layer

๐Ÿ”Œ Protocol Activation

ACP (Agentic Communication Protocol)

ACP enables structured communication between AI agents and clients.

Configuration:

{
  "acp": {
    "version": "1.0",
    "mode": "bidirectional",
    "channels": {
      "agent-to-agent": true,
      "agent-to-client": true,
      "broadcast": false
    },
    "authentication": {
      "type": "bearer",
      "tokenEndpoint": "/auth/acp/token"
    },
    "messageFormat": "json",
    "compression": "gzip"
  }
}

Activation Steps:

  1. Configure ACP endpoint in environment
  2. Set up authentication tokens
  3. Register agent capabilities
  4. Establish communication channels

Environment Variables:

ACP_ENABLED=true
ACP_ENDPOINT=wss://your-domain.com/acp
ACP_AUTH_TOKEN=your-acp-token
ACP_AGENT_ID=smelteros-agent-001

UCP (Universal Communication Protocol)

UCP provides a unified abstraction layer across different protocols.

Configuration:

{
  "ucp": {
    "version": "1.0",
    "adapters": [
      "mcp",
      "acp",
      "rest",
      "graphql",
      "grpc"
    ],
    "routing": {
      "strategy": "round-robin",
      "fallback": true,
      "retryPolicy": {
        "maxRetries": 3,
        "backoffMs": 1000
      }
    },
    "transforms": {
      "input": ["normalize", "validate"],
      "output": ["format", "compress"]
    }
  }
}

Activation Steps:

  1. Install UCP adapter package
  2. Configure protocol adapters
  3. Set up routing rules
  4. Enable protocol bridging

Environment Variables:

UCP_ENABLED=true
UCP_PRIMARY_PROTOCOL=mcp
UCP_FALLBACK_PROTOCOLS=acp,rest
UCP_TRANSFORM_ENABLED=true

๐Ÿ“ฆ MCP Server Integrations

Sanity MCP Server

Purpose: Headless CMS integration for content management, structured data, and GROQ queries.

What Sanity MCP Provides:

  • Real-time content fetching via GROQ
  • Asset management (images, files)
  • Schema introspection
  • Document CRUD operations
  • Webhook event handling

Configuration:

{
  "mcpServers": {
    "sanity": {
      "command": "npx",
      "args": ["-y", "@sanity/mcp-server"],
      "env": {
        "SANITY_PROJECT_ID": "your-project-id",
        "SANITY_DATASET": "production",
        "SANITY_API_TOKEN": "your-api-token",
        "SANITY_API_VERSION": "2024-01-01"
      }
    }
  }
}

Available Tools:

ToolDescription
sanity_queryExecute GROQ queries
sanity_createCreate new documents
sanity_updateUpdate existing documents
sanity_deleteDelete documents
sanity_assetsManage media assets
sanity_schemaIntrospect content schemas

Example GROQ Queries:

// Get all blog posts
*[_type == "post"]{title, slug, publishedAt}

// Get post with references
*[_type == "post" && slug.current == "my-post"][0]{
  title,
  body,
  "author": author->{name, image}
}

Composio Unified MCP Integration Manager

Purpose: Centralized management of multiple MCP servers and tool integrations.

What Composio Provides:

  • Unified tool registry across MCP servers
  • Authentication management for 100+ integrations
  • Rate limiting and quota management
  • Usage analytics and monitoring
  • Pre-built integrations (GitHub, Slack, Notion, etc.)

Configuration:

{
  "mcpServers": {
    "composio": {
      "command": "npx",
      "args": ["-y", "composio-mcp"],
      "env": {
        "COMPOSIO_API_KEY": "your-composio-api-key"
      }
    }
  }
}

Pre-Built Integrations:

CategoryServices
DevelopmentGitHub, GitLab, Jira, Linear, Notion
CommunicationSlack, Discord, Email, Teams
ProductivityGoogle Workspace, Airtable, Trello
DataPostgreSQL, MongoDB, Supabase
AI/MLOpenAI, Anthropic, Hugging Face
StorageAWS S3, Google Cloud, Dropbox

Activation via Composio:

import { ComposioToolSet } from "composio-core";

const toolset = new ComposioToolSet({
  apiKey: process.env.COMPOSIO_API_KEY
});

// Get available tools
const tools = await toolset.getTools({
  apps: ["github", "slack", "notion"]
});

๐Ÿ› ๏ธ MCP Server Setup

Adding a New MCP Server

Step 1: Install the MCP server package

npm install -g @modelcontextprotocol/server-name
# or
npx -y @modelcontextprotocol/server-name

Step 2: Configure in your MCP settings

For VS Code / Cursor / Windsurf:

// .vscode/mcp.json or equivalent
{
  "mcpServers": {
    "server-name": {
      "command": "npx",
      "args": ["-y", "@scope/server-name"],
      "env": {
        "API_KEY": "${env:SERVER_API_KEY}"
      }
    }
  }
}

Step 3: Verify connection

  • Restart your IDE/agent
  • Check server logs for connection status
  • Test a simple tool call

Common MCP Servers

ServerPackagePurpose
Filesystem@modelcontextprotocol/server-filesystemLocal file operations
GitHub@modelcontextprotocol/server-githubGitHub API access
PostgreSQL@modelcontextprotocol/server-postgresDatabase queries
Puppeteer@modelcontextprotocol/server-puppeteerBrowser automation
Brave Search@modelcontextprotocol/server-brave-searchWeb search
Memory@modelcontextprotocol/server-memoryPersistent memory
Sanity@sanity/mcp-serverCMS integration
Composiocomposio-mcpUnified integrations

๐Ÿ“ SmelterOS MCP Configuration

Recommended Configuration File

Create .mcp/config.json in the project root:

{
  "version": "1.0",
  "protocols": {
    "mcp": {
      "enabled": true,
      "servers": {
        "filesystem": {
          "command": "npx",
          "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/dir"]
        },
        "sanity": {
          "command": "npx",
          "args": ["-y", "@sanity/mcp-server"],
          "env": {
            "SANITY_PROJECT_ID": "${env:SANITY_PROJECT_ID}",
            "SANITY_DATASET": "production",
            "SANITY_API_TOKEN": "${env:SANITY_API_TOKEN}"
          }
        },
        "composio": {
          "command": "npx",
          "args": ["-y", "composio-mcp"],
          "env": {
            "COMPOSIO_API_KEY": "${env:COMPOSIO_API_KEY}"
          }
        }
      }
    },
    "acp": {
      "enabled": true,
      "endpoint": "${env:ACP_ENDPOINT}",
      "agentId": "smelteros-foundry"
    },
    "ucp": {
      "enabled": true,
      "adapters": ["mcp", "acp", "rest"]
    }
  }
}

Environment Variables Template

Add to .env.local:

# Sanity CMS
SANITY_PROJECT_ID=your-project-id
SANITY_DATASET=production
SANITY_API_TOKEN=your-sanity-token

# Composio
COMPOSIO_API_KEY=your-composio-api-key

# ACP
ACP_ENABLED=true
ACP_ENDPOINT=wss://api.smelteros.com/acp
ACP_AGENT_ID=foundry-agent-001

# UCP
UCP_ENABLED=true
UCP_PRIMARY_PROTOCOL=mcp

๐Ÿ”„ Protocol Bridging

MCP โ†” ACP Bridge

Enable agents using MCP to communicate with ACP-based systems:

// bridge/mcp-acp.ts
interface ProtocolBridge {
  source: "mcp" | "acp";
  target: "mcp" | "acp";
  transform: (message: unknown) => unknown;
}

const mcpToAcp: ProtocolBridge = {
  source: "mcp",
  target: "acp",
  transform: (mcpMessage) => ({
    type: "acp_request",
    payload: mcpMessage,
    metadata: {
      sourceProtocol: "mcp",
      timestamp: Date.now()
    }
  })
};

UCP Universal Adapter

// adapters/ucp-adapter.ts
interface UCPAdapter {
  protocol: string;
  connect: () => Promise<void>;
  send: (message: unknown) => Promise<unknown>;
  receive: () => AsyncGenerator<unknown>;
}

const createUCPAdapter = (protocol: string): UCPAdapter => {
  // Implementation based on protocol type
};

๐Ÿงช Testing MCP Connections

Health Check Script

# Test MCP server connectivity
npx @modelcontextprotocol/inspector

# Test specific server
npx mcp-test --server sanity --timeout 5000

Manual Testing

// test/mcp-health.ts
async function testMCPServers() {
  const servers = ["filesystem", "sanity", "composio"];
  
  for (const server of servers) {
    try {
      const result = await mcpClient.ping(server);
      console.log(`โœ… ${server}: ${result.latency}ms`);
    } catch (error) {
      console.log(`โŒ ${server}: ${error.message}`);
    }
  }
}

๐Ÿ“Š Monitoring & Debugging

Logging Configuration

{
  "logging": {
    "mcp": {
      "level": "debug",
      "includePayloads": true,
      "destination": "logs/mcp.log"
    },
    "acp": {
      "level": "info",
      "destination": "logs/acp.log"
    }
  }
}

Common Issues

IssueSolution
Server not connectingCheck environment variables and network
Authentication failedVerify API keys and tokens
Timeout errorsIncrease timeout, check server health
Tool not foundVerify server is running, check tool name

๐ŸŽฏ When to Use This Skill

  1. Setting up new MCP servers โ€” Follow server setup steps
  2. Integrating external services โ€” Use Composio or direct MCP
  3. Configuring agent protocols โ€” Reference ACP/UCP activation
  4. Content management โ€” Use Sanity MCP integration
  5. Debugging connections โ€” Use testing and monitoring sections
  6. Protocol bridging โ€” Reference bridging patterns
  7. Web crawling/scraping โ€” Use Firecrawl, Apify, Tavily, or Serper clients
  8. 3D world generation โ€” Use World Labs API client
  9. AI code execution โ€” Use E2B or CodeSandbox sandboxes

๐ŸŒ World Labs API (3D World Generation)

Generate immersive 3D worlds from text, images, or video.

Client Location: apps/web/src/lib/integrations/world-labs.ts

Usage:

import { generateWorldAndWait } from '@/lib/integrations';

const world = await generateWorldAndWait({
  display_name: "Mystical Foundry",
  world_prompt: {
    type: 'text',
    text_prompt: 'An industrial smelting foundry with molten metal rivers'
  },
  model: 'Marble 0.1-plus' // or 'Marble 0.1-mini' for faster/cheaper
});

console.log(world.world_marble_url); // View in browser
console.log(world.assets.splats.spz_urls.full_res); // 3D Gaussian splat

๐Ÿ•ท๏ธ Crawler/Scraper Clients

Unified interface for web crawling and search.

Client Location: apps/web/src/lib/integrations/crawler.ts

ProviderBest ForAPI Key Env Var
FirecrawlClean Markdown extractionFIRECRAWL_API_KEY
ApifyComplex scraping with ActorsAPIFY_API_TOKEN
TavilyAI-powered search + extractTAVILY_API_KEY
SerperGoogle search resultsSERPER_API_KEY

Usage:

import { crawl, search } from '@/lib/integrations';

// Crawl a single page
const page = await crawl('https://example.com', { provider: 'firecrawl' });
console.log(page.markdown);

// Search the web
const results = await search('SmelterOS AI platform', 'tavily');
results.forEach(r => console.log(r.url, r.content));

๐Ÿงช Sandbox Clients (AI Code Execution)

Secure sandboxes for executing AI-generated code.

Client Location: apps/web/src/lib/integrations/sandbox.ts

ProviderBest ForAPI Key Env Var
E2BPython/Node executionE2B_API_KEY
CodeSandboxFull web projectsCODESANDBOX_API_KEY

Usage:

import { createSandbox, stopSandbox } from '@/lib/integrations';

// Execute Python code
const result = await createSandbox(`
print("Hello from SmelterOS!")
result = 2 + 2
print(f"Result: {result}")
`, { provider: 'e2b', template: 'python' });

console.log(result.output);

// Clean up
await stopSandbox(result.id, 'e2b');

๐Ÿ“š Resources

MCP & Protocols:

Crawlers & Search:

3D World Generation:

Sandboxes:

Skills Info
Original Name:smelteros-mcp-managementAuthor:achvmr