
Course introduction.
What will you learn ?
1.Develop very basic MCP servers
2.Develop MCP servers consuming external APIs
3.Configure MCP server with Cursor and Claude AI Agents
4.Learn the different transport types in MCP
5.What are prompts , resources in MCP?
6.Architecture of MCP and how it works with AI tools.
Build and run your first MCP server using FastMCP and Cursor AI.
Create simple MCP tools/functions that respond to user input.
Configure the server in mcp.json for integration into an MCP environment.
Test and debug your Hello World server with hands-on exercises.
Set up a new MCP project and configure it for development.
Write MCP tools/functions that handle requests and return structured responses.
Integrate the server with mcp.json for proper environment configuration.
Run, test, and debug the server to ensure it functions correctly in a hands-on, practical workflow.
Transforming external data sources into AI-accessible tools through the MCP protocol, enabling AI assistants to fetch real-time weather information for any supported city.
A simple Model Context Protocol (MCP) server that provides weather data as a tool for AI assistants. The server integrates with the free Open-Meteo weather API to fetch real-time temperature and wind speed data.
What you'll learn?
MCP Server Basics - How to create an MCP server using FastMCP framework?
Tool Definition - How to define tools that AI assistants can call using the @app.tool() decorator?
External API Integration - How to integrate with third-party APIs (Open-Meteo) using the requests library?
Data Validation - How to handle invalid inputs (unknown cities) with proper error messages?
Coordinate Mapping - How to map city names to geographic coordinates for API calls?
Response Formatting - How to structure API responses in a clean, consistent format?
Develop MCP server using python, Install and Manage Packages with pip, Upgrade/Remove Packages, Create and Use Virtual Environments
Work in an AI-Assisted Coding Environment
Develop and Manage MCP Server Projects
Debug and Test Code Efficiently
Manage Dependencies and Environments
Improve Productivity & Best Practices
Why do we need virtual environment while developing the MCP server in cursor IDE?
What are the advantages of creating virtual environment?
Benefits of virtual environment
Developing simple MCP servers , its configuration in Cursor and running it.
MCP Skills: Server creation, API integration, error handling, response formatting
Cursor AI Advantages: Accelerated learning, real-time feedback, integrated testing environment
Solid foundation for advanced MCP servers & AI-tool integration
MCP architecture fundamentals : What Model Context Protocol is, how servers, tools, and resources interact.
Designing MCP tools : How to define clear actions (add, list, mark-done) with strict schemas.
State and persistence: Storing todos locally (e.g., JSON file), ensuring durability and readability.
Idempotency and safe updates: Preventing duplicates, consistent task identification, and reliable “mark done.”
Error handling contracts: Returning helpful, structured errors for invalid input or missing tasks.
Validation and typing: Constraining inputs (required fields, string types) to avoid runtime surprises.
Separation of concerns: Keeping storage logic, command handlers, and protocol wiring cleanly isolated.
Integration with MCP clients: Exposing capabilities that agents like Cursor can call seamlessly.
Testing and observability: Simple local tests, logging, and behaviors that are easy to verify end-to-end.
This minimal MCP (Model Context Protocol) server exposes a single tool, `image_info`,
that reads a local image file and returns basic metadata such as format, mode, and size.
What you'll learn by studying this server:
- How to initialize a simple MCP server using FastMCP
- How to expose a function as an MCP tool with type annotations
- How to perform basic input validation (file path existence)
- How to use Pillow (`PIL.Image`) to open images and extract metadata
- How to return structured data (a serializable `dict`) to MCP clients
Practical MCP usage: How to call a local MCP tool (`text-summarizer`) with parameters (e.g., sentences=3–4) and consume its output.
Summarization fundamentals: Turning long text into concise, coherent summaries and selecting appropriate summary lengths for context.
Prompt design: Framing inputs clearly and controlling outputs (sentence count, brevity vs. coverage).
MCP = Protocol (JSON-RPC over stdio).
Cursor AI = Orchestrator, not executor.
Tools = Exposed by MCP Server.
LLM = Optional helper for natural language → tool selection.
MCP-Based Application:
Built using the Model Context Protocol (MCP) so that AI clients (like Cursor) can call server-side tools programmatically.
FastMCP Framework:
Uses the FastMCP library to quickly define tools, resources, and expose them as an ASGI application.
Persistent To-Do Storage:
All tasks are stored in a local todos.json file, enabling data persistence across sessions.
Core MCP Tools Provided:
add_todo(task) → adds a new task
list_todos() → lists all tasks
mark_todo_done(task) → marks a task as completed
Server-Sent Events (SSE) Integration:
Uses SSE to stream real-time updates from the MCP server to connected clients — enabling live notifications or progress updates.
ASGI + Uvicorn Runtime:
Runs as an ASGI application served by Uvicorn, making it asynchronous and production-ready.
Endpoints Defined:
/todos → main HTTP endpoint for MCP message exchange
/sse → dedicated endpoint for Server-Sent Events streaming
Local and AI-Client Compatible:
Can be registered in mcp.json so AI tools (e.g., Cursor or VS Code AI) can interact with it directly via JSON-RPC.
Learning Value:
Demonstrates how to build a real-time, event-driven MCP server that combines AI tool integration, persistent data handling, and SSE communication.
This example demonstrates how to build MCP (Model Context Protocol) servers using streamable HTTP transport instead of the traditional stdio transport.
- Modern web architecture and HTTP protocols
- JSON-RPC 2.0 communication standards
- Scalable server design patterns
- Real-world API integration techniques
• Read-Only Data Catalog - MCP Resources provide a standardized way to expose read-only data that AI assistants can browse and fetch. Unlike tools (which perform actions), resources are for retrieving information through a URI-based catalog system (e.g., `todos://list`).
• Resource Metadata Structure - Each Resource must define key metadata: `uri` (unique identifier), `name` (human-readable title), `description` (explains what the resource contains), and `mimeType` (data format like `application/json`, `text/plain`, or `image/png`).
• Content Array with TextContent - Resources return their data through a `content` array containing `TextContent` objects. Each TextContent has a `type` field (set to `"text"`) and a `text` field containing the actual data payload.
• Dynamic Data at Call Time - Resource functions are executed when requested, meaning they return the current state of the underlying data. In this example, `get_todos_resource()` reads from `todos.json` each time it's called, ensuring clients always get fresh data.
• Client Discovery via resources/list - MCP clients (like Cursor) can discover available resources by calling `resources/list`, then fetch specific resources by their URI. This creates a browsable interface where AI assistants can explore and access structured data from your server.
What are FastMCP Prompts?
==========================
FastMCP Prompts are special functions in the Model Context Protocol (MCP)
that provide natural language interfaces for AI assistants.
Unlike regular MCP tools that require structured parameters, prompts accept natural language input
and intelligently process it to perform complex operations.
DATA FLOW
=========
User Input → Prompt Selection → Input Processing → Data Analysis →
Response Generation → Data Storage → User Feedback
KEY BENEFITS
============
• Natural Language Understanding
• Intelligent Data Processing
• Context-Aware Responses
• Error Handling & Validation
• User Experience Enhancement
• Analytics & Insights
• Batch Processing Capabilities
• Interactive Guidance
USAGE SCENARIOS
===============
• Personal Task Management
• Project Planning
• Data Entry Automation
• Content Analysis
• User Onboarding
• Quality Assurance
• Productivity Tracking
• Smart Recommendations
Powerful feature of the Model Context Protocol that allows your MCP server to request LLM completions through the MCP client
Universal MCP configuration
Consistent experience with different AI clients.
MCP is client agnostic
Multiple server connection with cursor AI and Claude AI
MCP is not just for IDE it's a universal protocol
Unified data access
Protocol standardization
MCP server talking to SQLite Database
Modular architecture for better code organization, maintainability, and scalability.
Tools and Resources which serves the requests by communicating with the database.
Benefits of Modular Architecture
Add required packages in visual studio to develop local MCP server.
Microsoft.Extensions.Hosting package for hosting the startup infrastructure of the application.
ModelContextProtocol (pre-release) : Which is .Net SDK for MCP Development.
Automated SQL Schema Analysis
Metadata Extraction and Search
Relationship and Constraint Discovery
SQL Statement and Procedure Generation
Schema Export and Integration
Entry point for the DB Interaction MCP Server application.
Configures logging, dependency injection, and starts the MCP server with standard I/O transport.
Register MCP server services and tools, and configure the server to use standard input/output for communication.
Run the host asynchronously.
McpServerToolType : To define a type of class to declare it contains MCP tools
McpServerTool : To define this method is a MCP server tool.
How to add mcp.json file?
How to configure your MCP Server?
How to run the prompts in Copilot and test your mcp server?
Unlock the power of Model Context Protocol (MCP) and learn how to build, integrate, and manage intelligent applications with confidence! This hands-on course is designed for developers who want to go beyond theory and gain practical experience with MCP in real-world scenarios.
In this course, you will:
Understand the core concepts of MCP and how it enables AI-ready applications.
Learn to set up and configure MCP servers from scratch.
Explore different transport channels like STDIO, WebSocket, and Streamable HTTP.
Create and manage MCP Resources and Prompts to interact with clients efficiently.
Integrate MCP servers with AI agents using tools like Cursor and Claude.
Develop real projects, including a Todo Manager MCP server and AI-integrated services.
Test, deploy, and troubleshoot MCP applications for modern development environments.
By the end of this course, you’ll be able to confidently develop MCP servers, consume resources, and leverage MCP to create AI-enhanced applications that can communicate seamlessly with AI agents and clients.
Whether you’re a beginner looking to explore MCP or a developer aiming to integrate AI into your projects, this course provides the practical skills and projects you need to succeed.
No prior experience with MCP required—just bring your programming skills and curiosity to learn MCP.