Skip to main content
Universal MCP provides multiple server implementations to host and expose MCP applications and their tools. Each server type is designed for different use cases, from local development to production deployment.

Supported Server Types

Local Server

The LocalServer class is ideal for local development and self-hosting. It:
  • Loads applications from local configuration
  • Manages a local store for data persistence
  • Supports integration with external services
  • Exposes application tools through the MCP protocol

AgentR Server

The AgentRServer class connects to the AgentR platform for dynamic app loading and credential management. It:
  • Connects to the AgentR API
  • Dynamically fetches and loads available applications
  • Manages AgentR-specific integrations
  • Requires an API key for authentication

Single MCP Server

The SingleMCPServer class is a minimal server for testing and single-app hosting. It:
  • Hosts a single application instance
  • Is ideal for development and testing
  • Does not manage integrations or stores internally
  • Exposes only the tools from the provided application

Core Features

All server implementations provide:
  • Tool management and registration
  • Application loading and configuration
  • Error handling and logging
  • MCP protocol compliance
  • Integration support

Usage

You can initialize each server implementation with a ServerConfig object that specifies:
  • Server name and description
  • Port configuration
  • Application configurations
  • Store configuration (where applicable)
Example:
from universal_mcp.servers import LocalServer
from universal_mcp.config import ServerConfig

config = ServerConfig(
    name="My Local Server",
    description="Development server for testing applications",
    port=8000,
    # ... additional configuration
)

server = LocalServer(config)

Tool Management

Servers provide methods for:
  • Adding individual tools
  • Listing available tools
  • Calling tools with proper error handling
  • Formatting tool results

Error Handling

All servers implement comprehensive error handling for:
  • Tool execution failures
  • Application loading errors
  • Integration setup issues
  • API communication problems