Cover image
Try Now
2025-04-03

3 years

Works with Finder

1

Github Watches

0

Github Forks

0

Github Stars

Simple MCP Client / Server

https://modelcontextprotocol.io/quickstart/server

Install uv, on macOS and Linux.

$ curl -LsSf https://astral.sh/uv/install.sh | sh

Then git clone the repo.

MCP Server (stdio)

uv init mcp_server
cd mcp_server/
uv run main.py                        # just to create the .venv, then rm the main.py

uv add "mcp[cli]" httpx               # MCP server Python lib

touch weather_stdio.py                # STDIO server implementation

Start the server

mcp_server$ uv run weather_stdio.py

Test with VSCode + Cline

Add MCP server to Cline.

Cline -> MCP Servers (icon close to '+') -> Installed -> Add

You get a json template "mcpServers": {} and you add the new server. Here is the cline_mcp_settings.json:

{
  "mcpServers": {
    "weather": {
            "command": "uv",
            "args": [
                "--directory",
                "/home/users/tikoehle/mcp_server",
                "run",
                "weather_stdio.py"
            ]
        }
  }
}

=> Cline shows the 2 get_* Tools functions. Click 'Done' to return to Cline Task input trying the new server.

Test

Type a task calling the two tools: "Can you tell me the weather forecast for San Francisco, CA" "Can you tell me the weather alerts for San Francisco, CA"

=> uses my two new MCP 'weather' server tools.

Note: Local MCP servers should not log messages to stdout because this will interfere with protocol operation.

MCP Client

https://modelcontextprotocol.io/quickstart/client

uv init mcp_client
cd mcp_client/
uv run main.py                     # create venv

uv add mcp

touch client_stdio.py              # MCP client impl.

Run the client

uv run client.py path/to/server.py

mcp_client$ uv run client_stdio.py ../mcp_server/weather_stdio.py

MCP Inspector

Installation Node.js

On the MCP server compute, get Node.js (Current) for Linux using nvm with npm. https://nodejs.org/en/download

cd $HOME

# Download and install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash

# in lieu of restarting the shell
\. "$HOME/.nvm/nvm.sh"

# Download and install Node.js:
nvm install 23

# Verify the Node.js version:
node -v # Should print "v23.10.0".
nvm current # Should print "v23.10.0".

# Verify npm version:
npm -v # Should print "10.9.2".

Inspecting a locally developed server

mcp_server$ uv run mcp dev ./weather_stdio.py
Starting MCP inspector...
Proxy server listening on port 3000

🔍 MCP Inspector is up and running at http://localhost:5173 🚀

Note:

Another method to install the latest version and start the Inspector.

mcp_server$ npx @modelcontextprotocol/inspector@latest

Open the MCP Inspector client UI in the Browser

http://comp9:5173   --> Connect

Note:

If the MCP dev server runs on a remote compute, for example comp9, then the MCP Inspector Client UI needs to connect to this machine.

Transport Type, Command and Arguments appeared with the correct parameters when launching the UI in the browser.

Transport Type: STDIO
Command: uv
Arguments: run --with mcp mcp run ./weather_stdio.py

or

Transport Type: SSE
URL: http://comp9:8001/sse

Note:

MCP development tools

mcp_server$ uv run mcp

SSE Client / Server

Server

mcp_server$ uv run weather_sse.py      # port 8001

Client

mcp_client$ uv run client_sse.py http://comp9:8001/sse

Python-SDK

https://github.com/modelcontextprotocol/python-sdk/

SSE Issues:

https://github.com/modelcontextprotocol/python-sdk/issues/398

相关推荐

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

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

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

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

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

  • tomoyoshi hirata
  • Sony α7IIIマニュアルアシスタント

  • apappascs
  • Découvrez la collection la plus complète et la plus à jour de serveurs MCP sur le marché. Ce référentiel sert de centre centralisé, offrant un vaste catalogue de serveurs MCP open-source et propriétaires, avec des fonctionnalités, des liens de documentation et des contributeurs.

  • ShrimpingIt
  • Manipulation basée sur Micropython I2C de l'exposition GPIO de la série MCP, dérivée d'Adafruit_MCP230XX

  • jae-jae
  • MCP Server pour récupérer le contenu de la page Web à l'aide du navigateur sans tête du dramwright.

  • HiveNexus
  • Un bot de chat IA pour les petites et moyennes équipes, soutenant des modèles tels que Deepseek, Open AI, Claude et Gemini. 专为中小团队设计的 Ai 聊天应用 , 支持 Deepseek 、 Open Ai 、 Claude 、 Gemini 等模型。

  • ravitemer
  • Un puissant plugin Neovim pour gérer les serveurs MCP (Protocole de contexte modèle)

  • patruff
  • Pont entre les serveurs Olllama et MCP, permettant aux LLM locaux d'utiliser des outils de protocole de contexte de modèle

  • Sysc4lls
  • Lecteur de documentation IDA (Sort-of) MCP Server

    Reviews

    1 (1)
    Avatar
    user_RMc3s2tW
    2025-04-18

    As an avid user of mcp_server, I am thoroughly impressed by its robustness and ease of use. Developed by tikoehle, this server application is a must-have for anyone needing a reliable solution for server management. Its seamless integration and user-friendly interface have significantly enhanced my efficiency. Highly recommended! For more details, visit the [mcp_server GitHub page](https://github.com/tikoehle/mcp_server).