MCP Crash Course
A simple demonstration of the MCP Python SDK.
MCP Crash Course
A simple demo of MCP python sdk.
uv commands
start a new project
uv init <project-name>
create a virtual environment
uv venv
activate the virtual environment
uv venv --activate
install the dependencies
uv add <package>
uv add -r requirements.txt
uv sync
run application
uv run app.py
run the development server
uv run dev
build the project
uv run build
Run server using MCP Inspector :
- Install MCP python sdk
uv add "mcp[cli]"
- Run mcp inspector
uv run mcp dev server/weather.py
MCP Inspector is up and running at http://127.0.0.1:6274
Add server to claude desktop :
- run command
uv run mcp install .\server\weather.py
- query "what is weather alert in CA" in claude desktop
Add server to cursor :
- goto preferences > settings > mcp and copy paste claude config
{
"mcpServers": {
"weather": {
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"C:\\Users\\Suraj\\Desktop\\Python\\mcp-crash-course\\mcpcrashcourse\\server\\weather.py"
]
}
}
}
- Then do a query in cursor chat
Directly consume server in code - using mcp-use :
- Install mcp-use
uv add mcp-use
- Install langchain-groq
uv add langchain-groq
- run client
uv run server/client.py
संबंधित सर्वर
Alpha Vantage MCP Server
प्रायोजकAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Bernstein
Multi-agent orchestration MCP server. Start parallel agent runs, manage task queues, track costs, and verify quality gates across 20+ CLI coding agents.
Image Generator
Generate and save images using the Replicate API.
MCP-Think
A Think Tool for LLMs to record and retrieve their thinking processes during reasoning.
UML-MCP
A diagram generation server supporting multiple UML and other diagram types, with various output formats. It integrates with rendering services like Kroki and PlantUML.
Photon
A TypeScript framework that turns a single class into an MCP server, CLI tool, and web dashboard with a marketplace of 35 ready-made photons.
Code Assistant
A Rust-based CLI tool for code-related tasks, operating as an MCP server.
MCP Command Server
A secure server for executing pre-approved system commands via an environment variable.
mcp-pystub
Auto-detect stubbable packages for Python exe builds (PyInstaller/Nuitka) and generate minimal stub code to reduce executable size
FMP MCP Server
Provides tools, resources, and prompts for financial analysis using the Financial Modelling Prep API.
ComfyUI
An MCP server for ComfyUI integration.
