
MCP Crash Course
from suryanshp1
A simple demonstration of the MCP Python SDK.
๐ฅโ VerifiedFreeQuick setup
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 venvactivate the virtual environment
uv venv --activateinstall the dependencies
uv add <package>
uv add -r requirements.txt
uv syncrun application
uv run app.pyrun the development server
uv run devbuild the project
uv run buildRun server using MCP Inspector :
- Install MCP python sdk
uv add "mcp[cli]"- Run mcp inspector
uv run mcp dev server/weather.pyMCP 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.pyCopy & paste โ that's it
uv initNo common issues documented yet. If you hit a problem, the repository's GitHub Issues page is the best place to look.
