Skip to main content
Glama

Model Context Protocol (MCP) Server

by hideya

LangChain/Python을 사용하는 MCP 클라이언트

이 간단한 MCP(Model Context Protocol) 클라이언트는 LangChain ReAct Agent의 MCP 서버 도구 사용을 보여줍니다.

langchain_mcp_tools 의 유틸리티 함수 convert_mcp_to_langchain_tools() 활용합니다.
이 함수는 지정된 여러 MCP 서버의 병렬 초기화를 처리하고 사용 가능한 도구를 LangChain 호환 도구 목록( List[BaseTool] )으로 변환합니다.

현재 Anthropic, OpenAI 및 Groq의 LLM이 지원됩니다.

이 MCP 클라이언트의 타입스크립트 버전은 여기에서 사용할 수 있습니다.

필수 조건

  • 파이썬 3.11+
  • [선택 사항] Python 패키지 기반 MCP 서버를 실행하기 위해 uv ( uvx ) 가 설치됨
  • [선택 사항] Node.js 패키지 기반 MCP 서버를 실행하려면 npm 7+( npx )가 필요합니다.
  • 필요에 따라 Anthropic , OpenAI 및/또는 Groq 의 API 키

설정

  1. 종속성 설치:지엑스피1
  2. API 키 설정:
    cp .env.template .env
    • 필요에 따라 .env 업데이트합니다.
    • .gitignore 는 자격 증명의 우발적 커밋을 방지하기 위해 .env 무시하도록 구성됩니다.
  3. 필요에 따라 LLM 및 MCP 서버 설정 llm_mcp_config.json5 구성합니다.
    • MCP 서버의 구성 파일 형식은 데스크톱용 Claude 와 동일한 구조를 따르지만, 한 가지 차이점이 있습니다. JSON 구성 파일에서 일반적으로 사용되는 snake_case 규칙을 따르기 위해 키 이름 mcpServers``mcp_servers 로 변경되었습니다.
    • 파일 형식은 JSON5 이며, 주석과 끝에 쉼표가 허용됩니다.
    • 이 형식은 ${...} 표기법을 해당 환경 변수의 값으로 대체하도록 더욱 확장되었습니다.
    • 모든 자격 증명과 개인 정보를 .env 파일에 보관하고 필요에 따라 ${...} 표기법을 사용하여 참조합니다.

용법

앱을 실행하세요:

make start

처음 실행할 때는 시간이 좀 걸립니다.

자세한 모드로 실행:

make start-v

명령줄 옵션을 참조하세요.

make start-h

프롬프트에서 Enter 키를 누르면 MCP 서버 도구 호출을 수행하는 예제 쿼리를 사용할 수 있습니다.

예제 쿼리는 llm_mcp_config.json5 에서 구성할 수 있습니다.

-
security - not tested
A
license - permissive license
-
quality - not tested

이 서버는 Anthropic, OpenAI, Groq와 같은 공급업체의 AI 모델을 호출하는 것을 용이하게 하여 사용자가 대규모 언어 모델 상호 작용을 원활하게 관리하고 구성할 수 있도록 합니다.

  1. 필수 조건
    1. 설정
      1. 용법

        Related MCP Servers

        • -
          security
          -
          license
          -
          quality
          A simple server that acts as a Master Control Program (MCP) for unified interaction with OpenAI and Anthropic (Claude) AI models through a single API endpoint.
          Last updated -
        • -
          security
          F
          license
          -
          quality
          A server that allows AI agents to consult multiple large language models (like Grok, Gemini, Claude, GPT-4o) through Model Context Protocol for assistance and information.
          Last updated -
          3
          JavaScript
        • A
          security
          A
          license
          A
          quality
          A server that enables AI assistants to interact with the Omnisend marketing platform, supporting contact management, product management, and event tracking operations through natural language.
          Last updated -
          10
          TypeScript
          Apache 2.0
          • Linux
          • Apple
        • -
          security
          F
          license
          -
          quality
          A unified API server that enables interaction with multiple AI model providers like Anthropic and OpenAI through a consistent interface, supporting chat completions, tool calling, and context handling.
          Last updated -
          JavaScript

        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/hideya/mcp-client-langchain-py'

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