Skip to main content
Glama
ugundhar

MCP Server Basic Example

by ugundhar

MCP 서버 기본 예제

이는 도구와 리소스를 포함한 핵심 기능을 보여주는 MCP(모델 컨텍스트 프로토콜) 서버 구현의 기본적인 예입니다.

설정 단계

  1. 프로젝트를 초기화합니다(로컬 폴더로 이동하여 PowerShell이나 cmd를 실행합니다):

지엑스피1

  1. 가상 환경을 생성하고 활성화하세요

  uv venv
  .venv\Scripts\activate
  1. 종속성 설치:

uv add "mcp[cli]"

또는

uv add -r requirements.txt

Related MCP server: MCP Server Basic Example

특징

서버는 다음과 같은 기능을 구현합니다.

도구

  • add(a: int, b: int) : 두 숫자를 더합니다.

  • subtract(a: int, b: int) : 첫 번째 숫자에서 두 번째 숫자를 뺍니다.

자원

  • greeting://{name} : 개인화된 인사말을 반환합니다.

서버 실행

개발을 위해 MCP Inspector로 서버를 실행하려면:

uv run mcp dev main.py

서버를 정상적으로 실행하려면:

uv run mcp run

Claude 데스크톱 앱에 서버를 설치하려면:

uv run mcp install main.py

VS 코드에서 MCP 연결

  • vs 코드에서 폴더/mcp-server-basic 열기

  • 터미널을 열고 아래 명령을 실행하세요.

uv run main.py
  • vs 코드에서 채팅을 시작하려면 Cntrl+Shift+I를 클릭하세요.

  • Github에 로그인하고 설정하세요

  • 아래 단계를 따르세요(VS 코드 사용자 설정에 MCP 구성을 추가하는 두 가지 방법):

#mcp에서 안녕하세요

F
license - not found
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    A simple implementation of a Model Context Protocol server that demonstrates core functionality including mathematical tools (add, subtract) and personalized greeting resources.
    93
    GPL 3.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    A basic implementation of a Model Context Protocol server that demonstrates core functionality with simple math tools (add, subtract) and greeting resources for AI assistants like Claude.
    GPL 3.0
  • F
    license
    Not graded
    quality
    D
    maintenance
    A demonstration implementation of a Model Context Protocol server that provides simple mathematical tools (add, subtract) and personalized greeting resources.
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that provides basic tools for arithmetic operations (addition) and dynamic greeting resources, demonstrating MCP integration patterns for other projects and clients.
    23
    ISC

View all related MCP servers

Related MCP Connectors

  • A Model Context Protocol server for Wix AI tools

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • MCP Spec Compliance MCP — audits any MCP server.json against the official Model Context Protocol

View all MCP Connectors

Latest Blog Posts

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/ugundhar/mcp-server'

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