VM

victorjanni/mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

0 stars 0 forks Качество 70 Тренд 8

Here we will explore the building of local mcp servers and remote servers

Обзор

A lightweight, robust, and extensible server built with Python and FastMCP. This project demonstrates how to expose native Python functions as tools directly to AI assistants like Claude Desktop, Cursor, and other MCP-compatible clients. The is an open standard that enables AI models to safely interact with local data sources, APIs, and computation tools. This repository provides a clean starter template using , an intuitive framework for writing MCP servers in Python. It includes: - with automatic schema generation from Python docstrings and type hints. - with uv. - transport for easy integration with desktop and CLI LLM hosts. The server registers the following tools automatically: - : Version 3.10 or higher (>= 3.12 / 3.14 recommended). - (Recommended): Modern, ultra-fast Python package installer and runner (Install uv). Alternatively, standard pip and Python venv work as well. 2.

README

Показан фрагмент оригинального README. Открыть оригинал.

🚀 FastMCP Demo Server

A lightweight, robust, and extensible Model Context Protocol (MCP) server built with Python and FastMCP. This project demonstrates how to expose native Python functions as tools directly to AI assistants like Claude Desktop, Cursor, and other MCP-compatible clients.


📋 Table of Contents


🌟 Overview

The Model Context Protocol (MCP) is an open standard that enables AI models to safely interact with local data sources, APIs, and computation tools.

This repository provides a clean starter template using FastMCP, an intuitive framework for writing MCP servers in Python. It includes:

  • Type-safe tools with automatic schema generation from Python docstrings and type hints.
  • Fast, modern dependency management with uv.
  • Standard input/output (stdio) transport for easy integration with desktop and CLI LLM hosts.

🏛 Architecture

flowchart LR
    subgraph Client["AI Client (Host)"]
        LLM["Claude Desktop / Cursor / IDE"]
    end

    subgraph Transport["Communication Layer"]
        STDIO["Standard I/O (JSON-RPC)"]
    end

    subgraph Server["MCP Server (FastMCP)"]
        Core["FastMCP Instance\n('My mcp server demo')"]
        T1["generate_random_int"]
        T2["add_three_numbers"]
    end

    LLM |Requests & Responses| STDIO
    STDIO  Core
    Core --> T1
    Core --> T2

🛠 Available Tools

The server registers the following tools automatically:

Tool Name Parameters Return Type Description
Открыть полный README на GitHub

Установка

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

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "mcp-demo-server": { "command": "uv", "args": [ "--directory", "E:\\MCP-demo", "run", "python", "my_server.py" ] } } }