MCP ExplorerExplorer

Mcp Server Modular

@InCoBon a year ago
1 MIT
FreeCommunity
AI Systems
modular mcp server

Overview

What is Mcp Server Modular

mcp-server-modular is a modular Model Context Protocol (MCP) server designed to demonstrate best practices for building MCP applications.

Use cases

Use cases include building scalable web applications, developing microservices, and creating custom tools and resources for specific domains.

How to use

To use mcp-server-modular, clone the repository, install the required dependencies using the uv package manager, and run the server with the command ‘uv run src/mcp_demo/server.py’.

Key features

Key features include a modular architecture with clear separation of concerns, type-safe implementation, comprehensive error handling, a security-first approach, and ease of extension with new tools and resources.

Where to use

mcp-server-modular can be used in various fields such as software development, API development, and any application requiring a modular server architecture.

Content

MCP Demo Server

Running

masteraccount@Mac Server % cd mcp-server-demo
masteraccount@Mac mcp-server-demo % export PYTHONPATH=$PWD/src
uv run mcp dev src/mcp_demo/server.py

A modular Model Context Protocol (MCP) server that demonstrates best practices for building MCP applications.

Project Structure

mcp-demo/
├── src/
│   └── mcp_demo/           # Main package
│       ├── config/        # Configuration settings
│       ├── resources/     # MCP resources
│       ├── tools/        # MCP tools by domain
│       ├── utils/        # Shared utilities
│       ├── __init__.py   # Package initialization
│       └── server.py     # Main server entry point
├── pyproject.toml        # Project configuration and dependencies
└── README.md            # This file

Prerequisites

  • Python 3.11 or higher
  • uv package manager

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/mcp-demo.git
    cd mcp-demo
    
  2. Install the package and dependencies:

    uv pip install .
    

Running the Server

You can run the server using uv:

uv run src/mcp_demo/server.py

Development

To install in development mode:

uv pip install -e .

Features

  • Modular architecture with clear separation of concerns
  • Type-safe implementation
  • Comprehensive error handling
  • Security-first approach
  • Easy to extend with new tools and resources

Documentation

For detailed documentation on:

License

MIT

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers