Cover image
Try Now
2025-03-22

包含业务逻辑和MCP服务器端口。

3 years

Works with Finder

1

Github Watches

1

Github Forks

0

Github Stars

MCP Core Library

This crate contains the domain business logic and ports of the MCP server following a hexagonal architecture.

Architectural Principles

Following the principles of hexagonal architecture, this crate:

  • Contains only the domain business logic (pure logic) and ports (interfaces)
  • Defines abstractions that represent domain boundaries
  • Remains independent of implementation details and specific technologies

Main Components

  • Primary/driving ports: Interfaces used by input adapters

    • Tool: Port defining the contract for tools executable via MCP
  • Secondary/driven ports: Interfaces used by the domain to communicate with the outside world

    • Transport: Port defining the contract for network communication
  • Domain entities and types: Fundamental domain data structures

    • Abstract message types (independent of specific formats like JSON-RPC)
    • Domain errors
    • Tool registry (ToolRegistry)

Note on Serialization

Specific protocol details like JSON-RPC are deliberately excluded from this domain crate and will be implemented in external adapters, in accordance with hexagonal architecture principles.

This crate only depends on basic crates like serde and tokio (for async types) to remain minimal and preserve domain isolation.

Roadmap

In addition to the main traits, the core crate defines other interfaces or structures for domain organization, such as ToolRegistry to manage the registration and search of tools by name. For immediate needs, a simple implementation internal to the core (with a HashMap<String, Box<dyn Tool>>) is sufficient, but could be formalized as a trait if different storage or loading strategies become necessary (e.g., for dynamic plugins).

相关推荐

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

  • 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

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

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

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

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

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

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

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

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

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

    Reviews

    4 (1)
    Avatar
    user_vfj2bSGW
    2025-04-15

    Main by tree is a fantastic product! It's incredibly user-friendly and has streamlined my workflow significantly. I love the intuitive design and the comprehensive features it offers. This tool has become an essential part of my daily routine. I highly recommend it to anyone looking to improve their productivity. Check it out here: https://mcp.so/server/main/tree!