# MCP-Use: 오픈소스 기반의 LLM 도구 접속용 MCP 클라이언트 라이브러리

**URL:** <https://discuss.pytorch.kr/t/mcp-use-llm-mcp/7399>\
**Category:** 읽을거리&정보공유\
**Tags:** model-context-protocol, mcp-server, langchain, mcp-use\
**Created:** [8월 1, 2025, 9:30오전 UTC](https://discuss.pytorch.kr/t/mcp-use-llm-mcp/7399 "2025-08-01T09:30:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![9bow](https://discuss.pytorch.kr/user_avatar/discuss.pytorch.kr/9bow/32/16301_2.png) [@9bow](https://discuss.pytorch.kr/u/9bow)\
**Post date:** [8월 1, 2025, 9:30오전 UTC](https://discuss.pytorch.kr/t/mcp-use-llm-mcp/7399/1 "2025-08-01T09:30:07Z")

</div>

![MCP-Use: 오픈소스 기반의 LLM 도구 접속용 MCP 클라이언트 라이브러리](https://discuss.pytorch.kr/uploads/default/original/2X/6/6f1542aa1c4e03b95803b309f4ec8d86b3326d4d.png)

## MCP-Use 소개

대규모 언어 모델(LLM)은 점점 더 다양한 외부 도구들과의 통합이 요구되고 있습니다. 예를 들어 웹 검색, 파일 시스템 접근, 사용자 정의 API 호출 등 LLM의 활용 폭을 넓히기 위한 연동이 필수가 되었습니다. 하지만 이러한 통합 작업은 복잡한 설정과 보안 이슈, 성능 고려사항 등으로 개발자에게 부담을 줄 수 있습니다.

이를 해결하기 위해 등장한 것이 바로 **MCP-Use** 입니다. 이 오픈소스 프로젝트는 LLM이 다양한 MCP(Model Context Protocol) 서버들과 연결되어 웹 브라우징, 파일 시스템, 3D 모델링, HTTP API 호출 등을 실행할 수 있도록 해주는 Python 라이브러리입니다. MCP-Use는 LangChain 기반의 LLM을 MCP 서버와 연결해주는 클라이언트를 제공하며, 다양한 MCP 서버를 동시에 사용할 수 있는 구조를 제공합니다.

MCP-Use는 유사한 프레임워크인 LangChain 자체의 기능과 Agent Framework, Auto-GPT, Open Agents 등과 비교할 수 있습니다. 기존 LangChain이나 Auto-GPT는 내부적으로 도구와 연결된 액터(agent)를 정의하고 동작시키지만, MCP-Use는 외부의 MCP 서버들을 모듈화된 방식으로 호출해 마치 마이크로서비스처럼 연결할 수 있게 합니다. 이는 각각의 MCP 서버가 독립적으로 작동하며 다양한 환경에 배포될 수 있도록 하기 위한 설계입니다. 또한 서버 간 분산 처리나 도구의 동적 할당 기능에서도 장점을 가집니다.

## **MCP-Use의 핵심 구성 요소**

### **MCP 서버와 클라이언트 구조**

MCP-Use는 두 가지 주요 요소로 구성됩니다:

- MCPClient: MCP 서버들과의 연결을 관리하는 객체로, 설정 파일 또는 딕셔너리 기반 구성 가능
- MCPAgent: LangChain 기반 LLM과 MCPClient를 연결하여 실제 질의(Query)를 수행하는 에이전트

### **지원되는 MCP 기능**

다양한 종류의 MCP 서버와 통신이 가능합니다:

- 웹 브라우징 (Playwright 기반 MCP)
- Airbnb 예약 검색
- Blender를 통한 3D 모델 생성
- 커스텀 HTTP API 호출
- 샌드박스 기반 실행 (E2B를 통한 클라우드 실행 지원)

### **LLM 지원**

LangChain이 지원하는 대부분의 LLM(OpenAI, Anthropic, Groq, LLaMA 등)과 연동 가능하며, 중요한 전제는 **Tool Calling (function calling / tool use) 기능이 활성화된 모델만 사용 가능**하다는 점입니다.

## **설치 및 빠른 시작**

```auto
# pip를 사용하여 설치합니다:
pip install mcp-use

# 또는 소스에서 직접 설치할 수 있습니다:
git clone https://github.com/pietrozullo/mcp-use.git
cd mcp-use
pip install -e .

```

MCP-Use는 LangChain을 통해 다양한 LLM 제공자와 통신합니다. 따라서 OpenAI 나 Anthropic과 같은 LangChain provider를 설치해야 합니다. 예를 들어:

```auto
pip install langchain-openai
pip install langchain-anthropic

```

이후, `.env` 파일에 해당 LLM 제공자의 API 키를 설정합니다:

```auto
OPENAI_API_KEY=
ANTHROPIC_API_KEY=

```

OpenAI / Anthropic 외의 다른 LLM 모델 제공자에 대해서는 [LangChain chat models documentation](https://python.langchain.com/docs/integrations/chat/) 문서를 참고해주세요. 단, 앞에서 설명한 것과 같이 Tool Calling (function calling / tool use) 기능이 활성화된 모델만 사용 가능하니 주의해주세요.

## MCP-Use의 주요 기능 소개

### MCP 에이전트 예제

```auto
agent = MCPAgent(
    llm=ChatOpenAI(model="gpt-4o"),
    client=MCPClient.from_dict(config),
    max_steps=30
)
result = await agent.run("Find the best restaurant in San Francisco")

```

### 실시간 스트리밍 지원

MCPAgent는 `astream()`을 통해 결과를 스트리밍으로 받을 수 있으며, 이러한 실시간 스트리밍은 Interactive UI나 실시간 모니터링 시에 적합합니다:

```auto
async for chunk in agent.astream("Search something"):
    print(chunk["messages"], end="", flush=True)

```

### 멀티 서버 구성 및 동적 선택

다수의 MCP 서버를 동시에 등록하고, 요청에 따라 서버를 동적으로 선택 가능합니다:

```auto
{
  "mcpServers": {
    "airbnb": {"command": "npx", "args": ["-y", "@openbnb/mcp-server-airbnb"]},
    "playwright": {"command": "npx", "args": ["@playwright/mcp@latest"]}
  }
}

```

### 도구 접근 제어

보안 이슈를 고려하여 위험한 도구의 사용을 제한할 수 있습니다:

```auto
agent = MCPAgent(disallowed_tools=["file_system", "network"])

```

### 샌드박스 실행 (E2B)

복잡한 설정 없이 클라우드 환경에서 MCP 서버를 실행할 수 있도록 지원합니다. [E2B API 키](https://e2b.dev/)가 필요합니다:

```auto
pip install "mcp-use[e2b]"

```

## 라이선스

MCP-Use 프로젝트는 [MIT 라이선스](https://github.com/mcp-use/mcp-use/blob/main/LICENSE)로 공개 및 배포 되고 있습니다. 상업적 이용에도 제약이 없습니다.

## 🏠 MCP-Use 홈페이지

> **[mcp-use | Build and Deploy MCP Agents, Servers & Apps](https://mcp-use.com/)**
>
> The ultimate open-source platform for Model Context Protocol (MCP). Build AI agents in 6 lines of code, deploy MCP servers, and create interactive apps for C...

## 📚 MCP-Use 공식 문서 사이트

> **[mcp-use - Connect Any LLM to Any MCP Server](https://mcp-use.com/docs/home)**
>
> mcp\_use is an open source library that enables developers to connect any LLM to any MCP server, allowing the creation of custom agents with tool access without relying on closed-source clients.

## :github: MCP-Use 프로젝트 GitHub 저장소

[https://github.com/mcp-use/mcp-use](https://github.com/mcp-use/mcp-use)

## 더 읽어보기

- [[Deep Research] Model Context Protocol(MCP) 개념 및 이해를 위한 학습 자료](https://discuss.pytorch.kr/t/deep-research-model-context-protocol-mcp/6594)

- [Anthropic, Claude와 연결 가능한 도구들을 모아둔 'Connectors Directory' 공개](https://discuss.pytorch.kr/t/anthropic-claude-connectors-directory/7267)

- [MCPJam Inspector: MCP Server의 시각적 디버깅을 위한 Web UI 기반 도구](https://discuss.pytorch.kr/t/mcpjam-inspector-mcp-server-web-ui/7215)

- [MCP-Scan: MCP Server 및 도구들의 보안 문제를 진단하는 CLI 도구 (feat. Invariant Labs)](https://discuss.pytorch.kr/t/mcp-scan-mcp-server-cli-feat-invariant-labs/6797)

- [MCP Link: OpenAPI v3 API를 MCP Server로 변환하는 도구](https://discuss.pytorch.kr/t/mcp-link-openapi-v3-api-mcp-server/6895)

- [MCP Agent: Model Context Protocol 기반의 AI 에이전트 프레임워크](https://discuss.pytorch.kr/t/mcp-agent-model-context-protocol-ai/6987)

* * *

_이 글은 GPT 모델로 정리한 글을 바탕으로 한 것으로, 원문의 내용 또는 의도와 다르게 정리된 내용이 있을 수 있습니다. 관심있는 내용이시라면 원문도 함께 참고해주세요! 읽으시면서 어색하거나 잘못된 내용을 발견하시면 덧글로 알려주시기를 부탁드립니다._ 🤗

[:pytorch:파이토치 한국 사용자 모임🇰🇷](https://pytorch.kr/)이 정리한 이 글이 유용하셨나요? [회원으로 가입](https://discuss.pytorch.kr/signup)하시면 주요 글들을 이메일💌로 보내드립니다! (기본은 Weekly지만 [Daily로 변경도 가능](https://discuss.pytorch.kr/my/preferences/emails)합니다.)

🎁 아래↘쪽에 좋아요👍를 눌러주시면 새로운 소식들을 정리하고 공유하는데 힘이 됩니다~ 🤩
