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
Related Servers
Azure DevOps MCP Server
An MCP server for Azure DevOps, enabling AI assistants to interact with Azure DevOps APIs.
Tox Testing
Executes tox commands to run Python tests with pytest. Requires the TOX_APP_DIR environment variable to be set.
Random Number
Provides LLMs with essential random generation abilities, built entirely on Python's standard library.
MCP Gateway
A feature-rich gateway and proxy that federates MCP and REST services, unifying discovery, authentication, rate-limiting, and observability into a single endpoint for AI clients.
AAP Enterprise MCP Server
An MCP server that allows AI assistants to interact with Ansible Automation Platform (AAP) and Event-Driven Ansible (EDA) infrastructure.
Projet MCP Server-Client
An implementation of the Model Context Protocol (MCP) for communication between AI models and external tools, featuring server and client examples in Python and Spring Boot.
Claude Code Memory Server
A Neo4j-based MCP server providing persistent memory and contextual assistance for Claude Code.
CDP MCP Server
Access Composers' Desktop Project (CDP) sound transformation programs. Requires a separate CDP installation.
Frame0 MCP Server
Create and modify wireframes in the Frame0 app through natural language prompts.
NeoCoder
Enables AI assistants to use a Neo4j knowledge graph for standardized coding workflows, acting as a dynamic instruction manual and project memory.
