Local MCP Test Server

Local MCP Test Server

A local testing MCP server that provides weather information for L'Hospitalet de Llobregat using the Open-Meteo API, accessible from mobile devices via SSE transport on local networks.

Category
Visit Server

README

Local MCP Test Server

Servidor MCP (Model Context Protocol) de pruebas locales que expone herramientas meteorológicas mediante transporte SSE, compatible con dispositivos móviles (iOS/Android).

Características

  • Transporte SSE para conexión desde apps móviles en red local
  • API Open-Meteo (gratuita, sin API key)
  • FastMCP para registro automático de herramientas
  • Compatible con Qwen 2.5 y otros LLMs

Stack Tecnológico

Componente Tecnología
Lenguaje Python 3.11+
Framework MCP mcp[cli] + FastMCP
Cliente HTTP httpx (async)
Servidor ASGI uvicorn + starlette

Requisitos

  • Python 3.11+
  • pip o uv

Instalación

# Clonar repositorio
git clone https://github.com/cserra16/local-mcp-test-server.git
cd local-mcp-test-server

# Crear entorno virtual
python3 -m venv venv
source venv/bin/activate

# Instalar dependencias
pip install -r requirements.txt

Ejecución

source venv/bin/activate
python app.py

El servidor iniciará en http://0.0.0.0:8000 con transporte SSE.

Endpoints MCP

Método Ruta Descripción
GET /sse Handshake SSE (obtiene session_id)
POST /messages/?session_id=... Mensajes JSON-RPC

Herramientas Disponibles

get_weather_lhospitalet

Obtiene el clima actual de L'Hospitalet de Llobregat (Barcelona).

Triggers: El LLM invocará esta herramienta cuando el usuario pregunte por el clima en:

  • L'Hospitalet de Llobregat
  • Hospitalet
  • Hospi
  • L'Hospi
  • L'H

Retorna: Temperatura (°C), humedad relativa (%) y estado del cielo.

Ejemplo de respuesta:

Clima en L'Hospitalet de Llobregat: 18.5°C, Humedad: 65%, Estado del cielo: Parcialmente nublado. Datos provistos por Open-Meteo.

Pruebas

Con MCP Inspector (recomendado)

npx -y @modelcontextprotocol/inspector http://localhost:8000/sse

Test con Python

import asyncio
from mcp import ClientSession
from mcp.client.sse import sse_client

async def test():
    async with sse_client('http://localhost:8000/sse') as (read, write):
        async with ClientSession(read, write) as session:
            await session.initialize()
            result = await session.call_tool('get_weather_lhospitalet', {})
            print(result.content[0].text)

asyncio.run(test())

Desde el navegador

Acceder a http://localhost:8000/sse para verificar eventos SSE.

Conexión desde iOS

  1. Asegúrate de que el iPhone esté en la misma red Wi-Fi
  2. Obtén la IP local: ipconfig getifaddr en0
  3. Conecta desde la app iOS a http://<IP-LOCAL>:8000/sse

Estructura del Proyecto

local-mcp-test-server/
├── app.py              # Servidor MCP principal
├── requirements.txt    # Dependencias
├── pyproject.toml      # Configuración del proyecto
└── README.md

Licencia

MIT

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
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured