mcp_server47

nabind47/mcp_server47

3.2

If you are the rightful owner of mcp_server47 and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This document provides a comprehensive overview of a Model Context Protocol (MCP) server setup using the FastMCP library.

Tools
2
Resources
0
Prompts
0
uv init .

uv add fastmcp
fastmcp version
import random

from fastmcp import FastMCP

mcp = FastMCP(name="MCP SERVER")


@mcp.tool
def roll_dice(n_dice: int = 1) -> list[int]:
    """Roll n_dice 6-sided dice and return the results."""
    return [random.randint(1, 6) for _ in range(n_dice)]


@mcp.tool
def add_number(a: float, b: float) -> float:
    """Add two numbers together."""
    return a + b


if __name__ == "__main__":
    mcp.run()
uv run fastmcp dev main.py

uv run fastmcp run main.py
uv run fastmcp install claude-desktop main.py