Skip to main content
Glama

MCP LLMS-TXT Documentation Server

by teddylee777

MCP LLMS-TXT ドキュメントサーバー

概要

llms.txtは LLM のウェブサイトインデックスであり、背景情報、ガイダンス、詳細なマークダウンファイルへのリンクを提供しています。Cursor や Windsurf などの IDE や Claude Code/Desktop などのアプリは、 llms.txtを使用してタスクのコンテキストを取得できます。ただし、これらのアプリはllms.txtなどのファイルの読み取りと処理に、異なる組み込みツールを使用しています。取得プロセスは不透明になる場合があり、ツールの呼び出しや返されたコンテキストを監査する方法が必ずしも存在しない場合があります。

MCPは、開発者がこれらのアプリケーションで使用されるツールを完全に制御する方法を提供します。ここでは、オープンソースのMCPサーバーを作成し、MCPホストアプリケーション(例:Cursor、Windsurf、Claude Code/Desktop)に、(1) ユーザー定義のllms.txtファイルリストと、(2) 提供されたllms.txtファイル内のURLを読み取るシンプルなfetch_docsツールを提供します。これにより、ユーザーは各ツールの呼び出しと返されるコンテキストを監査できます。

mcpdoc

クイックスタート

uvをインストールする
curl -LsSf https://astral.sh/uv/install.sh | sh
使用するllms.txtファイルを選択します。
(オプション) 選択したllms.txtファイルを使用して、MCP サーバーをローカルでテストします。
uvx --from mcpdoc mcpdoc \ --urls LangGraph:https://langchain-ai.github.io/langgraph/llms.txt \ --transport sse \ --port 8082 \ --host localhost

スクリーンショット 2025年3月18日 午後3時29分30秒

npx @modelcontextprotocol/inspector

スクリーンショット 2025年3月18日 午後3時30分

  • ここで、 tool呼び出しをテストできます。
カーソルに接続
  • Cursor SettingsMCPタブを開きます。
  • これにより~/.cursor/mcp.jsonファイルが開きます。

スクリーンショット 2025年3月19日 午前11時1分31秒

  • 次の内容をファイルに貼り付けます ( langgraph-docs-mcpという名前を使用し、LangGraph llms.txtにリンクします)。
{ "mcpServers": { "langgraph-docs-mcp": { "command": "uvx", "args": [ "--from", "mcpdoc", "mcpdoc", "--urls", "LangGraph:https://langchain-ai.github.io/langgraph/llms.txt", "--transport", "stdio", "--port", "8081", "--host", "localhost" ] } } }
  • Cursor Settings/MCPタブでサーバーが実行中であることを確認します。
  • CMD+L (Mac の場合) を押すとチャットが開きます。
  • agentが選択されていることを確認します。

スクリーンショット 2025-03-18 午後1時56分54秒

次に、次のようなサンプルプロンプトを試してください。

use the langgraph-docs-mcp server to answer any LangGraph questions -- + call list_doc_sources tool to get the available llms.txt file + call fetch_docs tool to read it + reflect on the urls in llms.txt + reflect on the input question + call fetch_docs on any urls relevant to the question + use this to answer the question what are types of memory in LangGraph?

スクリーンショット 2025-03-18 午後1時58分38秒

ウィンドサーフィンに接続する

  • CMD+L (Mac の場合) で Cascade を開きます。
  • Configure MCPクリックして、構成ファイル~/.codeium/windsurf/mcp_config.jsonを開きます。
  • 上記のとおり、 langgraph-docs-mcpで更新します。

スクリーンショット 2025年3月19日 午前11時2分52秒

  • CMD+L (Mac の場合) を押すと Cascade が開き、MCP サーバーが更新されます。
  • 利用可能な MCP サーバーが一覧表示され、 langgraph-docs-mcpが接続されていることが表示されます。

スクリーンショット 2025-03-18 午後2時2分12秒

次に、次のサンプルプロンプトを試してください。

  • ツール呼び出しを実行します。

スクリーンショット 2025-03-18 午後2時3分7秒

Claudeデスクトップに接続

  • Settings/Developerを開いて、 ~/Library/Application\ Support/Claude/claude_desktop_config.jsonを更新します。
  • 上記のとおり、 langgraph-docs-mcpで更新します。
  • Claude デスクトップ アプリを再起動します。

スクリーンショット 2025年3月18日 午後2時5分54秒

  • チャット入力の右下にツールが表示されます。

スクリーンショット 2025年3月18日 午後2時5分39秒

次に、次のサンプルプロンプトを試してください。

  • リクエストを処理する際に、ツール呼び出しの承認を求められます。

スクリーンショット 2025年3月18日 午後2時6分54秒

クロード・コードに接続する

  • Claude Codeをインストールした後、ターミナルで次のコマンドを実行して、MCP サーバーをプロジェクトに追加します。
claude mcp add-json langgraph-docs '{"type":"stdio","command":"uvx" ,"args":["--from", "mcpdoc", "mcpdoc", "--urls", "langgraph:https://langchain-ai.github.io/langgraph/llms.txt"]}' -s local
  • ~/.claude.json更新されていることがわかります。
  • Claude Code を起動して実行し、ツールを表示してテストします。
$ Claude $ /mcp

スクリーンショット 2025年3月18日 午後2時13分49秒

次に、次のサンプルプロンプトを試してください。

  • ツールの呼び出しを承認するように求められます。

スクリーンショット 2025年3月18日 午後2時14分37秒

コマンドラインインターフェース

mcpdocコマンドは、ドキュメント サーバーを起動するためのシンプルな CLI を提供します。

ドキュメント ソースは次の 3 つの方法で指定でき、これらを組み合わせることもできます。

  1. YAML 構成ファイルの使用:
  • これにより、このリポジトリのsample_config.yamlファイルから LangGraph Python ドキュメントが読み込まれます。
mcpdoc --yaml sample_config.yaml
  1. JSON 構成ファイルの使用:
  • これにより、このリポジトリのsample_config.jsonファイルから LangGraph Python ドキュメントが読み込まれます。
mcpdoc --json sample_config.json
  1. オプションの名前を使用して llms.txt URL を直接指定します。
  • URL は、プレーン URL として指定することも、 name:url形式を使用してオプションの名前で指定することもできます。
  • これは、上記の MCP サーバーのllms.txtをロードする方法です。
mcpdoc --urls LangGraph:https://langchain-ai.github.io/langgraph/llms.txt

これらの方法を組み合わせてドキュメント ソースをマージすることもできます。

mcpdoc --yaml sample_config.yaml --json sample_config.json --urls https://langchain-ai.github.io/langgraph/llms.txt

追加オプション

  • --follow-redirects : HTTP リダイレクトに従う (デフォルトは False)
  • --timeout SECONDS : HTTPリクエストのタイムアウト(秒)(デフォルトは10.0)

追加オプションの例:

mcpdoc --yaml sample_config.yaml --follow-redirects --timeout 15

これにより、LangGraph Python ドキュメントが 15 秒のタイムアウトで読み込まれ、必要に応じて HTTP リダイレクトに従います。

設定形式

YAML と JSON の両方の構成ファイルには、ドキュメント ソースのリストが含まれている必要があります。

各ソースにはllms_txt URL を含める必要があり、オプションでnameを含めることもできます。

YAML 設定例 (sample_config.yaml)

# Sample configuration for mcp-mcpdoc server # Each entry must have a llms_txt URL and optionally a name - name: LangGraph Python llms_txt: https://langchain-ai.github.io/langgraph/llms.txt

JSON 設定例 (sample_config.json)

[ { "name": "LangGraph Python", "llms_txt": "https://langchain-ai.github.io/langgraph/llms.txt" } ]

プログラムによる使用

from mcpdoc.main import create_server # Create a server with documentation sources server = create_server( [ { "name": "LangGraph Python", "llms_txt": "https://langchain-ai.github.io/langgraph/llms.txt", }, # You can add multiple documentation sources # { # "name": "Another Documentation", # "llms_txt": "https://example.com/llms.txt", # }, ], follow_redirects=True, timeout=15.0, ) # Run the server server.run(transport="stdio")
-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Cursor、Windsurf、Claude などのアプリケーションに llms.txt ドキュメント ファイルへのアクセスを提供し、ユーザーがコンテキストの取得を制御および監査できるようにするオープン ソースの MCP サーバーです。

  1. 概要
    1. クイックスタート
      1. uvをインストールする
      2. 使用するllms.txtファイルを選択します。
      3. (オプション) 選択したllms.txtファイルを使用して、MCP サーバーをローカルでテストします。
      4. カーソルに接続
      5. ウィンドサーフィンに接続する
      6. Claudeデスクトップに接続
      7. クロード・コードに接続する
    2. コマンドラインインターフェース
      1. 追加オプション
        1. 設定形式
          1. YAML 設定例 (sample\_config.yaml)
          2. JSON 設定例 (sample\_config.json)
        2. プログラムによる使用

          Related MCP Servers

          • -
            security
            F
            license
            -
            quality
            An MCP server that allows Claude and other LLMs to manage persistent memories across conversations through text file storage, enabling commands to add, search, delete and list memory entries.
            Last updated -
            2
            TypeScript
          • -
            security
            F
            license
            -
            quality
            An MCP server that provides detailed information about your development environment to the Cursor code editor, enabling more context-aware assistance.
            Last updated -
            1
            Python
            • Linux
            • Apple
          • -
            security
            A
            license
            -
            quality
            An MCP server that provides tools to load and fetch documentation from any llms.txt source, giving users full control over context retrieval for LLMs in IDE agents and applications.
            Last updated -
            177
            Python
            MIT License
            • Apple
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol (MCP) server for Cursor IDE that simplifies the installation and configuration of other MCP servers.
            Last updated -
            882
            23
            JavaScript
            MIT License
            • Apple
            • Linux

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/teddylee777/mcpdoc'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server