my-mcp-server
my-mcp-server
TypeScript로 MCP (Model Context Protocol) 서버를 구축하기 위한 플레이그라운드 및 실험 프로젝트입니다. stdio 전송을 통해 AI 에이전트와 언어 모델에 도구와 리소스를 노출하는 방법을 보여줍니다.
이 서버는 간단한 사용자 데이터베이스(로컬 JSON 파일 기반)를 관리하며, AI 에이전트가 호출하여 사용자 레코드를 읽거나 생성할 수 있는 엔드포인트를 노출합니다.
기능
도구 —
my-create-tool:name,address,email,phone필드를 받아 새 사용자를 생성하고 레코드를src/users.json에 저장합니다.리소스 —
users://all: 목업 데이터베이스의 전체 사용자 목록을 JSON으로 반환합니다.리소스 —
users://{userId}/profile:userId로 식별되는 단일 사용자의 프로필을 반환합니다.
Related MCP server: FastMCP Example Server
사전 요구 사항
설치
npm install서버 실행
개발 모드 (tsx 사용, 빌드 단계 없음)
npm run server:dev빌드 및 컴파일된 출력 실행
npm run server:build # compiles TypeScript → JavaScript
node dist/server.js # run the compiled server감시 모드 (변경 시 자동 재컴파일)
npm run server:build:watchMCP Inspector UI로 검사
MCP Inspector를 사용하면 브라우저 UI에서 도구를 대화형으로 호출하고 리소스를 탐색할 수 있습니다:
npm run server:inspect참고:
server:inspect는DANGEROUSLY_OMIT_AUTH=true를 설정합니다 — 로컬 개발에서만 사용하세요.
에이전트 환경에서 MCP 서버 로드
에이전트 CLI (예: Claude Code CLI)
.mcp.json 파일이 존재하면 에이전트가 이를 자동으로 감지하고 서버 로드를 요청합니다. 그렇지 않은 경우, 다른 서버와 함께 구성에 추가해야 하는 간단한 MCP 서버 구성입니다.
프로젝트 구조
my-mcp-server/
├── src/
│ ├── server.ts # MCP server entry point (tools & resources)
│ └── users.json # Mock user database (read/written at runtime)
├── package.json
└── tsconfig.json기술 스택
패키지 | 역할 |
| MCP 서버 SDK (도구, 리소스, stdio 전송) |
| 도구 입력 스키마 검증 |
| 빌드 단계 없이 TypeScript 직접 실행 |
| TypeScript 컴파일러 |
| 브라우저 기반 MCP 디버그 UI |
라이선스
ISC
This server cannot be deployed
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
- UnifAPIOAuthcom.unifapi
Hosted MCP server for live public-data APIs and Skills for AI agents.
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server exposing the Backtest360 engine API as tools for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA lightweight MCP server that connects a local AI model (Ollama) with custom CRUD tools for an in-memory database, enabling natural language database management.-
- FlicenseNot gradedqualityDmaintenanceEducational example of an MCP server built with FastMCP, demonstrating how to expose tools, resources, and prompts for AI clients.-
- FlicenseNot gradedqualityDmaintenanceExample MCP server built with FastMCP, demonstrating tools, resources, and prompts for AI integration.13-
- FlicenseNot gradedqualityDmaintenanceA demonstrative MCP server that exposes a query-user tool for retrieving user info by ID, integrated with LangChain for agent-driven model reasoning and tool calls.-