drio
Open app

MCP Client Example ☀️

Source

Python MCP client + server example

Catalog onlyCatalog onlySTDIO

Overview

MCP Client Example is a Python-based implementation that demonstrates how to create a client-server architecture using the Model Context Protocol (MCP), which facilitates the connection of large language models with various tools and data sources.

To use the MCP Client Example, ensure you have Python 3.9+ installed, then install the required dependencies using the provided commands. Start the client, which will automatically initiate the server, and interact with the available tools.

  • Simple client-server implementation using MCP - Tools for calculating Body Mass Index (BMI) and fetching weather data - Easy setup and usage with Python
  1. Building applications that require real-time data processing and interaction with language models.
  2. Creating custom tools that can be accessed via a standardized protocol.
  3. Educational purposes for understanding client-server architecture in Python.

Add to your AI client

Use these steps to connect MCP Client Example ☀️ in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "mcp-client-x-rggh": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-client-x-rggh"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "mcp-client-x-rggh": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-client-x-rggh"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "mcp-client-x-rggh": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-client-x-rggh"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mcp-client-x-rggh": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-client-x-rggh"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-client-x-rggh": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-client-x-rggh"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "mcp-client-x-rggh": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-client-x-rggh"
      ]
    }
  }
}

FAQ

What is the Model Context Protocol (MCP)?

MCP is a standardized protocol designed to connect large language models with tools and data sources.

Is this project suitable for beginners?

Yes! The project is designed to be straightforward and includes a tutorial video for guidance.

Can I extend the functionality of the server?

Absolutely! You can add more tools to the server as needed.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2119,"uuid":"348e255f-ca30-4775-9719-b2172f7b6da7","name":"mcp-client-x","title":"MCP Client Example ☀️","description":"Python MCP client + server example","avatar_url":"https://avatars.githubusercontent.com/u/62441426?v=4","created_at":"2025-03-09T03:36:21.913Z","updated_at":"2025-03-12T10:18:19.923Z","status":"created","author_name":"RGGH","author_avatar_url":"https://avatars.githubusercontent.com/u/62441426?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/RGGH/mcp-client-x","target":"_self","content":"$29","summary":"$2a","img_url":"https://camo.githubusercontent.com/46f7db684e4f39d10c1f85daa972bc2de19d231bf28e7bf596006f49d8b06d32/68747470733a2f2f696d672e796f75747562652e636f6d2f76692f6f7133646b4e6d353171632f302e6a7067","type":null,"metadata":"{\"star\":\"0\",\"license\":\"\",\"language\":\"Python\",\"is_official\":false,\"latest_commit_time\":\"2025-03-08 19:05:45\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]

MCP Client Example ☀️ — MCP Registry