MCP.so
登录

mcp-code-guidance

@JavaPentesters

关于 mcp-code-guidance

这是一个使用 Python 语言从 0 到 1 搭建 MCP server 的代码学习教程

基本信息

分类

开发工具

许可证

GPL-3.0 license

运行时

shell

传输方式

stdio

发布者

JavaPentesters

配置

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

{
  "mcpServers": {
    "mcp-code-guidance": {
      "command": "python",
      "args": [
        "-m",
        "http.server",
        "8181"
      ]
    }
  }
}

工具

未检测到工具

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

概览

What is mcp-code-guidance?

mcp-code-guidance is a tutorial for learning the MCP (Model Context Protocol) and A2A (Agent-to-Agent) protocol from scratch using Python. It focuses on the interaction between agents and external tools as well as collaboration between agents, and provides example MCP server implementations and a detailed tutorial.

How to use mcp-code-guidance?

Clone or download the repository, ensure Python 3.10+ and the uv package manager are installed. Then navigate into a specific example directory (e.g., mcp-server-01quickstart) and run uv init, uv venv, source .venv/bin/activate, and uv add "mcp[cli]" httpx to set up the environment. Detailed steps are provided in the README for each example.

Key features of mcp-code-guidance

  • Provides step‑by‑step tutorials for MCP and A2A protocols
  • Includes multiple ready‑to‑run MCP server examples (quickstart, weather, stock)
  • Uses Python 3.10+ and the FastMCP library
  • Managed with uv for clean project isolation
  • Covers the three MCP capabilities: Tool, Resource, and Prompt
  • Licensed under MIT for open‑source use

Use cases of mcp-code-guidance

  • Learning how to build a basic MCP server from scratch
  • Implementing a weather‑query MCP service (see mcp-server-02weather)
  • Building a stock‑price MCP service (see mcp-server-03stock)
  • Understanding how MCP tools, resources, and prompts work in practice
  • Exploring A2A agent‑to‑agent collaboration alongside MCP

FAQ from mcp-code-guidance

What are the required dependencies?

Python 3.10+ and the FastMCP library. The examples also use httpx and the mcp CLI package.

How do I set up the project environment?

Use the uv package manager: run uv init (specifying Python 3.11), uv venv, source .venv/bin/activate, then uv add "mcp[cli]" httpx.

What MCP capabilities are covered in this tutorial?

The tutorial covers all three MCP capabilities: Tool (direct function calls), Resource (context information), and Prompt (reusable templates).

Where does each example code live?

Each example is in its own directory under the repository root: mcp-server-01quickstart, mcp-server-02weather, mcp-server-03stock. A tutorial/ directory contains detailed development guides.

What is the official MCP resource linked in the README?

The README links to https://modelcontextprotocol.io/introduction for the official MCP introduction.

评论

开发工具 分类下的更多 MCP 服务器