Skip to main content
Glama
shazaaly

MCP Boilerplate Server

by shazaaly

MCP Server

A Model Context Protocol (MCP) server built with FastMCP that provides tools, resources, and prompts for greeting, math operations, user management, and system monitoring.

Features

  • Tools: Greeting, math operations (add/multiply), user information lookup

  • Resources: Server info, user data, configuration settings

  • Prompts: User analysis, report generation, system health checks, troubleshooting

Related MCP server: ddg--mcp5

Quick Start

Prerequisites

  • Python 3.12 or higher

  • uv (recommended) or pip

Installation Options

# Install with uv (recommended)
uv add mcp-server-boilerplate

# Or install with pip
pip install mcp-server-boilerplate  # not published , this is boilerplate

After installation, you can run the server directly:

mcp-server-boilerplate

Option 2: Install from GitHub (Development)

  1. Clone the repository:

git clone <YOUR_GITHUB_REPO_URL>
cd mcp_server
  1. Install uv (if not already installed):

# On macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# On Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
  1. Install dependencies:

uv sync

Alternative with pip:

pip install fastmcp>=2.11.3
  1. Test the server:

uv run python main.py

You should see the FastMCP banner and server startup message. Press Ctrl+C to stop.

Available Tools

  • greet(name: str) - Greet a person by name

  • add(a: int, b: int) - Add two numbers together

  • multiply(a: int, b: int) - Multiply two numbers together

  • get_user_info(user_id: int) - Get user information by ID

Connecting to Claude Desktop

To use this MCP server with Claude Desktop, you need to add it to your configuration file.

Step 1: Find Your Config File

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%/Claude/claude_desktop_config.json

  • Linux: ~/.config/Claude/claude_desktop_config.json

Step 2: Find Your Paths

First, find the required paths for your system:

# Find uv installation path
which uv

# Get your current directory
pwd

Step 3: Add Server Configuration

If Installed from PyPI

Add this to your claude_desktop_config.json (create the file if it doesn't exist):

{
  "mcpServers": {
    "mcp-server-boilerplate": {
      "command": "mcp-server-boilerplate"
    }
  }
}

If Installed from GitHub (Development)

{
  "mcpServers": {
    "mcp-server-boilerplate": {
      "command": "/path/to/uv",
      "args": [
        "run",
        "python",
        "main.py"
      ],
      "cwd": "/path/to/your/mcp_server"
    }
  }
}

Important: Replace the paths with your actual values:

  • Replace /path/to/uv with the output from which uv

  • Replace /path/to/your/mcp_server with your project directory path

After adding the configuration, restart Claude Desktop to load the MCP server.

Testing with MCP Inspector

To test your server with MCP Inspector:

  1. Start the server in one terminal:

uv run python main.py
  1. In MCP Inspector, use these connection settings:

    • Connection Type: Local Command

    • Command: /home/shaza/.local/bin/uv (use which uv to find your path)

    • Arguments: run python main.py

    • Working Directory: /home/shaza/shaza/mcp_server

Or alternatively, if using direct python:

  • Command: python3

  • Arguments: main.py

  • Working Directory: /home/shaza/shaza/mcp_server

Troubleshooting

Common Issues

1. "ModuleNotFoundError: No module named 'fastmcp'"

# Install dependencies
uv sync
# or
pip install fastmcp>=2.11.3

2. "python: command not found"

  • Use python3 instead of python

  • Make sure Python 3.12+ is installed

3. "uv: command not found"

  • Install uv following the installation instructions above

  • Or use the direct Python configuration in Claude Desktop

4. Claude Desktop connection issues

  • Verify all paths in your config are absolute (not relative)

  • Restart Claude Desktop after config changes

  • Check that the config file is valid JSON (no trailing commas)

  • Test the server runs manually first: uv run python main.py

5. MCP Inspector connection errors

  • Make sure the server isn't already running in another terminal

  • Use absolute paths for command and working directory

  • Verify uv is in your PATH

Getting Help

  1. Test the server manually: uv run python main.py

  2. Check your paths with which uv and pwd

  3. Validate your JSON config at jsonlint.com

  4. Check Claude Desktop logs for error messages

Development

Project Structure

  • main.py - Entry point that starts the MCP server

  • server.py - Main server code with tools, resources, and prompts

  • pyproject.toml - Python project configuration and dependencies

Adding New Features

  • Tools: Add functions decorated with @mcp.tool in server.py

  • Resources: Add functions decorated with @mcp.resource("uri")

  • Prompts: Add functions decorated with @mcp.prompt

All functions should include proper type hints and docstrings for the best experience.

Publishing to PyPI (For Maintainers)

First Time Setup

  1. Install build tools:

uv add --dev build twine
  1. Create PyPI account at pypi.org

  2. Configure authentication:

# Create API token at https://pypi.org/manage/account/token/
# Store it securely - you'll use it as password with username '__token__'

Publishing Process

  1. Update version in pyproject.toml and mcp_server_boilerplate/__init__.py

  2. Build the package:

uv run python -m build
  1. Test upload to TestPyPI (recommended first time):

uv run twine upload --repository testpypi dist/*
  1. Upload to PyPI:

uv run twine upload dist/*

Updating the Package

  1. Update version numbers in:

    • pyproject.toml

    • mcp_server_boilerplate/__init__.py

  2. Clean previous builds:

rm -rf dist/ build/ *.egg-info/
  1. Build and upload:

uv run python -m build
uv run twine upload dist/*

Before You Publish

  • Update GitHub URLs in pyproject.toml

  • Test the package locally: uv run mcp-server-boilerplate

  • Add your email to pyproject.toml authors section

  • Ensure all sensitive information is removed

Available Tools

4 tools
addB

Add two numbers together

ParametersJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior2/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. While 'Add two numbers together' implies a simple computation, it doesn't address potential issues like integer overflow, error handling, or whether this is a pure function. The description is minimal and lacks behavioral context beyond the basic operation.

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 extremely concise with a single, clear sentence that directly states the tool's function. There's no wasted language or unnecessary elaboration, making it efficiently front-loaded and easy to parse.

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?

Given the tool's simplicity (two integer parameters, has output schema), the description is minimally adequate but lacks depth. With no annotations and an output schema present, the description doesn't need to explain return values, but it misses opportunities to clarify behavioral aspects or usage guidelines that would help an agent use it effectively.

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 description adds meaningful context beyond the input schema, which has 0% description coverage. By specifying 'two numbers together,' it clarifies that both parameters are numeric operands for addition, compensating for the schema's lack of parameter descriptions. However, it doesn't detail the specific roles of 'a' and 'b' beyond being numbers to add.

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

Purpose4/5

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

The description 'Add two numbers together' clearly states the tool's purpose with a specific verb ('Add') and resource ('two numbers'), making it immediately understandable. However, it doesn't explicitly distinguish this from the 'multiply' sibling tool, which performs a different mathematical operation on the same type of inputs.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'multiply' for mathematical operations. It doesn't mention any prerequisites, constraints, or typical use cases, leaving the agent to infer usage from the tool name alone.

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

get_user_infoB

Get user information by ID

ParametersJSON Schema
NameRequiredDescriptionDefault
user_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states it's a read operation ('Get'), implying non-destructive, but doesn't disclose permissions, rate limits, error handling, or return format. For a tool with no annotations, this leaves significant behavioral gaps.

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, efficient sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly.

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?

Given the tool's low complexity (1 parameter) and the presence of an output schema, the description is minimally adequate. However, with no annotations and 0% schema coverage, it lacks behavioral and parametric details that would enhance completeness for agent use.

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

Parameters3/5

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

Schema description coverage is 0%, but the description adds meaning by specifying the parameter is 'by ID'. However, it doesn't detail the ID format, constraints, or examples. With 1 parameter, the baseline is 4, but the minimal addition slightly compensates for the schema gap.

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

Purpose4/5

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

The description clearly states the verb ('Get') and resource ('user information'), specifying it's by ID. It doesn't distinguish from siblings, but none are related tools (add, greet, multiply), so differentiation isn't needed. It's specific enough to understand the core function.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, context, or exclusions. With unrelated siblings, explicit alternatives aren't needed, but general usage context is missing.

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

greetB

Greet a person by name

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Greet') but doesn't describe what the tool actually does behaviorally—e.g., whether it returns a message, logs the greeting, or has side effects. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 extremely concise and front-loaded with a single, clear sentence: 'Greet a person by name'. There is no wasted text, making it efficient and easy to parse, which is ideal for a simple tool.

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?

Given the tool's low complexity (1 parameter) and the presence of an output schema, the description is somewhat complete but lacks depth. It doesn't explain behavioral aspects or usage context, which are needed since annotations are absent. The output schema may cover return values, but the description should still provide more context for effective use.

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

Parameters3/5

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

The input schema has 1 parameter with 0% description coverage, so the schema provides no semantic details. The description adds minimal value by implying the parameter is a 'name' for greeting, but it doesn't specify format, constraints, or examples. Baseline is 3 since the schema coverage is low, but the description doesn't fully compensate for the lack of schema details.

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

Purpose4/5

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

The description clearly states the tool's purpose with a specific verb ('Greet') and resource ('a person by name'), making it immediately understandable. However, it doesn't differentiate from sibling tools like 'add' or 'multiply', which have completely different functions, so it doesn't need sibling differentiation but could be more specific about what 'greet' entails.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any context, prerequisites, or exclusions, such as whether it's for formal or informal greetings, or if it should be used in specific scenarios. This leaves the agent with minimal usage direction.

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

multiplyB

Multiply two numbers together

ParametersJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. The description only states what the tool does (multiplication) but doesn't disclose any behavioral traits like error handling, performance characteristics, mathematical precision, or what happens with large numbers. For a mathematical operation tool with zero annotation coverage, this is a significant gap.

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 perfectly concise: 'Multiply two numbers together' - a single sentence with zero waste. It's front-loaded with the core functionality and appropriately sized for this simple mathematical operation. Every word earns its place.

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?

Given this is a simple mathematical tool with an output schema (which presumably describes the result), the description is reasonably complete for the core functionality. However, with no annotations and 0% schema description coverage, it lacks behavioral context that would be helpful for an agent. The existence of an output schema means the description doesn't need to explain return values.

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

Parameters3/5

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

The schema description coverage is 0%, so the description must compensate. The description mentions 'two numbers' which maps to the two parameters, but doesn't add meaning beyond what's obvious from the parameter names 'a' and 'b'. It doesn't explain that these are integers (from schema), provide examples, or discuss edge cases. With 0% schema coverage, the description adds minimal value beyond the obvious.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Multiply two numbers together' - a specific verb ('multiply') and resource ('two numbers'). It distinguishes from siblings like 'add' by specifying multiplication rather than addition. However, it doesn't explicitly mention the integer type restriction from the schema.

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

Usage Guidelines2/5

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

No guidance is provided about when to use this tool versus alternatives. The description doesn't mention sibling tools like 'add' for different mathematical operations, nor does it provide context about when multiplication is appropriate versus other operations. The agent must infer usage from the tool name alone.

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

TDQS

C2.9/5.0
Disambiguation2/5

The tools have unclear boundaries and overlapping purposes. 'add' and 'multiply' are distinct mathematical operations, but 'get_user_info' and 'greet' are unrelated to them and to each other, creating a confusing mix of domains. An agent might struggle to choose between tools for different tasks due to the lack of a cohesive theme.

Naming Consistency2/5

The naming is inconsistent with mixed conventions. 'add' and 'multiply' use simple verb forms, while 'get_user_info' follows a verb_noun pattern and 'greet' is a standalone verb. This lack of a predictable pattern makes the tool set harder to navigate and understand.

Tool Count3/5

With 4 tools, the count is borderline appropriate. It feels thin for a general-purpose server, as it lacks depth in any single domain (e.g., math or user management). However, it's not extreme, so it's reasonable but could benefit from more focused scope.

Completeness2/5

There are significant gaps in the tool surface for any inferred domain. If the domain is math, tools like subtract or divide are missing; if it's user management, tools for creating or updating users are absent. The set is incomplete, leading to potential agent failures when trying to perform common operations.

Maintenance

ActivityInactive
ResponsivenessNo issues

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

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    A basic MCP server template built with FastMCP framework that provides example tools for echoing messages and retrieving server information. Serves as a starting point for building custom MCP servers with both stdio and HTTP transport support.
  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    A basic MCP server template with example tools including message echo and server information retrieval. Built with FastMCP framework and supports both stdio and HTTP transports.
  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    A basic MCP server template with example tools for echoing messages and retrieving server information. Built with FastMCP framework and supports both stdio and HTTP transports for integration with various clients.
  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    A basic MCP server template with example tools for echoing messages and retrieving server information. Built with FastMCP framework and supports both stdio and HTTP 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/shazaaly/mcp-boilerplate'

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