Cover image
Try Now
2025-04-10

3 years

Works with Finder

1

Github Watches

0

Github Forks

0

Github Stars

Running the AgentTorch MCP Server

This guide explains how to run the AgentTorch MCP server both locally and with Claude Desktop integration using Docker.

Option 1: Running Locally with Docker

Prerequisites

  • Docker installed on your machine
  • Docker Compose installed on your machine
  • Git installed on your machine

Step 1: Clone the Repository

git clone https://github.com/AgentTorch/mcp-server
cd mcp-server

Step 2: Set Up Environment Files

Create an .env file in the project root with your Anthropic API key:

# Create .env file
cat > .env << 'EOL'
ANTHROPIC_API_KEY=api_key
PYTHONPATH=/app
AGENTTORCH_CONFIG_PATH=/app/config.yaml
EOL

Step 3: Launch with Docker Compose

# Start the containers
docker-compose up -d

# Check if the containers are running
docker-compose ps

# View logs
docker-compose logs -f

Step 4: Access the Web UI

Open your browser and go to:

http://localhost:8080

Step 5: Run the MCP Server Locally

You can interact with the containerized MCP server using the following command:

# Execute the server directly in the container
docker exec -it agenttorch-mcp mcp run server.py

Option 2: Claude Desktop Integration

Step 1: Create Required Files

Ensure you've completed Steps 1-3 from Option 1 above to get the Docker container running.

Step 2: Configure Claude Desktop

Create or update Claude Desktop configuration:

  1. Locate your Claude Desktop configuration directory:

    • macOS: ~/.claude-desktop/
    • Windows: %APPDATA%\claude-desktop\
    • Linux: ~/.config/claude-desktop/
  2. Create or edit the config.json file:

# For macOS/Linux
mkdir -p ~/.claude-desktop
cat > ~/.claude-desktop/config.json << 'EOL'
{
  "mcpServers": {
    "AgentTorch Simulator": {
      "command": "docker",
      "args": [
        "exec",
        "-i",
        "agenttorch-mcp",
        "mcp",
        "run",
        "server.py"
      ]
    }
  }
}
EOL

# For Windows (using PowerShell)
# New-Item -Path "$env:APPDATA\claude-desktop" -ItemType Directory -Force
# Set-Content -Path "$env:APPDATA\claude-desktop\config.json" -Value '{
#   "mcpServers": {
#     "AgentTorch Simulator": {
#       "command": "docker",
#       "args": [
#         "exec",
#         "-it",
#         "agenttorch-mcp",
#         "mcp",
#         "run",
#         "server.py"
#       ]
#     }
#   }
# }'

Step 3: Launch Claude Desktop

  1. Open Claude Desktop
  2. You should see "AgentTorch Simulator" in the server selection dropdown
  3. Select it to connect to your Docker container

Step 4: Test Integration

  1. Start a new conversation in Claude Desktop
  2. Select one of the available prompts (e.g., "Run Simulation")
  3. Enter a query like "Run a simulation with 500 predators and 1000 prey"
  4. Check both Claude Desktop and the web UI (http://localhost:8080) for results

Troubleshooting

Docker Issues

# Restart the container
docker-compose restart

# Rebuild the container (if you made changes)
docker-compose down
docker-compose up -d --build

# Check container logs
docker-compose logs -f

Claude Desktop Connection Issues

  1. Verify Docker container is running:

    docker ps | grep agenttorch-mcp
    
  2. Check if the container can execute MCP commands:

    docker exec -it agenttorch-mcp mcp list
    
  3. Restart Claude Desktop

Web UI Issues

  1. Check if the HTTP server is running:

    docker exec -it agenttorch-mcp curl http://localhost:8080
    
  2. Check port mappings:

    docker-compose ps
    

Container Management Commands

# Stop the container
docker-compose stop

# Start the container
docker-compose start

# Remove the container (keeps your data)
docker-compose down

# Remove the container and volumes (deletes your data)
docker-compose down -v

# View container resource usage
docker stats

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • pontusab
  • La comunidad de cursor y windsurf, encontrar reglas y MCP

  • ravitemer
  • Un poderoso complemento Neovim para administrar servidores MCP (protocolo de contexto del modelo)

  • jae-jae
  • Servidor MCP para obtener contenido de la página web con el navegador sin cabeza de dramaturgo.

  • patruff
  • Puente entre los servidores Ollama y MCP, lo que permite a LLM locales utilizar herramientas de protocolo de contexto del modelo

  • av
  • Ejecute sin esfuerzo LLM Backends, API, frontends y servicios con un solo comando.

  • chongdashu
  • Habilite clientes asistentes de IA como Cursor, Windsurf y Claude Desktop para controlar el motor irreal a través del lenguaje natural utilizando el Protocolo de contexto del modelo (MCP).

  • wgpsec
  • 一款基于各大企业信息 API 的工具 , 解决在遇到的各种针对国内企业信息收集难题。一键收集控股公司 解决在遇到的各种针对国内企业信息收集难题。一键收集控股公司 ICP 备案、 Aplicación 、小程序、微信公众号等信息聚合导出。支持 MCP 接入

    Reviews

    5 (1)
    Avatar
    user_gbMe8uUf
    2025-04-17

    I have been using mcp-server by AgentTorch and it has exceeded my expectations. The setup process is straightforward, and the documentation available on the GitHub link (https://github.com/AgentTorch/mcp-server) is comprehensive. The server's performance is robust and reliable, making it an excellent choice for my projects. The community and support around this product are also commendable. Highly recommend it!