Learn
Hands-on examples for building MCP systems with finemcp. Each tutorial is a self-contained runnable example from the examples repository.
Server
Demonstrates how to create and configure an MCP server using finemcp.NewServer.
Tools
Demonstrates all the ways to create and configure tools in FineMCP.
Streaming
Demonstrates how a tool can stream multiple content fragments back to the client before returning the final result.
Resources
Demonstrates how to expose data as MCP resources that clients can read and subscribe to.
Prompts
Demonstrates the MCP prompt system for reusable prompt templates with arguments and auto-completion.
Sampling
Demonstrates the MCP sampling API for **server-initiated LLM requests** — where the server asks the *client* to perform LLM inference.
Roots
Demonstrates registering **root URIs** that define the content boundaries visible to the server.
Elicitation
Demonstrates the MCP elicitation API for **server-initiated user prompts** — where the server asks the client to collect input from the user.
Progress
Demonstrates how tools report **incremental progress** to the client during long-running operations.
Logging
Demonstrates the MCP server logging API for sending **structured log messages** to the client.
Completion
Demonstrates the MCP auto-completion system for both **prompts** and **resource templates**.
Transports
Demonstrates the five transport mechanisms available in finemcp for client-server communication.
Middleware
Demonstrates 16 middleware types that wrap tool handlers with cross-cutting concerns.
Testing
Demonstrates in-process MCP server testing using the mcptest package — no HTTP, no network.
Content Types
Demonstrates all MCP content types: **text**, **image**, and **embedded resource**.
Composition
Demonstrates **Pipeline** and **Parallel** composition patterns for combining multiple tool handlers.
Embedding
Demonstrates how to **embed an MCP server** into an existing HTTP application alongside regular HTTP routes.
Example Apps
Real-world style MCP servers you can connect to Claude Desktop or any MCP client.