AM

arnie936/mcp-example

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

16 stars 15 forks 品質 62 トレンド 29

A comprehensive Model Context Protocol (MCP) server built with FastMCP that provides calculator tools, document resources, and prompt templates.

概要

A comprehensive Model Context Protocol (MCP) server built with FastMCP that provides calculator tools, document resources, and prompt templates. This server demonstrates multiple MCP capabilities including tools, resources, and prompts in a single implementation. - : Addition, subtraction, multiplication, division - : Power, square root, factorial calculations - : Percentage calculations - : Division by zero protection, negative square root protection, factorial range limits - : Access to MCP TypeScript SDK documentation - : Reads from configurable file paths - : Graceful handling of missing files - : Executive meeting summary generator - : Dynamic template variable replacement - : Professional meeting summary format - Python 3.12 or later - uv package manager 3. Open http://localhost:3000 to test the server in MCP Inspector. Access the TypeScript SDK documentation: : Update DESKTOP_FILE_PATH in server.py to point to your documentation file:

README

以下は原文 README の抜粋です。原文を見る。

MCP Multi-Tool Server

A comprehensive Model Context Protocol (MCP) server built with FastMCP that provides calculator tools, document resources, and prompt templates. This server demonstrates multiple MCP capabilities including tools, resources, and prompts in a single implementation.

Features

🧮 Calculator Tools

  • Basic Operations: Addition, subtraction, multiplication, division
  • Advanced Math: Power, square root, factorial calculations
  • Utility Functions: Percentage calculations
  • Error Handling: Division by zero protection, negative square root protection, factorial range limits

📖 Document Resources

  • TypeScript SDK Resource: Access to MCP TypeScript SDK documentation
  • Dynamic File Reading: Reads from configurable file paths
  • Error Handling: Graceful handling of missing files

📝 Prompt Templates

  • Meeting Summary Template: Executive meeting summary generator
  • Variable Substitution: Dynamic template variable replacement
  • Structured Output: Professional meeting summary format

Quick Start

Prerequisites

  • Python 3.12 or later
  • uv package manager

Installation

  1. Clone the repository

    git clone 
    cd mcp-multi-tool-server
    
  2. Install dependencies

    uv sync
    
  3. Test the server

    uv run mcp dev server.py
    

    Open http://localhost:3000 to test the server in MCP Inspector.

Usage

Calculator Tools

The server provides 8 calculator tools:

Tool Description Example
add Add two numbers add(5, 3) → 8
subtract Subtract second from first subtract(10, 4) → 6
multiply Multiply two numbers multiply(6, 7) → 42
divide Divide first by second divide(15, 3) → 5
power Raise to power power(2, 8) → 256
square_root Calculate square root square_root(16) → 4
factorial Calculate factorial factorial(5) → 120
calculate_percentage Calculate percentage calculate_percentage(200, 15) → 30

TypeScript SDK Resource

Access the TypeScript SDK documentation:

# Resource URI: file://typesdk
# Returns the contents of the TypeScript SDK documentation

Configuration: Update DESKTOP_FILE_PATH in server.py to point to your documentation file:

DESKTOP_FILE_PATH = r"C:\Users\Arnold\Desktop\typesdk.md"

Meeting Summary Prompt

Generate structured meeting summaries:

# Prompt: meeting_summary
# Required parameters:
# - meeting_date: Date of the meeting
# - meeting_title: Title or purpose of the meeting  
# - transcript: Meeting transcript or notes

Output Structure:

  • Overview (purpose, participants, topics)
  • Key Decisions (major decisions, strategic changes)
  • Action Items (next steps, responsibilities, deadlines)
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "multi-tool-server": { "command": "uv", "args": [ "--directory", "/path/to/your/server/directory", "run", "python", "server.py" ], "env": { "UV_PROJECT_ENVIRONMENT": ".venv" } } } }