MCP.so
登录

Servidor MCP com Python – Tutorial Prático

@ryanbrito

基本信息

分类

版本控制

传输方式

stdio

作者

ryanbrito

关于 Servidor MCP com Python – Tutorial Prático

暂无概览

Servidor MCP com Python – Tutorial Prático 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "MCP-Server-Example": {
      "command": "uv",
      "args": [
        "venv",
        ".venv"
      ]
    }
  }
}

Servidor MCP com Python – Tutorial Prático 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is 🧠 Servidor MCP com Python – Tutorial Prático?

This is a tutorial repository demonstrating how to create an MCP (Model Context Protocol) server using the official Microsoft SDK in Python. It defines tools with @tool decorators that can be consumed by LLMs like ChatGPT or Open WebUI.

How to use 🧠 Servidor MCP com Python – Tutorial Prático?

Install dependencies with uv add mcp mcp[cli] mcpo, then run locally with mcp run main.py or mcpo --port 8000 -- .venv/bin/python main.py for HTTP mode. Tools are defined in main.py.

Key features of 🧠 Servidor MCP com Python – Tutorial Prático

  • Demonstrates creating an MCP server with Python 3.10+
  • Uses @tool decorator to expose functions to LLMs
  • Supports local stdio mode and HTTP mode via mcpo
  • Automatically generates OpenAPI documentation
  • Integrates with Open WebUI as an MCP tool endpoint
  • Includes example tools: get_tutorial_summary and somar

Use cases of 🧠 Servidor MCP com Python – Tutorial Prático

  • Learning how to build an MCP server in Python from scratch
  • Creating a custom tool set for LLM assistants via MCP protocol
  • Exposing Python functions as REST endpoints for LLM integration
  • Testing MCP server development with the official Microsoft SDK

常见问题

1

What are the runtime requirements?

Python 3.10+ and the `uv` package manager for environments and packages.

2

How do I run the server in HTTP mode?

Use `mcpo --port 8000 -- .venv/bin/python main.py`; documentation appears at http://localhost:8000/docs.

3

How can I integrate with Open WebUI?

After starting the server with mcpo, go to Open WebUI settings > Tools and insert the URL http://localhost:8000.

4

Why are docstrings important for tools?

They appear in OpenAPI documentation and are used by the AI to decide which function to call based on the user's query.

5

What transport modes are supported?

The server supports stdio transport for local use (via `mcp run` or `python main.py`) and HTTP transport via mcpo for REST API access.

评论

版本控制 分类下的更多 MCP 服务器