MCP.so
ログイン

Beginner's Guide to MCP Servers

@astensby

基本情報

カテゴリ

その他

トランスポート

stdio

作者

astensby

Beginner's Guide to MCP Servers について

概要はまだありません

Beginner's Guide to MCP Servers の設定

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

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

Beginner's Guide to MCP Servers のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

ツールは 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

よくある質問

1

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.

2

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.

3

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.

4

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.

5

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.

コメント

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