Skip to main content
Glama

Python Local MCP Server

by Alec2435

python_local MCP 서버

대화형 Python REPL(Read-Eval-Print Loop) 환경을 제공하는 MCP 서버입니다.

구성 요소

자원

서버는 REPL 세션 기록에 대한 액세스를 제공합니다.

  • 세션 기록에 액세스하기 위한 사용자 정의 repl:// URI 체계
  • 각 세션의 기록은 텍스트/일반 리소스로 볼 수 있습니다.
  • 기록은 각 실행에 대한 입력 코드와 해당 출력을 보여줍니다.

도구

서버는 하나의 도구를 구현합니다.

  • python_repl : 영구 세션에서 Python 코드를 실행합니다.
    • 필요한 인수로 code (실행할 Python 코드)와 session_id 사용합니다.
    • 각 세션에 대해 별도의 상태를 유지합니다.
    • 표현식과 문장을 모두 지원합니다
    • stdout/stderr 출력을 캡처하여 반환합니다.

구성

설치하다

클로드 데스크탑

MacOS의 경우: ~/Library/Application\ Support/Claude/claude_desktop_config.json Windows의 경우: %APPDATA%/Claude/claude_desktop_config.json

개발

건축 및 출판

배포를 위해 패키지를 준비하려면:

  1. 종속성 동기화 및 잠금 파일 업데이트:

지엑스피1

  1. 패키지 배포 빌드:
uv build

이렇게 하면 dist/ 디렉토리에 소스와 휠 배포판이 생성됩니다.

  1. PyPI에 게시:
uv publish

참고: 환경 변수나 명령 플래그를 통해 PyPI 자격 증명을 설정해야 합니다.

  • 토큰: --token 또는 UV_PUBLISH_TOKEN
  • 또는 사용자 이름/비밀번호: --username / UV_PUBLISH_USERNAME--password / UV_PUBLISH_PASSWORD

디버깅

MCP 서버는 stdio를 통해 실행되므로 디버깅이 어려울 수 있습니다. 최상의 디버깅 환경을 위해서는 MCP Inspector 사용을 강력히 권장합니다.

다음 명령을 사용하여 npm 통해 MCP Inspector를 시작할 수 있습니다.

npx @modelcontextprotocol/inspector uv --directory /path/to/python_local run python-local

Inspector를 실행하면 브라우저에서 접근하여 디버깅을 시작할 수 있는 URL이 표시됩니다.

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

사용자가 Python 코드를 실행하고 세션 기록에 액세스할 수 있도록 지속적인 세션 상태를 유지하는 대화형 Python REPL 환경을 제공합니다.

  1. 구성 요소
    1. 자원
    2. 도구
  2. 구성
    1. 설치하다
  3. 개발
    1. 건축 및 출판
    2. 디버깅

Related MCP Servers

  • -
    security
    A
    license
    -
    quality
    A Model Context Protocol server that allows execution of Python code within Daytona workspaces, providing a secure and isolated environment for executing and managing Python scripts.
    Last updated -
    1
    14
    Python
    Apache 2.0
    • Apple
  • -
    security
    F
    license
    -
    quality
    This is an MCP server that facilitates building tools for interacting with various APIs and workflows, supporting Python-based development with potential for customizable prompts and user configurations.
    Last updated -
    Python
  • A
    security
    A
    license
    A
    quality
    A server that provides a persistent Python REPL environment through the MCP protocol, allowing execution of Python code, variable management, and package installation.
    Last updated -
    3
    3
    Python
    MIT License
  • A
    security
    F
    license
    A
    quality
    A Python server implementing the Model Context Protocol to provide customizable prompt templates, resources, and tools that enhance LLM interactions in the continue.dev environment.
    Last updated -
    2
    1
    Python

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/Alec2435/python_mcp'

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