Skip to main content
Glama
VinodNallavade

usefastmcp

usefastmcp

A simple Model Context Protocol (MCP) server built with FastMCP.

This project demonstrates how to expose custom tools as MCP servers over two different transports — stdio (local, default) and HTTP (remote).


Project Structure

usefastmcp/
├── pyproject.toml            # Project config & dependencies (fastmcp)
├── uv.lock                   # Locked dependency versions
├── .python-version           # Python 3.13
├── servers/
│   ├── stdioserver.py        # MCP server over stdio transport
│   └── httpserver.py         # MCP server over HTTP transport
└── .vscode/
    └── mcp.json              # VS Code Copilot MCP configuration

Related MCP server: mcp-stdio

Requirements

  • Python 3.13+

  • uv package manager


Setup

uv sync

This creates the virtual environment and installs all dependencies (including fastmcp).


Available Tools

Both servers expose the same tools:

Tool

Signature

Description

roll_dice

roll_dice()

Returns a random integer between 1 and 6

add_numbers

add_numbers(first: int, second: int)

Adds two integers and returns the sum


Running the Server

1. Stdio Transport (default)

Runs over standard input/output — ideal for local host applications that launch the process directly.

uv run servers/stdioserver.py

2. HTTP Transport

Runs as an HTTP server on http://127.0.0.1:8000 — useful for remote clients and web-based access.

uv run servers/httpserver.py

Note: The FastMCP CLI (fastmcp run <file>) always forces stdio transport and ignores the transport="http" option in your code. Run uv run servers/httpserver.py directly to use HTTP transport.


VS Code Integration

This project includes .vscode/mcp.json for use with VS Code Copilot. The config launches the stdio server automatically.

  1. Open the project in VS Code

  2. Restart VS Code (or reload the window) so the MCP server is picked up

  3. The roll_dice and add_numbers tools become available to the Copilot agent

VS Code MCP Integration

Available Tools

2 tools
add_numberA

Add 2 numbers and returns result

ParametersJSON Schema
NameRequiredDescriptionDefault
firstYes
secondYes

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the core behavior (arithmetic addition) and that a result is returned, but it does not specify return type, edge-case behavior, or the absence of side effects beyond what is implied.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence that front-loads the action and contains no unnecessary words. Every phrase contributes to understanding the tool's purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a trivial pure function, this is nearly sufficient, but without an output schema it does not explicitly state that the returned result is the numeric sum or what type it is. It is adequate but leaves minor ambiguity about return behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It only says '2 numbers' and does not explain the roles of the first and second parameters, their constraints, or ordering, leaving the agent to infer from parameter names alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Add'), a clear target resource ('2 numbers'), and an outcome ('returns result'). It is unambiguous and clearly distinct from the sibling tool roll_dice, which involves randomness.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The use case is implied: an agent would choose this when needing the sum of two integer inputs. However, there is no explicit when-to-use or when-not-to-use guidance, and no mention of alternatives or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

roll_diceA

This method will return number between 1 to 6, when asked to roll a dice.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the behavioral disclosure burden. It discloses the output range and the context, but does not explicitly state that the result is random, which is a meaningful behavioral trait for a dice-roll tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, short sentence with no unnecessary content beyond a minor filler phrase. The key purpose and trigger are front-loaded and immediately understandable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with no output schema, the description covers the essential return range and use case. It is sufficient for simple invocation, though explicitly mentioning randomness would make it fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the baseline is 4. The description correctly focuses on behavior rather than parameters, and no parameter documentation is needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific action and resource: returns a number between 1 and 6 when rolling a dice. This clearly distinguishes it from the sibling add_number, which has a completely different purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'when asked to roll a dice' gives a clear usage condition. It does not explicitly mention alternatives or exclusions, but the sibling tool is unrelated and the intended trigger is obvious.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.8/5.0
Disambiguation5/5

roll_dice and add_number are completely distinct in purpose and behavior. There is no ambiguity about which tool to select for a given task.

Naming Consistency5/5

Both tool names follow a consistent verb_noun pattern: roll_dice and add_number. The naming style is uniform and predictable.

Tool Count3/5

With only two tools, the server feels quite thin. While each tool has a basic utility purpose, the set is minimal and barely provides enough surface to be considered a coherent collection.

Completeness2/5

There is no clear domain or lifecycle being covered; the tools are unrelated utilities. Obvious complementary operations (e.g., subtract, multiply, or dice with custom sides) are absent, leaving the surface feeling arbitrary and incomplete.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    A minimal, zero-dependency MCP server that enables defining and running tools over stdio transport, without extra features like HTTP or resources.
    15
    1
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    A minimal MCP server that exposes tools for addition, echoing text, time lookup, and URL fetching, with support for HTTP and stdio transports.

Latest Blog Posts

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/VinodNallavade/FastMCPServer-Examples'

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