Learn

Hands-on examples for building MCP systems with finemcp. Each tutorial is a self-contained runnable example from the examples repository.

1

Server

Demonstrates how to create and configure an MCP server using finemcp.NewServer.

2

Tools

Demonstrates all the ways to create and configure tools in FineMCP.

3

Streaming

Demonstrates how a tool can stream multiple content fragments back to the client before returning the final result.

4

Resources

Demonstrates how to expose data as MCP resources that clients can read and subscribe to.

5

Prompts

Demonstrates the MCP prompt system for reusable prompt templates with arguments and auto-completion.

6

Sampling

Demonstrates the MCP sampling API for **server-initiated LLM requests** — where the server asks the *client* to perform LLM inference.

7

Roots

Demonstrates registering **root URIs** that define the content boundaries visible to the server.

8

Elicitation

Demonstrates the MCP elicitation API for **server-initiated user prompts** — where the server asks the client to collect input from the user.

9

Progress

Demonstrates how tools report **incremental progress** to the client during long-running operations.

10

Logging

Demonstrates the MCP server logging API for sending **structured log messages** to the client.

11

Completion

Demonstrates the MCP auto-completion system for both **prompts** and **resource templates**.

12

Transports

Demonstrates the five transport mechanisms available in finemcp for client-server communication.

13

Middleware

Demonstrates 16 middleware types that wrap tool handlers with cross-cutting concerns.

14

Testing

Demonstrates in-process MCP server testing using the mcptest package — no HTTP, no network.

15

Content Types

Demonstrates all MCP content types: **text**, **image**, and **embedded resource**.

16

Composition

Demonstrates **Pipeline** and **Parallel** composition patterns for combining multiple tool handlers.

17

Embedding

Demonstrates how to **embed an MCP server** into an existing HTTP application alongside regular HTTP routes.

18

Example Apps

Real-world style MCP servers you can connect to Claude Desktop or any MCP client.