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 Chat

설정

1단계: 환경 변수 구성

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

ANTHROPIC_API_KEY=""  # Enter your Anthropic API secret key

2단계: 의존성 설치

옵션 1: uv를 사용한 설정 (권장)

uv는 빠른 Python 패키지 설치 및 해결 도구입니다.

  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_doc_contentC

Edits the content of a document based on the provided new content.

ParametersJSON Schema
NameRequiredDescriptionDefault
doc_idYesID of the document to edit.
old_strYesThe string to be replaced. Must match exactly, including whitespace.
new_strYesThe new string to replace the old string.

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations, the description must disclose important behaviors. It states 'Edits' implying mutation, but fails to mention that the operation is a find-and-replace, that it modifies data destructively, or any error conditions (e.g., if old_str is not found). The description is insufficient for safe invocation.

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

Conciseness3/5

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

The description is a single short sentence, which is concise but lacks structure. It repeats the tool name and does not prioritize key information. Every sentence should add value, and this one merely paraphrases the name without providing critical details.

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 no output schema, no annotations, and three required parameters, the description should explain the return format, error behavior, and the find-and-replace process. It provides none of these, making the tool incomplete for an agent to use confidently.

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 clear descriptions for all three parameters. The tool description adds no additional semantic value beyond the schema; it merely restates that editing occurs. Since the schema already covers full meaning, a score of 3 is appropriate.

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?

Description states 'Edits the content of a document', clearly indicating the verb and resource. It distinguishes from sibling 'read_doc_content' which is a read operation. However, it does not specify that the edit is a find-and-replace, which could lead to ambiguity about the exact editing mechanism.

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 its sibling or other alternatives. The description does not mention prerequisites, context, or limitations, leaving the agent to infer usage from the name and schema.

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

read_doc_contentA

Reads the content of a document and returns it as a string.

ParametersJSON Schema
NameRequiredDescriptionDefault
doc_idYesID of the document to read.

TDQS

A3.6/5.0
Behavior2/5

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

No annotations are provided, and the description gives minimal behavioral context. It does not mention read-only status, access requirements, or any constraints like size limits.

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 sentence with no unnecessary words. It effectively communicates the tool's purpose.

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

Completeness4/5

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

Given the tool's simplicity (1 parameter, no output schema) and the description's inclusion of return type as string, it is mostly complete. Could mention that the document must exist, but not critical.

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 a clear parameter description. The description adds no extra meaning beyond the schema's doc_id field, so baseline score 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 it reads document content and returns a string, with a clear verb and resource. It distinguishes from the sibling tool edit_doc_content which modifies.

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

Usage Guidelines3/5

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

No explicit when-to-use or when-not-to-use guidance. The sibling tool edit_doc_content is listed, but the description does not provide usage context or alternatives.

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.1.0
    • First observededit_doc_content
    • First observedread_doc_content

TDQS

B3.3/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: one reads document content, the other edits it. There is no overlap or ambiguity.

Naming Consistency5/5

Both tool names follow a consistent verb_noun pattern (read_doc_content, edit_doc_content), making them predictable and easy to understand.

Tool Count4/5

With only two tools, the server is minimal but reasonably scoped for a chat-based document interaction context. It's slightly thin but not inappropriate.

Completeness2/5

The tools cover reading and editing existing documents, but lack essential operations like creating, deleting, or listing documents. This is a significant gap for a document-focused server.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    C
    maintenance
    Enables interactive chat with AI models through the Anthropic API, supporting document retrieval, command-based prompts, and extensible tool integrations via the MCP architecture.
    2
    -