MCP cover image
See in Github
2025-03-08

1

Github Watches

1

Github Forks

1

Github Stars

MCP Server Management Scripts

This repository contains scripts to easily start and manage MCP (Model Context Protocol) servers for development.

Scripts Overview

  • start-mcp-servers.sh: Starts all your MCP servers
  • manage-mcp-servers.sh: Helps you manage running MCP servers (list, stop, view logs, etc.)

Getting Started

Make sure both scripts are executable:

chmod +x start-mcp-servers.sh manage-mcp-servers.sh

Starting MCP Servers

To start all your MCP servers:

./start-mcp-servers.sh

By default, this will:

  1. Clear any existing log files
  2. Run all servers in the foreground with output displayed in the current terminal
  3. Prefix each line with the server name for easy identification

Running in Background Mode

If you prefer to run servers in the background:

./start-mcp-servers.sh --background

In background mode, the script will try to start servers using one of these methods (in order of preference):

  1. iTerm2 tabs (if using iTerm2)
  2. Terminal.app windows (if using Terminal.app)
  3. tmux sessions (if tmux is available)
  4. Background processes with log files (fallback method)

Command Line Options

./start-mcp-servers.sh --help

Available options:

  • --background, -b: Run servers in background mode
  • --help, -h: Show help message

Managing MCP Servers

The management script provides several commands to help you manage your running MCP servers:

Show Help

./manage-mcp-servers.sh help

List Running Servers

./manage-mcp-servers.sh list

This will show all configured servers and whether they're running or not.

Stop Servers

Stop all servers:

./manage-mcp-servers.sh stop

Stop a specific server (by number):

./manage-mcp-servers.sh stop 1  # Stop the first server

View Logs

List all log files:

./manage-mcp-servers.sh logs

View logs for a specific server (by number):

./manage-mcp-servers.sh logs 1  # View logs for the first server

Bring a Server to Foreground

./manage-mcp-servers.sh fg 1  # Bring the first server to foreground

If bringing to foreground isn't possible, it will show the log file in real-time.

Adding New MCP Servers

To add a new MCP server, you only need to edit the start-mcp-servers.sh file:

  1. Open start-mcp-servers.sh
  2. Find the MCP_SERVERS array at the top of the file
  3. Add your new server command as a new line in the array
MCP_SERVERS=(
  "npx @agentdeskai/browser-tools-server"
  "npx -y @modelcontextprotocol/server-sequential-thinking"
  "npx your-new-server-command"  # Add your new server here
)

The management script will automatically pick up the new server from the start script.

Log Management

The scripts handle logs in the following ways:

  1. Automatic Cleanup: When starting servers, existing log files are automatically cleared to prevent them from growing too large.

  2. Foreground Mode: In the default foreground mode, logs are displayed directly in the terminal with server name prefixes.

  3. Background Mode: In background mode, logs are saved to files named after each server (e.g., browser-tools-server.log).

  4. Viewing Logs: Use ./manage-mcp-servers.sh logs to view logs for background processes.

How It Works

  • The start script defines all your MCP servers in an array at the top
  • It detects your environment and starts the servers in the most appropriate way
  • The management script extracts the server configuration from the start script
  • It uses pgrep to find running processes and pkill to stop them
  • For viewing logs, it uses tail -f to show real-time updates

Troubleshooting

If you encounter any issues:

  1. Make sure both scripts are executable (chmod +x *.sh)
  2. Check that the server commands in the array are correct
  3. Look at the log files in the current directory for error messages
  4. Try running the server commands manually to see if they work

相关推荐

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

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

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

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

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

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

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

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

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

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

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • modelcontextprotocol
  • 模型上下文协议服务器

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • OffchainLabs
  • 进行以太坊的实施

  • metorial
  • 数百个MCP服务器的容器化版本📡📡

    Reviews

    2 (1)
    Avatar
    user_C4saMCPh
    2025-04-15

    As a loyal user of the MCP Server by routineco, I can confidently say this tool has transformed my workflow. Its seamless integration and robust features allow for efficient and reliable data management. The user-friendly interface and comprehensive documentation make it accessible even for beginners. Highly recommend for anyone needing a powerful protocol server.