Skip to main content
Glama

MCP Chat

MCP Chat는 Anthropic API를 통해 AI 모델과 대화형 채팅 기능을 제공하는 명령줄 인터페이스 애플리케이션입니다. 이 애플리케이션은 문서 검색, 명령 기반 프롬프트, MCP(Model Control Protocol) 아키텍처를 통한 확장 가능한 도구 통합을 지원합니다.

사전 요구 사항

  • Python 3.9+

  • Anthropic API 키

Related MCP server: mcp_starter_project

설정

1단계: 환경 변수 구성

  1. 프로젝트 루트에 .env 파일을 생성하거나 편집하고 다음 변수가 올바르게 설정되었는지 확인합니다.

ANTHROPIC_API_KEY=""  # Enter your Anthropic API secret key

2단계: 종속성 설치

옵션 1: uv로 설정 (권장)

uv는 빠른 Python 패키지 설치 프로그램이자 해석기(resolver)입니다.

  1. 아직 설치되지 않은 경우 uv를 설치합니다:

pip install uv
  1. 가상 환경을 생성하고 활성화합니다:

uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. 종속성을 설치합니다:

uv pip install -e .
  1. 프로젝트를 실행합니다

uv run main.py

옵션 2: uv 없이 설정

  1. 가상 환경을 생성하고 활성화합니다:

python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. 종속성을 설치합니다:

pip install anthropic python-dotenv prompt-toolkit "mcp[cli]==1.8.0"
  1. 프로젝트를 실행합니다

python main.py

사용 방법

기본 상호 작용

메시지를 입력하고 Enter를 눌러 모델과 대화합니다.

문서 검색

@ 기호 다음에 문서 ID를 입력하여 쿼리에 문서 내용을 포함시킵니다:

> Tell me about @deposition.md

명령

/ 접두사 뒤에 MCP 서버에 정의된 명령을 입력하여 실행합니다:

> /summarize deposition.md

Tab 키를 누르면 명령이 자동 완성됩니다.

개발

새 문서 추가

mcp_server.py 파일을 편집하여 docs 사전에 새 문서를 추가합니다.

MCP 기능 구현

MCP 기능을 완전히 구현하려면:

  1. mcp_server.py의 TODO를 완료합니다.

  2. mcp_client.py에서 누락된 기능을 구현합니다.

린트 및 타입 검사

구현된 린트 또는 타입 검사는 없습니다.

Available Tools

2 tools
edit_documentA

Edit a document by replacing a string in the documents content with a new string

Inputs: doc_id (required), new_str (required), old_str (required).

read_doc_contentsA

Read the contents of a document and return it as a string.

Inputs: doc_id (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools are clearly distinct: one reads document contents, the other modifies them. There is no overlap or ambiguity between the operations.

    Naming Consistency4/5

    Both tools use a verb_noun pattern and snake_case, but one uses 'doc_contents' and the other uses 'document', which is a minor inconsistency. A more consistent pair would be read_document/edit_document.

    Tool Count3/5

    Two tools is a thin surface and falls at the borderline for a useful server. The tools are focused, but the count feels minimal for a standalone document-related MCP server.

    Completeness2/5

    The tool surface covers reading and editing documents but lacks create, delete, list, and search capabilities. This leaves significant lifecycle gaps that agents may need to work around.

    Related MCP Connectors

    Related MCP Servers