MCP Notepad Server
A learning-focused MCP server that demonstrates core MCP concepts through a simple notepad application, enabling users to create, update, delete, and search notes while exploring tools, resources, and prompts functionality.
README
MCP 메모장 서버 - 학습용 예제
MCP(Model Context Protocol)의 핵심 기능을 학습하기 위한 간단한 메모장 서버입니다.
📚 학습 목표
이 예제를 통해 다음을 배울 수 있습니다:
| 기능 | 설명 | 파일 |
|---|---|---|
| Tools | AI가 실행할 수 있는 액션 정의 | src/tools/noteTools.ts |
| Resources | AI가 읽을 수 있는 데이터 제공 | src/resources/noteResources.ts |
| Prompts | 재사용 가능한 프롬프트 템플릿 | src/prompts/notePrompts.ts |
🚀 빠른 시작
1. 의존성 설치
cd mcp-notes-server
npm install
2. 빌드
npm run build
3. Claude Desktop에 등록
~/Library/Application Support/Claude/claude_desktop_config.json 파일에 추가:
{
"mcpServers": {
"mcp-notes": {
"command": "node",
"args": ["/절대경로/mcp-notes-server/dist/index.js"]
}
}
}
4. Claude Desktop 재시작
📦 제공 기능
Tools (도구)
| 도구명 | 설명 | 입력 |
|---|---|---|
create_note |
새 메모 생성 | title, content, tags? |
update_note |
메모 수정 | id, title?, content?, tags? |
delete_note |
메모 삭제 | id |
search_notes |
메모 검색 | keyword |
Resources (리소스)
| URI | 설명 |
|---|---|
notes://list |
전체 메모 목록 |
notes://note/{id} |
특정 메모 조회 |
Prompts (프롬프트)
| 이름 | 설명 | 인자 |
|---|---|---|
summarize_note |
메모 요약 | noteId, style? |
extract_tags |
태그 추출 | noteId, maxTags? |
organize_notes |
정리 제안 | - |
🗂 프로젝트 구조
mcp-notes-server/
├── src/
│ ├── index.ts # 진입점, 서버 설정
│ ├── store/
│ │ └── noteStore.ts # 인메모리 메모 저장소
│ ├── tools/
│ │ └── noteTools.ts # Tool 정의 및 핸들러
│ ├── resources/
│ │ └── noteResources.ts # Resource 정의 및 핸들러
│ └── prompts/
│ └── notePrompts.ts # Prompt 정의 및 핸들러
├── package.json
└── tsconfig.json
💡 핵심 개념 정리
1. Tool
// 정의
{
name: "create_note",
description: "새 메모 생성",
inputSchema: {
type: "object",
properties: {
title: { type: "string" },
content: { type: "string" }
},
required: ["title", "content"]
}
}
// 핸들러
server.setRequestHandler(CallToolRequestSchema, async (request) => {
// 도구 실행 로직
});
2. Resource
// 정의
{
uri: "notes://list",
name: "메모 목록",
mimeType: "application/json"
}
// 핸들러
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
// 리소스 읽기 로직
});
3. Prompt
// 정의
{
name: "summarize_note",
description: "메모 요약",
arguments: [
{ name: "noteId", required: true }
]
}
// 핸들러
server.setRequestHandler(GetPromptRequestSchema, async (request) => {
return {
messages: [
{ role: "user", content: { type: "text", text: "..." } }
]
};
});
🔧 개발 팁
디버깅
stderr로 로그 출력 (stdout은 MCP 통신에 사용):
console.error("[Debug] 메시지");
감시 모드 개발
npm run dev # tsc --watch
📖 다음 단계
- 파일 영속화:
noteStore.ts를 수정하여 JSON 파일로 저장 - 추가 리소스: 태그별, 날짜별 필터링 추가
- SSE 전송: HTTP 기반 전송으로 변경해보기
📚 참고 자료
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。