MCP.so
ログイン

Beginner's Guide to MCP Servers

@astensby

Beginner's Guide to MCP Servers について

概要はまだありません

基本情報

カテゴリ

その他

ランタイム

python

トランスポート

stdio

公開者

astensby

設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "gritai-basic-mcp-server": {
      "command": "python",
      "args": [
        "-m",
        "venv",
        ".venv"
      ]
    }
  }
}

ツール

ツールは検出されませんでした

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is Beginner's Guide to MCP Servers?

Beginner's Guide to MCP Servers is a demonstration project that helps beginners build Model Context Protocol (MCP) servers with minimal coding experience. It includes two example MCP servers: one for local file operations and task management, and one for connecting to external APIs like Norwegian police data and stock markets.

How to use Beginner's Guide to MCP Servers?

Clone the project, create and activate a Python virtual environment (Python 3.11+ required), install dependencies with pip install -e ., then configure your MCP client (e.g., Claude Desktop) with the server command and arguments as shown in the README. Optionally set the ALPHA_VANTAGE_API_KEY environment variable for stock tools.

Key features of Beginner's Guide to MCP Servers

  • Two ready‑to‑run example MCP servers with multiple tools
  • Local motivational quotes and task manager (add/list/complete tasks)
  • Real‑time Norwegian police incidents fetcher (by district or municipality)
  • Stock ticker search and current price retrieval (requires free Alpha Vantage API key)
  • Simple tool‑adding pattern using the @mcp.tool() decorator
  • Customizable quote and task data via local JSON files

Use cases of Beginner's Guide to MCP Servers

  • Learning how MCP servers connect AI assistants to external data and tools
  • Building a personal task manager that an AI can read and update
  • Fetching live police incident data from Norway via an AI chat interface
  • Searching stock tickers and getting prices without leaving the AI conversation
  • Experimenting with adding new tools and API integrations to an MCP server

FAQ from Beginner's Guide to MCP Servers

What prerequisites are needed to run these servers?

Python 3.11 or higher must be installed. The project uses a virtual environment and the pip install -e . command to install dependencies.

Do I need an API key for all features?

No. The motivational quote and task manager server works without any external API key. The stock market features require a free Alpha Vantage API key set as the ALPHA_VANTAGE_API_KEY environment variable.

What files are included in the project?

The project contains server.py (API integrations), motivational_server.py (local operations), quotes.json, tasks.json, pyproject.toml, and a README.

How do I add a new tool?

Use the @mcp.tool() decorator on a Python function inside either server file. The function’s signature and docstring define the tool’s parameters and description.

How do I troubleshoot common errors?

Activate the virtual environment and run pip install -e . for module‑not‑found errors. Ensure your Alpha Vantage API key is set correctly (free keys have rate limits). Run the server from the project directory so that quotes.json and tasks.json are found.

コメント

「その他」の他のコンテンツ