Cover image
Try Now
2025-03-23

3 years

Works with Finder

1

Github Watches

1

Github Forks

0

Github Stars

MCP Client & Server Example

Prerequisites

  • Python 3.12 or higher
  • uv (Python package installer and environment manager)
  • Environment variables set up in .env file (for Anthropic API key)

Installation

  1. Clone the repository

  2. Install uv if you haven't already:

curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Create and activate a new environment:
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install dependencies using uv:
uv pip install -e .
  1. Configure .env by copying .env.example to .env and filling in your Anthropic API key:

Project Structure

  • Simple client and server
    • weather_server.py - MCP server implementation with weather service endpoints
  • Client example and Server example
    • weather_example.py - Example implementation using the National Weather Service API
    • client_example.py - Interactive client with Claude AI integration

相关推荐

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

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • momi
  • Provides initial medical assessments and advice.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

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

  • Daren White
  • A supportive coach for mastering all Spanish tenses.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • huahuayu
  • A unified API gateway for integrating multiple etherscan-like blockchain explorer APIs with Model Context Protocol (MCP) support for AI assistants.

  • deemkeen
  • control your mbot2 with a power combo: mqtt+mcp+llm

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

  • justmywyw
  • Short and sweet example MCP server / client implementation for Tools, Resources and Prompts.

  • KasarLabs
  • Build powerful and secure AI Agents powered by Starknet.

    Reviews

    3 (1)
    Avatar
    user_l70BFNR2
    2025-04-16

    mcp_server_client_example by xiaoye-hua is a fantastic resource for anyone interested in server-client architecture. The well-documented code and easy-to-follow examples make it a breeze to understand and implement. Highly recommended for both beginners and seasoned developers. Check it out at https://github.com/xiaoye-hua/mcp_server_client_example!