MCP cover image
See in Github
2025-04-10

模型上下文协议(MCP)的代理服务器和工具管理器,可促进LLM应用程序与远程MCP兼容服务之间的通信。

2

Github Watches

1

Github Forks

2

Github Stars

MCP Tools

This repository contains tools for working with the Model Context Protocol (MCP).

MCP Proxy

A proxy for the Model Context Protocol that forwards requests to an HTTP endpoint.

Overview

The MCP proxy forwards data from stdin to a specified HTTP endpoint and returns responses to stdout. It implements a simple proxy that can be used to communicate with remote MCP-compatible servers.

Why golang?

This code runs on the client side. Many languages require a runtime and correct set of libraries installed to do this. Go compiles to a single executable file. This cuts down on deployment difficulties, user support requests, breaking updates to the runtime or other issues that are usually taken care of by providing an http endpoint instead of deployment.

Usage

./mcp-proxy [options]

Options

  • -endpoint: HTTP endpoint to proxy requests to (default: "http://localhost:8080")
  • -content-type: Content-Type header for HTTP requests (default: "application/json")
  • -timeout: HTTP request timeout in seconds (default: 30)
  • -buffer: Buffer size in KB for reading from stdin (default: 64)

Example

./mcp-proxy -endpoint="https://api.example.com/mcp" -content-type="application/json"

MCP Server

A server that loads and manages MCP executables from a directory and exposes them to clients via HTTP or stdio.

Overview

The MCP server loads MCP executables from a directory and serves them to clients. When clients request a list of tools, the server returns all tools from all loaded MCPs, namespaced by the MCP name. The server can run in either HTTP mode or stdio mode.

Usage

./mcp-server [options]

Options

  • -mcp-dir: Directory containing MCP executables (default: "./mcps")
  • -http: HTTP server address (default: ":8080")
  • -name: Name of the MCP server (default: "MCP Server")
  • -version: Version of the MCP server (default: "1.0.0")
  • -stdio: Use stdio instead of HTTP (default: false)

MCP Directory Structure

The server expects a directory containing MCP executables. Each executable must implement the MCP protocol using stdio. The server will:

  1. Scan the directory for executable files
  2. Run each executable to discover the tools it provides
  3. Make these tools available to clients with namespaced names (mcpname.toolname)

Building and Running with Make

This project includes a Makefile that simplifies building and running the components.

Building

Build all components (proxy, server, and examples):

make

Or build specific components:

make build-proxy    # Build only the proxy
make build-server   # Build only the server
make build-examples # Build only the example MCPs

Running

Start the MCP server in HTTP mode (after building examples and copying them to the mcps directory):

make run-server

Start the MCP server in stdio mode:

make run-server-stdio

Run the proxy to connect to the local MCP server:

make run-proxy

Testing

Test the proxy with a basic tools/list request (requires server running):

make test-proxy

Test specific example tools through the proxy (requires server running):

make test-hello   # Test the hello tool
make test-add     # Test the calculator's add tool

Example MCPs

The repository includes example MCPs that demonstrate how to implement MCP-compatible tools:

  • hello-mcp: A simple MCP that provides a "hello" tool
  • calculator-mcp: An MCP that provides math operations

Build and install the examples to the mcps directory:

make examples

Development Tasks

Format Go code:

make fmt

Run Go vet for code analysis:

make vet

Update and tidy Go dependencies:

make tidy

Clean build artifacts:

make clean

Install binaries to GOPATH/bin:

make install

License

MIT

相关推荐

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

  • 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.

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

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

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

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

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

  • Lists Tailwind CSS classes in monospaced font

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

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

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

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

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

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

    Reviews

    2 (1)
    Avatar
    user_yM7Mb4TE
    2025-04-17

    mcp-net is an exceptional tool for network analysis. Developed by michaelnugent, it offers a comprehensive solution that's easy to use and highly effective. The integration and support features make it a standout choice for both beginners and professionals in the field. Highly recommend checking it out on GitHub at https://github.com/michaelnugent/mcp-net!