My First MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@My First MCP calculate 15 * 3 + 7"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
my-first-mcp
MCP(Model Context Protocol) 서버 개발 튜토리얼 - 첫 번째 MCP 서버
소개
이 프로젝트는 MCP(Model Context Protocol) 서버 개발을 배우기 위한 튜토리얼입니다. Claude Code와 같은 AI 도구에서 사용할 수 있는 간단한 MCP 서버를 구현합니다.
제공 Tool
Tool | 설명 | 사용 예시 |
| 현재 시간 조회 | "지금 몇 시야?" |
| 사칙연산 계산기 | "123 + 456 계산해줘" |
| 랜덤 숫자 생성 | "로또 번호 뽑아줘" |
| 문자열 뒤집기 | "hello 뒤집어줘" |
| 서버 정보 조회 | "MCP 서버 정보" |
| 프로젝트 구조 분석 | "프로젝트 구조 보여줘" |
| 의존성 분석 | "package.json 분석해줘" |
| 코드 라인 수 통계 | "코드 라인 수 알려줘" |
| 서버 상태 조회 | "서버 상태 확인해줘" |
Related MCP server: My First MCP
스크린샷
Claude Code에서 Tool 실행

"123 더하기 456 계산해줘" → calculate Tool 실행 → "123 + 456 = 579 입니다"
MCP 서버 자동 감지

.mcp.json파일로 프로젝트 진입 시 자동 감지
MCP Inspector UI

MCP Inspector로 서버 테스트 및 디버깅
MCP Inspector Tool 목록

5개 Tool (get_current_time, calculate, get_random_number, reverse_string, get_server_info)
설치
요구사항
Node.js 20+
npm 또는 pnpm
설치 방법
# 저장소 클론
git clone https://github.com/dh1789/my-first-mcp.git
cd my-first-mcp
# 의존성 설치
npm install
# 빌드
npm run build사용법
Claude Code에 연결
# MCP 서버 등록
claude mcp add my-first-mcp -- node /path/to/my-first-mcp/dist/index.js
# 연결 확인
claude mcp listMCP Inspector로 테스트
npm run inspect
# 브라우저에서 http://localhost:6274 접속직접 실행
npm start개발
프로젝트 구조
my-first-mcp/
├── src/
│ ├── index.ts # MCP 서버 진입점
│ ├── tools.ts # Day 1: 기본 Tool 로직
│ ├── resources.ts # Day 2: Resource 로직
│ ├── prompts.ts # Day 2: Prompt 로직
│ ├── project-analyzer.ts # Day 3: 프로젝트 분석기
│ ├── advanced.ts # Day 5: 고급 패턴 (캐싱, 보안, 로깅)
│ └── *.test.ts # 유닛 테스트
├── dist/ # 빌드 결과물
├── package.json
├── tsconfig.json
└── vitest.config.ts스크립트
npm run build # TypeScript 빌드
npm test # 유닛 테스트 실행 (31 tests)
npm run test:watch # 테스트 watch 모드
npm run inspect # MCP Inspector 실행
npm start # 서버 실행테스트
TDD 방식으로 120개 유닛 테스트가 포함되어 있습니다:
npm test
# 결과
# ✓ src/tools.test.ts (31 tests)
# ✓ src/resources.test.ts (11 tests)
# ✓ src/prompts.test.ts (13 tests)
# ✓ src/project-analyzer.test.ts (18 tests)
# ✓ src/advanced.test.ts (30 tests)
# ✓ src/package-config.test.ts (14 tests)
# ✓ src/shebang.test.ts (3 tests)
# Test Files 7 passed (7)
# Tests 120 passed (120)기술 스택
Runtime: Node.js 20+
Language: TypeScript 5.7
MCP SDK: @modelcontextprotocol/sdk
Validation: zod
Testing: vitest
관련 문서
라이선스
MIT License - 자유롭게 사용, 수정, 배포할 수 있습니다.
기여
이슈와 PR을 환영합니다!
Fork
Feature branch 생성 (
git checkout -b feature/amazing-feature)Commit (
git commit -m 'Add amazing feature')Push (
git push origin feature/amazing-feature)Pull Request 생성
작성자
idongho - GitHub
Available Tools
9 toolsanalyze_dependenciesC
프로젝트의 package.json을 분석하여 의존성 정보를 제공합니다.
Inputs: path (required), includeDevDeps.
analyze_structureC
프로젝트 디렉토리 구조를 분석하여 트리 형태로 보여줍니다.
Inputs: path (required), maxDepth, showHidden.
calculateC
두 숫자의 사칙연산(덧셈, 뺄셈, 곱셈, 나눗셈)을 수행합니다.
Inputs: a (required), b (required), operation (required).
count_linesC
프로젝트의 코드 라인 수를 분석합니다 (코드/주석/빈줄 분류).
Inputs: path (required), extensions.
get_current_timeB
현재 날짜와 시간을 반환합니다. 시간대를 지정할 수 있습니다.
Inputs: timezone, format.
get_random_numberC
지정한 범위 내에서 랜덤 정수를 생성합니다.
Inputs: min (required), max (required), count.
get_server_infoB
이 MCP 서버의 정보와 사용 가능한 Tool 목록을 반환합니다.
Inputs: no named parameters.
reverse_stringB
입력된 문자열을 뒤집어서 반환합니다.
Inputs: text (required).
server_statusB
MCP 서버 상태를 확인합니다 (uptime, 메모리 사용량 등).
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Most tools have distinct purposes (e.g., analyze_dependencies vs. count_lines), but some overlap exists: get_server_info and server_status both relate to server monitoring, which could cause confusion. The descriptions help differentiate them, but the boundaries are not entirely clear.
The naming follows a consistent verb_noun pattern throughout (e.g., analyze_dependencies, calculate, get_current_time), with only minor deviations like 'server_status' using a noun_verb style. This consistency makes the tools readable and predictable.
With 9 tools, the count is reasonable, but the scope is broad and unfocused, mixing project analysis, basic utilities, and server monitoring. This makes it borderline as the tools don't form a cohesive set for a specific domain, feeling somewhat heavy for a general-purpose server.
The server lacks a clear domain, making completeness hard to assess. For project analysis, there are gaps (e.g., no update or delete operations for dependencies or structure). As a utility toolkit, it's incomplete with random tools like calculate and reverse_string that don't integrate well, leading to potential agent failures.
Related MCP Connectors
MCP server with 5 offline developer tools: UUID, timestamp, unit conversion, JSON tools and QR code.
MCP server for skill documentation, generated by doc2mcp.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA basic educational MCP server that provides simple tools for mathematical calculations, text manipulation, and time retrieval. Designed for learning MCP implementation patterns and development purposes.-
- AlicenseNot gradedqualityDmaintenanceA simple tutorial MCP server that provides a basic addition tool for adding two numbers together, demonstrating fundamental MCP server implementation.10 npmISC
- AlicenseNot gradedqualityDmaintenanceA simple MCP server that provides a calculator tool for basic arithmetic operations.7 npmMIT
- FlicenseNot gradedqualityDmaintenanceA learning-purpose MCP server providing tools for arithmetic calculation, current time retrieval, and text analysis.-