Skip to main content
Glama

MCP LLMS-TXT Documentation Server

by langchain-ai

MCP LLMS-TXT 문서 서버

개요

llms.txt 는 LLM을 위한 웹사이트 인덱스로, 배경 정보, 지침, 그리고 자세한 마크다운 파일 링크를 제공합니다. Cursor, Windsurf와 같은 IDE나 Claude Code/Desktop과 같은 앱은 llms.txt 사용하여 작업의 컨텍스트를 검색할 수 있습니다. 하지만 이러한 앱은 llms.txt 와 같은 파일을 읽고 처리하기 위해 다양한 내장 도구를 사용합니다. 검색 과정은 불투명할 수 있으며, 도구 호출이나 반환된 컨텍스트를 감사할 방법이 항상 있는 것은 아닙니다.

MCP는 개발자가 이러한 애플리케이션에서 사용하는 도구를 완벽하게 제어 할 수 있는 방법을 제공합니다. 여기서는 MCP 호스트 애플리케이션(예: Cursor, Windsurf, Claude Code/Desktop)에 (1) 사용자 정의 llms.txt 파일 목록과 (2) 제공된 llms.txt 파일 내의 URL을 읽어오는 간단한 fetch_docs 도구를 제공하는 오픈 소스 MCP 서버를 llms.txt fetch_docs llms.txt 이를 통해 사용자는 각 도구 호출과 반환된 컨텍스트를 감사할 수 있습니다.

llms-txt

langgraph와 langchain의 llms.txt 파일은 다음에서 찾을 수 있습니다.

도서관llms.txt
LangGraph 파이썬https://langchain-ai.github.io/langgraph/llms.txt
랭그래프 JShttps://langchain-ai.github.io/langgraphjs/llms.txt
랭체인 파이썬https://python.langchain.com/llms.txt
랭체인 JShttps://js.langchain.com/llms.txt

빠른 시작

uv 설치

지엑스피1

사용할 llms.txt 파일을 선택하세요.

참고: 보안 및 도메인 액세스 제어

보안상의 이유로 mcpdoc는 엄격한 도메인 액세스 제어를 구현합니다.

  1. 원격 llms.txt 파일 : 원격 llms.txt URL(예: https://langchain-ai.github.io/langgraph/llms.txt )을 지정하면 mcpdoc는 해당 도메인( langchain-ai.github.io )만 허용 도메인 목록에 자동으로 추가합니다. 즉, 도구는 해당 도메인의 URL에서만 문서를 가져올 수 있습니다.
  2. 로컬 llms.txt 파일 : 로컬 파일을 사용할 경우 도메인이 허용 목록에 자동으로 추가되지 않습니다. --allowed-domains 매개변수를 사용하여 허용할 도메인을 명시적으로 지정해야 합니다.
  1. 추가 도메인 추가 : 자동으로 포함된 도메인 외의 도메인에서 가져오기를 허용하려면 다음을 수행합니다.
  • --allowed-domains domain1.com domain2.com 사용하여 특정 도메인을 추가합니다.
  • 모든 도메인을 허용하려면 --allowed-domains '*' 를 사용하세요(신중하게 사용하세요)

이러한 보안 조치는 사용자의 명시적인 승인 없이 도메인에 대한 무단 액세스를 방지하여 신뢰할 수 있는 출처에서만 문서를 검색할 수 있도록 보장합니다.

(선택 사항) 선택한 llms.txt 파일을 사용하여 로컬에서 MCP 서버를 테스트합니다.
uvx --from mcpdoc mcpdoc \ --urls "LangGraph:https://langchain-ai.github.io/langgraph/llms.txt" "LangChain:https://python.langchain.com/llms.txt" \ --transport sse \ --port 8082 \ --host localhost

스크린샷 2025-03-18 오후 3시 29분 30초

npx @modelcontextprotocol/inspector

스크린샷 2025-03-18 오후 3시 30분 30초

  • 여기에서 tool 호출을 테스트할 수 있습니다.
커서에 연결
  • Cursor SettingsMCP 탭을 엽니다.
  • ~/.cursor/mcp.json 파일이 열립니다.

스크린샷 2025-03-19 오전 11시 01분 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 LangChain:https://python.langchain.com/llms.txt", "--transport", "stdio" ] } } }
  • Cursor Settings/MCP 탭에서 서버가 실행 중인지 확인하세요.
  • 가장 좋은 방법은 커서 글로벌(사용자) 규칙을 업데이트하는 것입니다.
  • 커서 Settings/Rules 열고 다음 내용(또는 유사한 내용)으로 User Rules 업데이트합니다.
for ANY question about LangGraph, use the langgraph-docs-mcp server to help answer -- + 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
  • CMD+L (Mac)을 눌러 채팅을 엽니다.
  • agent 선택되었는지 확인하세요.

스크린샷 2025-03-18 오후 1시 56분 54초

그런 다음, 다음과 같은 예시 프롬프트를 시도해 보세요.

what are types of memory in LangGraph?

스크린샷 2025-03-18 오후 1시 58분 38초

Windsurf에 연결

  • CMD+L (Mac)을 눌러 Cascade를 엽니다.
  • Configure MCP 클릭하여 구성 파일 ~/.codeium/windsurf/mcp_config.json 엽니다.
  • 위에 언급한 대로 langgraph-docs-mcp 로 업데이트합니다.

스크린샷 2025-03-19 오전 11시 02분 52초

  • Windsurf Rules/Global rules 다음(또는 유사한 내용)으로 업데이트하세요.
for ANY question about LangGraph, use the langgraph-docs-mcp server to help answer -- + 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

스크린샷 2025-03-18 오후 2시 2분 12초

그런 다음, 예제 프롬프트를 시도해 보세요.

  • 도구 호출을 수행합니다.

스크린샷 2025-03-18 오후 2시 3분 7초

Claude Desktop에 연결

  • Settings/Developer 열어 ~/Library/Application\ Support/Claude/claude_desktop_config.json 을 업데이트합니다.
  • 위에 언급한 대로 langgraph-docs-mcp 로 업데이트합니다.
  • Claude Desktop 앱을 다시 시작합니다.

[!참고] Claude Desktop에 MCPDoc 도구를 추가하려고 할 때 Python 버전 비호환성 문제가 발생하면 uvx 명령에서 python 실행 파일의 파일 경로를 명시적으로 지정할 수 있습니다.

{ "mcpServers": { "langgraph-docs-mcp": { "command": "uvx", "args": [ "--python", "/path/to/python", "--from", "mcpdoc", "mcpdoc", "--urls", "LangGraph:https://langchain-ai.github.io/langgraph/llms.txt", "--transport", "stdio" ] } } }

[!참고] 현재(2025년 3월 21일) Claude Desktop은 글로벌 규칙에 대한 rules 지원하지 않는 것으로 보이므로 다음을 프롬프트에 추가하세요.

<rules> for ANY question about LangGraph, use the langgraph-docs-mcp server to help answer -- + 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 </rules>

스크린샷 2025-03-18 오후 2시 05분 54초

  • 채팅 입력란의 오른쪽 하단에 도구가 표시됩니다.

스크린샷 2025-03-18 오후 2시 05분 39초

그런 다음, 예제 프롬프트를 시도해 보세요.

  • 요청을 처리할 때 도구 호출을 승인할지 묻습니다.

스크린샷 2025-03-18 오후 2시 06분 54초

Claude Code에 연결

  • 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", "--urls", "LangChain:https://python.langchain.com/llms.txt"]}' -s local
  • ~/.claude.json 이 업데이트된 것을 볼 수 있습니다.
  • Claude Code를 실행하고 도구를 확인하여 테스트하세요.
$ Claude $ /mcp

스크린샷 2025-03-18 오후 2시 13분 49초

[!참고] 현재(2025년 3월 21일) Claude Code는 글로벌 규칙에 대한 rules 지원하지 않는 것으로 보이므로 다음을 프롬프트에 추가합니다.

<rules> for ANY question about LangGraph, use the langgraph-docs-mcp server to help answer -- + 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 </rules>

그런 다음, 예제 프롬프트를 시도해 보세요.

  • 도구 호출을 승인할지 묻습니다.

스크린샷 2025-03-18 오후 2시 14분 37초

명령줄 인터페이스

mcpdoc 명령은 문서 서버를 시작하기 위한 간단한 CLI를 제공합니다.

문서 소스를 지정하는 방법은 세 가지가 있으며, 이를 결합할 수도 있습니다.

  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 형식을 사용하여 선택적 이름을 사용하여 지정할 수 있습니다.
  • --urls 매개변수를 여러 번 사용하면 여러 URL을 지정할 수 있습니다.
  • 위의 MCP 서버에 llms.txt 를 로드한 방법은 다음과 같습니다.
mcpdoc --urls LangGraph:https://langchain-ai.github.io/langgraph/llms.txt --urls LangChain:https://python.langchain.com/llms.txt

다음 방법을 결합하여 문서 소스를 병합할 수도 있습니다.

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

추가 옵션

  • --follow-redirects : HTTP 리디렉션을 따릅니다(기본값은 False)
  • --timeout SECONDS : HTTP 요청 시간 초과(초) (기본값은 10.0)

추가 옵션이 있는 예:

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

이렇게 하면 15초의 시간 제한을 두고 LangGraph Python 문서가 로드되고 필요한 경우 모든 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

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

llms.txt 소스에서 문서를 로드하고 가져올 수 있는 도구를 제공하는 MCP 서버로, 사용자는 IDE 에이전트와 애플리케이션에서 LLM의 컨텍스트 검색을 완벽하게 제어할 수 있습니다.

  1. 개요
    1. llms-txt
      1. 빠른 시작
        1. uv 설치
        2. 사용할 llms.txt 파일을 선택하세요.
        3. (선택 사항) 선택한 llms.txt 파일을 사용하여 로컬에서 MCP 서버를 테스트합니다.
        4. 커서에 연결
        5. Windsurf에 연결
        6. Claude Desktop에 연결
        7. Claude Code에 연결
      2. 명령줄 인터페이스
        1. 추가 옵션
          1. 구성 형식
            1. YAML 구성 예제(sample\_config.yaml)
            2. JSON 구성 예제(sample\_config.json)
          2. 프로그래밍 방식 사용

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol (MCP) server that enables LLMs to interact directly the documents that they have on-disk through agentic RAG and hybrid search in LanceDB. Ask LLMs questions about the dataset as a whole or about specific documents.
              Last updated -
              12
              31
              TypeScript
              MIT License
              • Apple
            • -
              security
              F
              license
              -
              quality
              A MCP server that exposes OpenAPI schema information to LLMs like Claude. This server allows an LLM to explore and understand large OpenAPI schemas through a set of specialized tools, without needing to load the whole schema into the context
              Last updated -
              37
              5
              JavaScript
              • Apple
              • Linux
            • -
              security
              A
              license
              -
              quality
              An MCP server that enables clients to extract LLM-friendly prompts from documentation in GitHub repositories or hosted websites.
              Last updated -
              Python
              Apache 2.0
            • -
              security
              A
              license
              -
              quality
              An open-source MCP server that provides applications like Cursor, Windsurf, and Claude with access to llms.txt documentation files, allowing users to control and audit context retrieval.
              Last updated -
              4
              Python
              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/langchain-ai/mcpdoc'

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