Sponsored by Deepsite.site

Endor

Created By
endorhq7 months ago
Endor lets your AI agents run services like MariaDB, Postgres, Redis, Memcached, Alpine, or Valkey in isolated sandboxes. Get pre-configured applications that boot in less than 5 seconds, with direct AI agent integration for instant development and testing environments.
Content

Setup and Configuration

Starting the MCP Server

# Install Endor CLI
npm install -g @endorhq/cli

# Start MCP server (stdio mode)
endor mcp

# Or with network access enabled
endor mcp --allow-net

Connecting from AI Clients

The MCP server communicates via stdio transport. Configure your AI client to connect to the Endor MCP server:

{
  "mcpServers": {
    "endor": {
      "command": "endor",
      "args": ["mcp", "--allow-net"]
    }
  }
}

Available Tools

Core Management Tools

list_available_services

Returns available service types that can be provisioned.

Response:

["alpine", "mariadb", "memcached", "postgres", "redis", "valkey"]

list_running_services

Lists all currently running service instances.

Response:

["postgres-server-abc123", "redis-server-def456"]

run_command_in_service

Execute shell commands inside running service VMs.

Parameters:

  • serverId (string): Service instance identifier
  • command (string): Shell command to execute
  • timeout (number, optional): Timeout in seconds (max 600)

Example:

{
  "serverId": "postgres-server-abc123",
  "command": "psql -c 'SELECT version();'",
  "timeout": 30
}

Response:

{
  "serverId": "postgres-server-abc123",
  "command": "psql -c 'SELECT version();'",
  "stdout": "PostgreSQL 15.3 on x86_64-pc-linux-gnu...",
  "stderr": "",
  "returnCode": 0,
  "success": true
}

Service-Specific Tools

Each service type provides three main tools:

run_{service}_service

Provisions a new service instance.

Parameters:

  • serverId (string, optional): Custom server ID
  • hostPort (number, optional): Preferred host port

Available Services:

  • run_postgres_service - PostgreSQL database
  • run_mariadb_service - MariaDB database
  • run_redis_service - Redis cache
  • run_valkey_service - Valkey cache
  • run_memcached_service - Memcached cache
  • run_alpine_service - Alpine Linux environment

stop_{service}_service

Stops and removes a service instance.

Parameters:

  • serverId (string): Service instance to stop

get_{service}_connection

Retrieves connection details for a service.

Response:

{
  "serverId": "postgres-server-abc123",
  "host": "localhost",
  "port": 5432,
  "username": "postgres",
  "password": "<passwordless>",
  "status": "running"
}

Usage Examples

Example 1: Setting Up a PostgreSQL Database

// 1. Start a PostgreSQL service
const postgresResult = await mcp.callTool("run_postgres_service", {
  serverId: "my-postgres-db"
});

// 2. Get connection details
const connectionInfo = await mcp.callTool("get_postgres_service_details", {
  serverId: "my-postgres-db"
});

// 3. Create a database and table
await mcp.callTool("run_command_in_service", {
  serverId: "my-postgres-db",
  command: "psql -c 'CREATE DATABASE testapp;'"
});

await mcp.callTool("run_command_in_service", {
  serverId: "my-postgres-db", 
  command: "psql testapp -c 'CREATE TABLE users (id SERIAL PRIMARY KEY, name VARCHAR(50));'"
});

// 4. Insert sample data
await mcp.callTool("run_command_in_service", {
  serverId: "my-postgres-db",
  command: "psql testapp -c \"INSERT INTO users (name) VALUES ('Alice'), ('Bob');\""
});

// 5. Query the data
const queryResult = await mcp.callTool("run_command_in_service", {
  serverId: "my-postgres-db",
  command: "psql testapp -c 'SELECT * FROM users;'"
});

Example 2: Multi-Service Setup (Database + Cache)

// Start PostgreSQL and Redis services
await mcp.callTool("run_postgres_service", { serverId: "app-db" });
await mcp.callTool("run_redis_service", { serverId: "app-cache" });

// Get connection details for both
const dbConnection = await mcp.callTool("get_postgres_service_details", {
  serverId: "app-db"
});
const cacheConnection = await mcp.callTool("get_redis_service_details", {
  serverId: "app-cache"
});

// Set up database schema
await mcp.callTool("run_command_in_service", {
  serverId: "app-db",
  command: "psql -c 'CREATE DATABASE myapp;'"
});

// Test Redis cache
await mcp.callTool("run_command_in_service", {
  serverId: "app-cache", 
  command: "redis-cli SET greeting 'Hello, World!'"
});

const cacheValue = await mcp.callTool("run_command_in_service", {
  serverId: "app-cache",
  command: "redis-cli GET greeting"
});

Example 3: Development Environment with Alpine Linux

// Start Alpine Linux environment
await mcp.callTool("run_alpine_service", { 
  serverId: "dev-env" 
});

// Install development tools
await mcp.callTool("run_command_in_service", {
  serverId: "dev-env",
  command: "apk add --no-cache git nodejs npm python3"
});

// Clone and set up a project
await mcp.callTool("run_command_in_service", {
  serverId: "dev-env",
  command: "git clone https://github.com/example/project.git /workspace"
});

await mcp.callTool("run_command_in_service", {
  serverId: "dev-env",
  command: "cd /workspace && npm install"
});

Service Connection Details

PostgreSQL

  • Default Port: 5432
  • Username: postgres
  • Password: (none)
  • SSH Access: Port 2222, user 'root'

MariaDB

  • Default Port: 3306
  • Username: root
  • Password: (none)
  • SSH Access: Port 2222, user 'root'

Redis

  • Default Port: 6379
  • No authentication required

Valkey

  • Default Port: 6379
  • No authentication required

Memcached

  • Default Port: 11211
  • No authentication required

Best Practices

  1. Service Naming: Use descriptive service IDs (e.g., "user-api-db", "session-cache")
  2. Resource Cleanup: Always stop services when done using stop_{service}_service
  3. Command Timeouts: Set appropriate timeouts for long-running commands
  4. Error Handling: Check command return codes and stderr for errors
  5. Port Conflicts: Let Endor assign ports automatically for better reliability

Server Config

{
  "mcpServers": {
    "endor": {
      "command": "npx -y @endorhq/cli@latest",
      "args": [
        "mcp",
        "--allow-net"
      ],
      "env": {}
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
DeepChatYour AI Partner on Desktop
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
WindsurfThe new purpose-built IDE to harness magic
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
CursorThe AI Code Editor
ChatWiseThe second fastest AI chatbot™
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Amap Maps高德地图官方 MCP Server
Serper MCP ServerA Serper MCP Server
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Playwright McpPlaywright MCP server
Tavily Mcp