Cover image
Try Now
2025-03-26

这是一组协作组件,共同使本地和网络上的MCP服务器易于管理,开发,使用和迁移。

3 years

Works with Finder

1

Github Watches

0

Github Forks

0

Github Stars

habitat

This is a set of collaborating components which together make it easy to manage, develop, use and migrate MCP servers both locally and on the net.

MCP Habitat: Component Architecture

Overview

MCP Habitat provides a comprehensive architecture for managing Model Context Protocol (MCP) servers across local and cloud environments. This document outlines the key components and their interactions.

Core Components

1. MCP Registry

The central discovery service implemented as an MCP server itself.

  • Purpose: Service discovery, authentication, and orchestration
  • Implementation: MCP server with registry-specific extensions
  • Responsibilities:
    • Maintain registry of available MCP servers
    • Handle service discovery requests
    • Manage authentication and authorization
    • Route client requests to appropriate MCP servers

2. MCP Server Architecture (Three-Tier)

Each MCP server consists of three distinct layers:

2.1 Common MCP Core

  • Purpose: Handle MCP protocol and conversation management
  • Implementation: Shared library used by all MCP servers
  • Responsibilities:
    • Context window management
    • Conversation state tracking
    • Message handling and routing
    • Token counting and limits
    • MCP protocol implementation

2.2 Metadata Service

  • Purpose: Define server capabilities and integration details
  • Implementation: Configuration layer for MCP servers
  • Responsibilities:
    • Define available commands and syntax
    • Provide service schemas
    • Manage versioning information
    • Handle registry registration
    • Document capabilities

2.3 Service Adapter

  • Purpose: Connect to underlying services (Jira, GitHub, etc.)
  • Implementation: Independent microservice
  • Responsibilities:
    • Interface with external APIs
    • Translate between MCP protocol and service-specific APIs
    • Handle service authentication
    • Manage data transformations
    • Provide standalone API access

3. Habitat CLI

Command-line interface for managing the entire ecosystem.

  • Purpose: Unified management interface
  • Implementation: CLI tool with habitat, registry, and server subcommands
  • Responsibilities:
    • Manage entire habitat lifecycle
    • Configure and control the registry
    • Add/remove/update individual MCP servers
    • Monitor system health
    • Provision new services

Interactions

Registration Flow

  1. MCP Server starts up
  2. Metadata Service connects to Registry
  3. Server authenticates and registers its capabilities
  4. Registry adds server to available services
  5. Registry performs health checks to ensure availability

Discovery Flow

  1. Client connects to Registry using MCP protocol
  2. Client requests available services of a specific type
  3. Registry authenticates client and checks permissions
  4. Registry returns list of matching services with connection details
  5. Client connects directly to relevant MCP Server

Service Interaction Flow

  1. Client establishes conversation with MCP Server
  2. Client sends MCP-formatted requests
  3. MCP Core manages conversation context
  4. Service Adapter translates requests to service-specific API calls
  5. Service Adapter returns data which MCP Core formats as responses

Deployment Models

Local Development

  • Registry and MCP servers run in local Docker containers
  • Services communicate over localhost network
  • Configuration stored in local filesystem

Hybrid Deployment

  • Registry runs locally, some services locally, others in cloud
  • Local registry maintains connections to remote services
  • Consistent discovery mechanism regardless of service location

Cloud Deployment

  • All components deployed to Kubernetes or similar platform
  • Registry scales horizontally for high availability
  • Service Adapters scale independently based on load
  • MCP Servers distributed across regions as needed

Security Model

Authentication Layers

  1. Client-to-Registry: Initial authentication using API keys or OAuth
  2. Registry-to-Server: Server validation using mutual TLS or API keys
  3. Client-to-Server: Token-based access provided by Registry
  4. Server-to-Service: Service-specific authentication handled by Adapter

Authorization Model

  • Registry maintains access control policies
  • Permissions managed at service level
  • Client capabilities restricted based on identity
  • Audit logs capture all authentication and authorization events

相关推荐

  • 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

  • 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

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

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • 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

    5 (1)
    Avatar
    user_9hKP8Mfr
    2025-04-17

    As a loyal MCP user, I find habitat to be an exceptional tool for environment management. Designed by dawsonlp, it simplifies complex setups with ease. The clear documentation and active development on GitHub make it user-friendly and reliable. Highly recommended for those seeking efficient and effective environment management solutions.