Brain Execution Server

Brain Execution Server

A queue-based execution server that monitors a command queue and executes shell commands or Python scripts, moving completed or failed jobs to respective directories.

Category
Visit Server

README

Brain Execution Server

A queue-based execution server that monitors and processes jobs from the Brain MCP command queue.

Features

  • Monitors /Users/bard/mcp/memory_files/command_queue/pending for jobs
  • Executes shell commands and Python scripts
  • Supports both JSON and text file job formats
  • Moves completed jobs to completed/ or failed/ directories
  • 5-minute timeout for safety
  • Logs all operations to daemon.log

Job Formats

JSON Format

{
  "command": "which",
  "args": ["node"],
  "description": "Check if node is in PATH"
}

Or:

{
  "task_id": "unique_id",
  "command": "python3 /path/to/script.py",
  "purpose": "Description of the job",
  "result_file": "optional_output.txt"
}

Text Format

Plain text files (.txt or .sh) containing shell commands:

cd /path/to/dir && python script.py

Installation & Usage

  1. Start the server:

    cd /Users/bard/Code/mcp-execution-server
    python3 server.py
    
  2. Monitor the queue:

    python3 /Users/bard/mcp/memory_files/command_queue/queue_viewer.py
    
  3. Add a job to the queue:

    # JSON job
    echo '{"command": "echo", "args": ["Hello from queue!"]}' > /Users/bard/mcp/memory_files/command_queue/pending/test_job.json
    
    # Text job
    echo 'ls -la /Users/bard/Code' > /Users/bard/mcp/memory_files/command_queue/pending/list_code.txt
    

Running in Background with LaunchControl

Create a launch agent to run the server automatically:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.brain.execution-server</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/bin/python3</string>
        <string>/Users/bard/Code/mcp-execution-server/server.py</string>
    </array>
    <key>WorkingDirectory</key>
    <string>/Users/bard/Code/mcp-execution-server</string>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
    <key>StandardOutPath</key>
    <string>/Users/bard/mcp/memory_files/command_queue/server.log</string>
    <key>StandardErrorPath</key>
    <string>/Users/bard/mcp/memory_files/command_queue/server.error.log</string>
</dict>
</plist>

Queue Directories

  • Pending: /Users/bard/mcp/memory_files/command_queue/pending/ - Jobs waiting to be processed
  • Completed: /Users/bard/mcp/memory_files/command_queue/completed/ - Successfully executed jobs
  • Failed: /Users/bard/mcp/memory_files/command_queue/failed/ - Jobs that failed or timed out
  • Logs: /Users/bard/mcp/memory_files/command_queue/daemon.log - Server activity log

Security Note

This server executes arbitrary code from the queue. Ensure proper permissions on the queue directories.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured