MCP Crash Course

A pythom mcp SDK crash course
  • python

0

GitHub Stars

python

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "suryanshp1-mcpcrashcourse": {
      "command": "uv",
      "args": [
        "run",
        "mcp",
        "dev",
        "server/weather.py"
      ]
    }
  }
}

You can run and test MCP servers locally using the MCP Python SDK and the lightweight MCP command toolkit. This approach lets you start a dev server, inspect its behavior with an MCP Inspector, and integrate the server with clients like Claude Desktop or Cursor for interactive queries. The workflow shown here uses a weather example to illustrate starting, inspecting, and wiring an MCP server for client consumption.

How to use

To work with an MCP server, you primarily use the MCP CLI to launch, inspect, and connect servers from your local machine. Start by running the MCP Inspector to validate your server is exposing the expected endpoints, then install and register your server so clients can query it. You can also wire the server into Claude Desktop or Cursor for conversational interactions.

Steps you can follow end-to-end to experiment with a sample weather server:

  1. Start the MCP Inspector for development visibility

  2. Run the MCP server in development mode so it is available to clients

  3. Register the server for client access and configure your preferred client integrations

  4. Consume the server from a client application or chat interface using the standard MCP client tooling

Examples of the exact commands you will use are shown in the following steps. Copy and run them in your terminal in order.

How to install

Prerequisites you should have installed before starting: a Python-friendly environment and the MCP CLI tooling. You will use the MCP CLI to install the necessary components and run the weather server locally.

Install the MCP Python SDK for local server development

uv add "mcp[cli]"

Run the MCP Inspector for the weather server to observe its behavior during development

uv run mcp dev server/weather.py

MCP Inspector is up and running at http://127.0.0.1:6274


Add the weather server to Claude Desktop so you can query weather information in that environment

uv run mcp install .\server\weather.py


Configure Cursor to use the weather server by pasting the provided configuration into Cursor settings

{ "mcpServers": { "weather": { "command": "uv", "args": [ "run", "--with", "mcp[cli]", "mcp", "run", "C:\Users\Suraj\Desktop\Python\mcp-crash-course\mcpcrashcourse\server\weather.py" ] } } }


Directly consume the server in code using the MCP client tooling

uv add mcp-use uv add langchain-groq uv run server/client.py

## Additional setup and notes

The MCP Inspector provides a local web UI at http://127.0.0.1:6274 to observe incoming requests, responses, and internal tracing. Use this to verify that your server weather.py exposes the expected actions and data.

If you need to integrate the weather server into Claude Desktop or Cursor, follow the exact command lines shown above to register and reference the server. Ensure the path to weather.py remains accurate for your environment.

## Available tools

### mcpInspector

Provides a local MCP Inspector UI and runtime visibility to observe the weather server behavior.

### claudeDesktopIntegration

Registers MCP servers so Claude Desktop can query and interact with the server.

### cursorIntegration

Configures Cursor to communicate with the weather server and run queries in chat.

### mcpUseClient

Client-side tool to consume MCP servers from code or scripts, enabling programmatic queries against the weather server.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational