HP

hottechstack/polars-docs-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

71 stars 4 forks 品質 65 トレンド 14MIT

Polars API のドキュメントを検索し、取得するための FastMCP ツール.

概要

複数の輸送方法をサポートするPolars APIのドキュメントを検索し、取得するためのFastMCPツール。 - 自動的に分極の公共コンポーネント(クラス、関数、サブモジュール)を発見します。 - コンポーネントまたはクエリ文字列で Polars API を検索します。 - 現在の Polars バージョンとパッケージ情報を取得します。 - API のシグネチャと説明で構造化された JSON を返します。 - 複数の輸送方法のサポート:STDIO、ストリーミング可能なHTTP、およびSSE。 - シームレスなLM搭載ワークフローのmcpと統合します。 Pythonの組み込みのイントロスペクションを活用することで、ランタイムですべてのパブリッククラス、関数、およびサブモジュールを反映的に発見し、外部のドキュメントデータベースのコスト、脆弱性、メンテナンスの負担を解消します.

概要(AI 翻訳)

複数の輸送方法をサポートするPolars APIのドキュメントを検索し、取得するためのFastMCPツール。

##特徴

  • 自動的に分極の公共コンポーネント(クラス、関数、サブモジュール)を発見します。
  • コンポーネントまたはクエリ文字列で Polars API を検索します。
  • 現在の Polars バージョンとパッケージ情報を取得します。
  • API のシグネチャと説明で構造化された JSON を返します。
  • 複数の輸送方法のサポート:STDIO、ストリーミング可能なHTTP、およびSSE。
  • シームレスなLM搭載ワークフローのmcpと連携します。

Pythonの組み込みのイントロスペクションを活用して、ランタイムですべてのパブリッククラス、関数、およびサブモジュールを反映させ、外部のドキュメントデータベースのコスト、脆弱性、メンテナンスの負担を解消します。 このアプローチは、すべてのライブラリのリリースで100%の最新の精度を保証します。複雑なテキストのクリーニングやパイプラインの埋め込む必要はありません。そして、セマンティック検索の重いインフラストラクチャのオーバーヘッドを回避します。これにより、よりシンプルで、リアルタイムのAPIの検索にはるかに効率的になります。

使用法

##1. Claudeデスクトップコンフィグ(推奨)

##2. 輸送オプションの手動実行

STDIO (デフォルト - クロードデスクトップに最適)

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Polars Docs MCP

A FastMCP tool to search and retrieve Polars API documentation with support for multiple transport methods.

Features

  • Automatically discover Polars public components (classes, functions, submodules).
  • Search Polars API by component or query string.
  • Get current Polars version and package information.
  • Returns structured JSON with API signatures and descriptions.
  • Support for multiple transport methods: STDIO, Streamable HTTP, and SSE.
  • Integrates with mcp for seamless LLM-powered workflows.

By leveraging Python’s built‑in introspection to reflectively discover every public class, function, and submodule in Polars at runtime, I eliminate the cost, fragility, and maintenance burden of web‑scraping or managing an external documentation database. This approach guarantees 100% up‑to‑date accuracy with every library release, requires no complex text cleaning or embedding pipelines, and avoids the heavy infrastructure overhead of semantic search—making it both simpler and far more efficient for real‑time API lookup.

Usage

{
    "mcpServers": {
        "polarsapifinder": {
            "command": "uv",
            "args": [
                "--directory",
                "/PATH/TO/polars-docs-mcp",
                "run",
                "polarsdocsfinder.py"
            ]
        }
    }
}

2. Manual Execution with Transport Options

STDIO (Default - Best for Claude Desktop)

python polarsdocsfinder.py
# or explicitly:
python polarsdocsfinder.py --transport stdio

Streamable HTTP (Best for Web Deployments)

python polarsdocsfinder.py --transport streamable-http
# With custom settings:
python polarsdocsfinder.py --transport streamable-http --host 0.0.0.0 --port 8080 --path /api/mcp

SSE (For Legacy Client Compatibility)

python polarsdocsfinder.py --transport sse
# With custom settings:
python polarsdocsfinder.py --transport sse --host 0.0.0.0 --port 9000

Command Line Arguments

  • --transport: Choose transport method (stdio, streamable-http, sse) - Default: stdio
  • --host: Host address for HTTP/SSE transports - Default: 127.0.0.1
  • --port: Port number for HTTP/SSE transports - Default: 8111
  • --path: URL path for streamable-http transport - Default: /mcp

3. Visual Testing of MCP Server

npx @modelcontextprotocol/inspector uv run polarsdocsfinder.py

Requires Python 3.11+.

Tool Endpoints

  • get_polars_version(): Get current Polars version and package information.
  • list_polars_components(): List all high-level Polars API components.
  • search_polars_docs(api_refs: list[str] | None, query: str | None, max_results: int = 1000): Search and retrieve API signatures.
  • verify_polars_api(api_ref: str): Verify if a Polars API reference is valid.
GitHub で README 全文を見る

インストール

npx @modelcontextprotocol/inspector uv run polarsdocsfinder.py
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "polarsapifinder": { "command": "uv", "args": [ "--directory", "/PATH/TO/polars-docs-mcp", "run", "polarsdocsfinder.py" ] } } }