Cover image
Try Now
2025-03-22

Contains the business logic and MCP server ports.

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.

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

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

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

  • Lists Tailwind CSS classes in monospaced font

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

  • apappascs
  • Discover the most comprehensive and up-to-date collection of MCP servers in the market. This repository serves as a centralized hub, offering an extensive catalog of open-source and proprietary MCP servers, complete with features, documentation links, and contributors.

  • ShrimpingIt
  • Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx

  • huahuayu
  • A unified API gateway for integrating multiple etherscan-like blockchain explorer APIs with Model Context Protocol (MCP) support for AI assistants.

  • deemkeen
  • control your mbot2 with a power combo: mqtt+mcp+llm

  • jae-jae
  • MCP server for fetch web page content using Playwright headless browser.

    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!