diegofornalha
MCP Serverdiegofornalhapublic

mcp sse v1

展示如何使用FastAPI和Server-Sent Events创建支持工具访问的MCP远程服务器。

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
Python
Language
-
License

About This Server

展示如何使用FastAPI和Server-Sent Events创建支持工具访问的MCP远程服务器。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

MCP Remoto com SSE

Crie um servidor MCP remoto usando Server-Sent Events (SSE) com FastAPI.

Este projeto demonstra como criar um servidor MCP remoto usando Server-Sent Events (SSE) com FastAPI, permitindo que clientes acessem ferramentas via HTTP.

Funcionalidades Principais

  • Criar um servidor MCP com FastAPI.
  • Expor ferramentas através de Server-Sent Events (SSE).
  • Demonstrar a interação do cliente com o servidor remoto.
  • Combinar endpoints REST com ferramentas MCP em um único servidor.

Tecnologias Utilizadas

  • FastAPI
  • FastMCP
  • Loguru
  • MCP
  • Uvicorn
  • httpx

Começando

Pré-requisitos

  • Python 3.12+
  • uv

Instalação

  1. Clone o repositório.
  2. Navegue até o diretório do projeto: cd projects/mcp-sse
  3. Instale as dependências usando uv: uv sync

Uso

  1. Execute o servidor: uv run server.py
  2. Execute o cliente: uv run client.py

Estrutura do Projeto

mcp-sse/
├── README.md      # Documentação do projeto
├── client.py      # Script do cliente MCP
├── pyproject.toml # Dependências do projeto
├── server.py      # Script do servidor MCP
└── uv.lock        # Arquivo de lock das dependências

Detalhes da Implementação

  • O arquivo server.py define um servidor MCP com uma ferramenta get_weather.
  • O arquivo client.py demonstra como se conectar ao servidor remoto e invocar a ferramenta get_weather.
  • FastAPI é usado para criar o servidor e expor o endpoint SSE.

Contribuindo

  1. Faça um fork do repositório.
  2. Crie sua branch de funcionalidade.
  3. Envie um pull request.

Quick Start

1

Clone the repository

git clone https://github.com/diegofornalha/mcp-sse-v1
2

Install dependencies

cd mcp-sse-v1
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerdiegofornalha
Repomcp-sse-v1
LanguagePython
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation