Skip to main content
Glama

Toy MCP Server

by icck
server.py921 B
from typing import Annotated from fastmcp import FastMCP from pydantic import Field from tools.count_letters_tool import count_letters_impl from tools.generate_uuid_tool import generate_uuid7s_impl mcp: FastMCP = FastMCP("Toy Tools") @mcp.tool( name="count_letters", description="Count the number of times a letter appears in a word", ) def count_letters( word: Annotated[str, Field(description="The word to count letters in")], letter: Annotated[str, Field(description="The letter to count")], ) -> int: return count_letters_impl(word, letter) @mcp.tool( name="generate_uuid7s", description="Generates a specified number of UUIDv7 (default is 1).", ) def generate_uuid7s( count: Annotated[int, Field(description="The number of UUIDs to generate", default=1, ge=1)], ) -> list[str]: return generate_uuid7s_impl(count) if __name__ == "__main__": mcp.run(transport="stdio")

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/icck/toy'

If you have feedback or need assistance with the MCP directory API, please join our Discord server