Skip to main content
Glama
hideya

Model Context Protocol (MCP) Server

by hideya

LangChain/Python을 사용하는 MCP 클라이언트 라이센스: MIT

이 간단한 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 키

Related MCP server: Just Prompt

설정

  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 에서 구성할 수 있습니다.

Available Tools

2 tools
get-alertsC

Get weather alerts for a US state

ParametersJSON Schema
NameRequiredDescriptionDefault
stateYesTwo-letter US state code (e.g. CA, NY)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description must carry full behavioral transparency. It only states the basic action without disclosing traits like read-only nature, authentication requirements, rate limits, or what type of alerts are returned. This is insufficient for an agent to understand the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, achieving conciseness. It is appropriately front-loaded with the verb and resource. However, it lacks structure such as prerequisites or return format, but it remains efficient for its length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity (one required parameter, no output schema, no annotations), the description should provide more context, such as what the alerts contain or that it is a read operation. The minimal description leaves gaps for an agent to understand the tool's full context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage for the 'state' parameter, so the baseline is 3. The description does not add any additional meaning beyond the schema; it simply restates the parameter's role without further context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('weather alerts') with a specific scope ('for a US state'). It distinguishes itself from the sibling 'get-forecast' by focusing on alerts, not forecasts, though it does not explicitly mention the sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'get-forecast'. The description does not include any prerequisites, context, or exclusions, leaving the agent to infer usage from tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get-forecastB

Get weather forecast for a location in the US

ParametersJSON Schema
NameRequiredDescriptionDefault
latitudeYesLatitude of the location
longitudeYesLongitude of the location

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose any behavioral traits such as data source, update frequency, or limitations of the forecast. The description only states the basic purpose.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that immediately communicates the tool's purpose. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with two parameters and no output schema, the description is minimal but covers the core purpose. However, it lacks usage guidance and behavioral details that would help an AI agent use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with both parameters described. The description adds no additional meaning beyond the schema; the mention of 'in the US' is a location constraint but not parameter-specific. Baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action 'Get', the resource 'weather forecast', and the scope 'for a location in the US'. It distinguishes from the sibling tool 'get-alerts' which likely deals with alerts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. The description does not indicate when to prefer this over 'get-alerts' or any other context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv0.3.2
    • First observedget-alerts
    • First observedget-forecast

TDQS

B3.1/5.0

Scored across 2 tools

Disambiguation5/5

The tools get-alerts and get-forecast have clearly distinct purposes: one provides weather alerts, the other gives forecasts. No overlap.

Naming Consistency5/5

Both tool names follow the consistent pattern 'get-<resource>', using lowercase and hyphens, which is predictable.

Tool Count2/5

With only 2 tools, the server feels too sparse for a weather domain. Typically, more operations like current conditions or radar would be expected.

Completeness2/5

The tool set only covers alerts and forecasts, missing common weather operations like current conditions, location search, or severe weather warnings, resulting in significant gaps.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers