Cover image
Try Now
2025-03-18

3 years

Works with Finder

1

Github Watches

1

Github Forks

0

Github Stars

MCP Server Practice

This repository contains implementations of Model Context Protocol (MCP) servers for LinkedIn profile scraping and weather data retrieval. The MCP framework facilitates seamless integration and communication between AI services.

Overview

  • LinkedIn Profile Scraper: Fetches LinkedIn profile data using the Fresh LinkedIn Profile Data API.
  • Weather Data Service: Retrieves weather alerts and forecasts using the National Weather Service (NWS) API.

Prerequisites

  • Python 3.7+
  • httpx for asynchronous HTTP requests
  • python-dotenv for environment variable management
  • mcp for MCP server implementation

Installation

  1. Clone the repository:

    git clone https://github.com/mybarefootstory/MCP-Server-Practice-2.git
    cd MCP-Server-Practice-2
    
  2. Install dependencies:

    pip install httpx python-dotenv mcp
    
  3. Set up environment variables:

    • Create a .env file in the root directory.
    • Add your RapidAPI key:
      RAPIDAPI_KEY=your_rapidapi_key_here
      

LinkedIn Profile Scraper

Description

Fetches LinkedIn profile data using the Fresh LinkedIn Profile Data API. The server is initialized with FastMCP and listens for requests to retrieve profile information.

Code Snippet

from mcp.server.fastmcp import FastMCP
import httpx
import os
from dotenv import load_dotenv

load_dotenv()
RAPIDAPI_KEY = os.getenv("RAPIDAPI_KEY")

mcp = FastMCP("linkedin_profile_scraper")

async def get_linkedin_data(linkedin_url: str) -> dict:
    # Fetch LinkedIn profile data
    ...

@mcp.tool()
async def get_profile(linkedin_url: str) -> str:
    # Get LinkedIn profile data
    ...

if __name__ == "__main__":
    mcp.run(transport="stdio")

Weather Data Service

Description

Retrieves weather alerts and forecasts using the NWS API. The server is initialized with FastMCP and provides tools for fetching alerts and forecasts.

Code Snippet

from mcp.server.fastmcp import FastMCP
import httpx

mcp = FastMCP("weather")

async def make_nws_request(url: str) -> dict:
    # Make a request to the NWS API
    ...

@mcp.tool()
async def get_alerts(state: str) -> str:
    # Get weather alerts for a US state
    ...

@mcp.tool()
async def get_forecast(latitude: float, longitude: float) -> str:
    # Get weather forecast for a location
    ...

if __name__ == "__main__":
    mcp.run(transport='stdio')

Usage

  • LinkedIn Profile Scraper: Run the server and use the get_profile tool to fetch LinkedIn data.
  • Weather Data Service: Run the server and use the get_alerts and get_forecast tools to retrieve weather information.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • 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.

  • 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.

  • INFOLAB OPERATIONS 2
  • A medical specialist offering assistance grounded in clinical guidelines. Disclaimer: This is intended for research and is NOT safe for clinical use!

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

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • J. DE HARO OLLE
  • Especialista en juegos de palabras en varios idiomas.

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • OffchainLabs
  • Implementación de la prueba de estaca Ethereum

  • huahuayu
  • Una puerta de enlace de API unificada para integrar múltiples API de explorador de blockchain similar a Esterscan con soporte de protocolo de contexto modelo (MCP) para asistentes de IA.

  • deemkeen
  • Controle su MBOT2 con un combo de potencia: MQTT+MCP+LLM

  • zhaoyunxing92
  • 本项目是一个钉钉 MCP (Protocolo del conector de mensajes )服务 , 提供了与钉钉企业应用交互的 API 接口。项目基于 Go 语言开发 支持员工信息查询和消息发送等功能。 支持员工信息查询和消息发送等功能。

  • pontusab
  • La comunidad de cursor y windsurf, encontrar reglas y MCP

    Reviews

    5 (1)
    Avatar
    user_ktzaHphz
    2025-04-16

    MCP-Server-Practice-2 is a fantastic tool for hands-on server management practice! Created by mybarefootstory, it offers a great way to improve your server skills. It’s user-friendly and provides a solid foundation for anyone looking to dive deeper into server management. Highly recommend checking it out! Here's the link to explore: https://github.com/mybarefootstory/MCP-Server-Practice-2.