mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server what is 12 multiplied by 8?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp tutorial
In this repo, I will show how to use FastMCP and uv to build an MCP server
Content of the MCP server
Suppose we want to provide the below content in the MCP server.
Type | Nom | Description |
Outil |
| Additionne deux nombres |
Outil |
| Multiplie deux nombres |
Outil |
| Date et heure UTC (ISO 8601) |
Ressource |
| Version du serveur |
Ressource |
| Message de bienvenue paramétré |
Invite |
| Demande de résumé d'un texte |
Related MCP server: MCPServer (FastMCP)
Run the MCP server
Transport stdio (par défaut, pour les clients MCP locaux) :
uv run mcp-serverTransport HTTP (point d'accès http://127.0.0.1:8000/mcp) :
uv run mcp-server --transport http --port 8000Test the MCP server
If you open http://127.0.0.1:8000/mcp via a browser, you will receive the below error message.
{"jsonrpc":"2.0","id":null,"error":{"code":-32600,"message":"Bad Request: Missing session ID"}}This is because the browser does not understand the MCP protocol. So we need an MCP client which can understand the MCP server.
The
FastMCPpackage provide an MCP client. So open a new terminal and run the below command to launch a client command.
# list all available resources of a MCP server
uv run fastmcp list http://127.0.0.1:8000/mcp --resources --prompts
# expected output
Tools (3)
add(a: float, b: float) -> dict
Additionne deux nombres.
multiply(a: float, b: float) -> dict
Multiplie deux nombres.
current_time() -> dict
Renvoie la date et l'heure actuelles (UTC, format ISO 8601).
Resources (1)
config://version
version — Version du serveur.
Prompts (1)
summarize(text)
Invite demandant un résumé concis du texte fourni.In the output, you can notice an MCP server can provide three kind of services:
tools: function which runs code locally(on the MCP server) and return a result to client
resources: return data based on the request
prompt:
Use MCP client to call a tool
uv run fastmcp call http://127.0.0.1:8000/mcp multiply a=2 b=3
# expected output
{
"result": 6.0
}
# the space is the separator
uv run fastmcp call http://127.0.0.1:8000/mcp add a=2 b=3
# expected output
{
"result": 5.0
}
uv run fastmcp call http://127.0.0.1:8000/mcp current_time
# expected output
{
"result": "2026-12-03T15:22:12.481875+00:00"
}Use MCP client to call a resource
uv run fastmcp call http://127.0.0.1:8000/mcp config://version
uv run fastmcp call http://127.0.0.1:8000/mcp greeting://AliceUse MCP client to call a prompt
uv run fastmcp call http://127.0.0.1:8000/mcp summarize --prompt text="MCP est un protocole ouvert. This is a long story of a young man trying to get in the best school of the USa."Inspecteur MCP (nécessite Node.js) :
uv run fastmcp dev inspector src/mcp_server/server.pyConfiguration d'un client MCP (ex. Claude Desktop / Claude Code)
{
"mcpServers": {
"mcp-server": {
"command": "uv",
"args": ["--directory", "C:/chemin/vers/le/projet", "run", "mcp-server"]
}
}
}Tests
uv run pytestStructure
src/mcp_server/
__init__.py # point d'entrée CLI (main)
server.py # définition du serveur FastMCP
tests/
test_server.pyAvailable Tools
3 toolsaddAddB
Additionne deux nombres.
Inputs: a (required), b (required). Returns: result
current_timeCurrent TimeA
Renvoie la date et l'heure actuelles (UTC, format ISO 8601).
Inputs: no named parameters. Returns: result
multiplyMultiplyB
Multiplie deux nombres.
Inputs: a (required), b (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: add performs addition, multiply performs multiplication, and current_time returns the current timestamp. There is no overlap in functionality, so an agent can select the right tool unambiguously.
All names use lowercase snake_case, which is consistent. However, add and multiply are verbs while current_time is a noun phrase, so get_current_time would have made the pattern fully uniform.
Three tools is a borderline-thin surface; it is not unreasonable for a tiny utility server, but the arithmetic and time domains naturally suggest additional operations. Each tool earns its place, but the set feels minimal rather than well-scoped.
The arithmetic surface omits core operations such as subtraction, division, and modulo, which will force agents into awkward workarounds or failures. The time tool is also limited to UTC, and there is no subtract or divide counterpart to add and multiply.
Maintenance
Related MCP Connectors
Remote MCP server exposing SMI Aware tools, resources, and skills over Streamable HTTP.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Deterministic OpenAPI 3.x SemVer diff, SPF 10-lookup flattener & WCAG 2.2 / EN 301 549 MCP server.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA minimal FastMCP server implementation that provides basic mathematical and greeting tools. Enables users to perform simple operations like adding numbers and greeting people by name through a lightweight MCP interface.MIT
- FlicenseNot gradedqualityDmaintenanceA minimal Model Context Protocol server built with FastMCP that provides basic utility tools including user greetings, number addition, and file listing operations. Includes examples of exposing tools, resources, and prompts for MCP-aware clients.-
- FlicenseNot gradedqualityCmaintenanceA basic MCP server implementation using the FastMCP framework that provides utility tools for greetings and mathematical calculations. It is designed to demonstrate tool integration for AI-assisted development workflows like Cline.-
- AlicenseNot gradedqualityDmaintenanceA foundational Model Context Protocol server demonstrating core functionality through basic arithmetic tools and personalized greeting resources. It serves as a template for developers learning to build and deploy MCP-enabled AI applications.GPL 3.0