MCP.so
Sign In
Servers

MCP Tutorials

@kwonci

Tutorial for mcp server

Overview

What is MCP Tutorials?

MCP Tutorials is a collection of notes and examples for setting up and using Model Context Protocol (MCP) servers with the Cline client. It covers resource discovery, prompt templates, image return, and the Python SDK, aimed at developers learning MCP.

How to use MCP Tutorials?

Follow the quickstart guide on modelcontextprotocol.io to create an MCP server. Use the server with Cline; if Cline reports errors, set the log level to error to suppress non-critical stderr output. Reinstall Python linter and formatter as ruff if needed.

Key features of MCP Tutorials

  • Integrates MCP server with Cline client
  • Covers resource discovery (direct and template URIs)
  • Explains prompt discovery and usage APIs
  • Demonstrates image return from MCP server
  • Uses Python SDK for implementation
  • Distinguishes between tools and resources abstractions

Use cases of MCP Tutorials

  • Accessing filesystem data using MCP server tools
  • Retrieving data via drive resources with URI templates
  • Understanding how resources differ from tools (data vs operations)
  • Creating reusable prompt templates for standardized LLM interactions
  • Returning images from an MCP server to a client

FAQ from MCP Tutorials

What caused errors in Cline when using the MCP server?

Cline may log successful operations as errors to stderr; setting the log level to error resolved the issue.

Does the MCP server avoid API requests?

No, API requests are still used. Each tool call generates two requests, costing approximately $0.05 and $0.03.

What is the difference between resources and tools in MCP?

Resources provide data (like GET), while tools provide operations (like POST). Both can achieve similar results but offer different abstractions.

How are resource read handlers defined?

Using the @mcp.resource() decorator with a URI string, or @mcp.resource(uri_template) for template‑based resources.

How are prompts defined in an MCP server?

Implement two APIs: prompts discovery (returns name, description, arguments) and prompts usage (returns dynamic prompts based on resources, possibly multiple).

More from Other