MCP Protocol Integration

Bidirectional Tool Connectivity for Limitless Extensibility


Overview

Model Context Protocol (MCP) is Anthropic’s open standard for connecting AI systems to external tools and data sources. Archivus implements MCP bidirectionally, functioning as both a client (consuming external tools) and a server (exposing capabilities to other systems).


Archivus as MCP Client

Connect external MCP servers to extend Archie’s capabilities.

Supported Integrations

Service Capabilities Use Case
GitHub Issues, PRs, code search “Create an issue for this bug”
Slack Messages, channels “Post summary to #updates”
PostgreSQL SQL queries “Query customer data”
Filesystem File operations “Read config files”
Custom Any MCP server Your integrations

Configuration

POST /api/v1/mcp/servers
Content-Type: application/json

{
  "name": "GitHub Integration",
  "server_type": "http",
  "endpoint_url": "https://mcp.github.example.com",
  "tool_prefix": "github",
  "auth_type": "bearer",
  "credentials": {
    "token": "ghp_xxxxxxxxxxxx"
  },
  "enabled": true
}

Tool Namespacing

External tools are prefixed to avoid collisions:

Archie's 26 built-in tools:
├── search_documents
├── ask_documents
├── compare_documents
└── ...

+ MCP GitHub tools:
├── mcp_github_create_issue
├── mcp_github_list_repos
└── mcp_github_search_code

+ MCP Slack tools:
├── mcp_slack_post_message
├── mcp_slack_search
└── ...

Using MCP Tools in Archie

Once connected, use natural language:

“Create a GitHub issue titled ‘Documentation outdated’ in the archivus repo with the summary from this document”

Archie automatically selects and invokes the appropriate MCP tool.


Archivus as MCP Server

Expose Archivus capabilities to other AI systems.

Available Tools

When connected as an MCP server, Archivus exposes:

Tool Description
archivus_search Semantic document search
archivus_ask Q&A with document context
archivus_summarize Document summarization
archivus_upload Document ingestion
archivus_list Document listing
archivus_analyze Document analysis

MCP Server Endpoint

GET /api/v1/mcp/server/info

Response:
{
  "name": "archivus",
  "version": "1.0.0",
  "protocol_version": "2024-11-05",
  "capabilities": {
    "tools": true,
    "resources": true,
    "prompts": false
  },
  "tools": [
    {
      "name": "archivus_search",
      "description": "Search documents by semantic meaning",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {"type": "string"},
          "limit": {"type": "integer", "default": 10}
        },
        "required": ["query"]
      }
    }
  ]
}

Connecting External AI Systems

External AI systems can connect to Archivus MCP server:

# Example: Claude Desktop connecting to Archivus
{
  "mcpServers": {
    "archivus": {
      "url": "https://api.archivus.app/mcp",
      "auth": {
        "type": "bearer",
        "token": "YOUR_API_KEY"
      }
    }
  }
}

MCP in DAG Workflows

Use external MCP tools within DAG orchestration.

MCP Node Type

{
  "node_type": "mcp_tool",
  "config": {
    "server_id": "github_integration",
    "tool_name": "create_issue",
    "parameters": {
      "repo": "",
      "title": "",
      "body": ""
    }
  }
}

Example: Document to GitHub Issue

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Trigger   │────▶│  Summarize  │────▶│   Create    │
│  (Upload)   │     │  Document   │     │GitHub Issue │
│             │     │  (AI Node)  │     │ (MCP Node)  │
└─────────────┘     └─────────────┘     └─────────────┘

Security Model

Credential Encryption

All MCP credentials are encrypted:

  • AES-256-GCM encryption at rest
  • Credentials never logged
  • Per-tenant key isolation
  • Automatic key rotation (Enterprise)

Tenant Isolation

MCP connections are tenant-scoped:

  • Each tenant manages their own MCP servers
  • No cross-tenant tool access
  • Audit logging for all MCP operations

Permission Model

{
  "mcp_permissions": {
    "can_add_servers": ["admin"],
    "can_use_tools": ["admin", "editor"],
    "can_view_servers": ["admin", "editor", "viewer"]
  }
}

Transport Types

Standard HTTP-based transport for production:

{
  "server_type": "http",
  "endpoint_url": "https://mcp.example.com",
  "timeout_ms": 30000
}

SSE (Server-Sent Events)

For real-time streaming responses:

{
  "server_type": "sse",
  "endpoint_url": "https://mcp.example.com/sse",
  "keepalive_ms": 30000
}

Stdio (Development Only)

For local development with subprocess-based servers:

{
  "server_type": "stdio",
  "command": "npx",
  "args": ["-y", "@modelcontextprotocol/server-github"]
}

Health Monitoring

Connection Health

GET /api/v1/mcp/servers/{id}/health

Response:
{
  "server_id": "github_integration",
  "status": "healthy",
  "last_check": "2026-01-18T10:30:00Z",
  "latency_ms": 145,
  "tools_available": 12,
  "recent_errors": 0
}

Usage Statistics

GET /api/v1/mcp/servers/{id}/stats

Response:
{
  "server_id": "github_integration",
  "period": "last_24h",
  "total_calls": 156,
  "successful_calls": 154,
  "failed_calls": 2,
  "avg_latency_ms": 230,
  "by_tool": [
    {"tool": "create_issue", "calls": 45},
    {"tool": "search_code", "calls": 89}
  ]
}

API Reference

MCP Server Management

Endpoint Method Description
/mcp/servers GET List MCP servers
/mcp/servers POST Add MCP server
/mcp/servers/{id} GET Get server details
/mcp/servers/{id} PUT Update server
/mcp/servers/{id} DELETE Remove server
/mcp/servers/{id}/test POST Test connection
/mcp/servers/{id}/toggle PUT Enable/disable
/mcp/servers/{id}/tools GET List server tools

Archivus MCP Server

Endpoint Method Description
/mcp/server/info GET Server capabilities
/mcp/server/tools GET Available tools
/mcp/server/invoke POST Invoke tool

Tier Availability

Feature Team Enterprise
MCP Client (connect to servers) 5 servers Unlimited
MCP Server (expose to others) Read-only Full access
MCP in DAG Workflows Full Full
Custom MCP Servers - Available

Best Practices

Security

  1. Use HTTPS - Always use secure endpoints
  2. Rotate Credentials - Regular credential rotation
  3. Minimal Permissions - Grant only required access
  4. Monitor Usage - Review MCP audit logs

Performance

  1. Use HTTP Transport - Avoid stdio in production
  2. Set Timeouts - Appropriate timeout configuration
  3. Enable Health Checks - Monitor connection status
  4. Cache Where Possible - Reduce redundant calls

Organization

  1. Descriptive Names - Clear server naming
  2. Consistent Prefixes - Logical tool namespacing
  3. Document Integrations - Maintain integration docs


Ready to extend Archivus? Configure MCP Integrations →