MCP Server Implementations

MCP Server Implementations

Custom server implementation for Model Control Protocol (MCP) using Server-Sent Events (SSE)

AMasetti

Developer Tools
Visit Server

README

MCP Server Implementations

The Model Context Protocol (MCP) serves as an open standard to facilitate communication between language models and client applications. Its modular architecture allows developers to build, deploy, and interact with servers that can manage context, data streams, and event-based communications. This openness has spurred a community effort to create accessible, scalable, and secure solutions that bridge various platforms and frameworks.

This repository includes two implementations of MCP (Message Control Protocol) servers:

  1. FastAPI with SSE - A web server implementation using FastAPI and Server-Sent Events
  2. Standalone MCP - A direct stdin/stdout implementation for use with Docker Containers

MCP Features

Both implementations provide the following MCP functionality:

  1. Resources

    • echo://{message} - Echo a message as a resource
  2. Tools

    • echo_tool - Echo a message as a tool
    • demo_tool - Demonstrate tool functionality by adding two numbers
  3. Prompts

    • echo_prompt - Create an echo prompt

Getting Started

Prerequisites

  • Python 3.10+
  • MCP >= 0.3.0
  • Docker (for containerized deployment)
  • FastAPI and Uvicorn (for SSE implementation)

Installation

Clone this repository and navigate to the project directory:

git clone git@github.com:AMasetti/MCP-SSE-Custom-Server.git
cd mcp-server-implementations

SSE Implementation

The SSE (Server-Sent Events) implementation provides real-time data streaming capabilities over HTTP. This is particularly useful for streaming responses from AI models.

Building and Running

You can run the SSE server using either Docker or directly with uvicorn:

# Using Docker
make build-sse
make run-sse

# Or using uvicorn directly
uvicorn app.main:app --host 0.0.0.0 --port 8000

The server will be accessible at http://localhost:8000.

Configuring Claude Desktop

To add the SSE server to Claude Desktop, add the following to your configuration file:

{
  "mcpServers": {
    "example-sse": {
      "url": "http://localhost:8000/sse",
      "env": {}
    }
  }
}

Standalone MCP Implementation

The standalone implementation provides a simple stdin/stdout interface, making it ideal for direct integration with Claude Desktop or similar applications.

Building and Running

# Using Make commands
make build-local
make run-local

# Or using Docker directly
docker build -t mcp/echo -f Dockerfile.mcp .
docker run -i --rm mcp/echo

Configuring Claude Desktop

Add the following to your Claude Desktop configuration file:

{
  "mcpServers": {
    "echo": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "mcp/echo"
      ]
    }
  }
}

Project Structure

.
├── app/
│   ├── mcp_server.py    # Core MCP server implementation
│   └── sse.py           # SSE implementation with Starlette
├── Dockerfile.mcp       # Container config for standalone MCP
├── Dockerfile.sse       # Container config for SSE server
└── Makefile            # Build and run commands

API Endpoints (SSE Implementation)

  • GET / - Root endpoint returning a simple greeting
  • GET /sse/ - SSE endpoint for establishing real-time connections
  • POST /messages/ - Endpoint for sending messages to connected clients

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
MCP Package Docs Server

MCP Package Docs Server

Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.

Featured
Local
TypeScript
Claude Code MCP

Claude Code MCP

An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.

Featured
Local
JavaScript
@kazuph/mcp-taskmanager

@kazuph/mcp-taskmanager

Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.

Featured
Local
JavaScript
Linear MCP Server

Linear MCP Server

Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.

Featured
JavaScript
mermaid-mcp-server

mermaid-mcp-server

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.

Featured
JavaScript
Jira-Context-MCP

Jira-Context-MCP

MCP server to provide Jira Tickets information to AI coding agents like Cursor

Featured
TypeScript
Linear MCP Server

Linear MCP Server

A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Featured
JavaScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python