笔记测试应用

用于测试MCP集成的简单笔记应用,包含FastAPI后端和Next.js前端。

  • by codingaddo
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 codingaddo/mcp-testing-notes-app

使用说明

MCP测试笔记应用程序

用于测试MCP集成的简单Notes应用程序的后端和前端。

后端(FastAPI)

后端使用FastAPI和SQLite实现。

设置

我们使用 紫外线 管理Python环境和依赖关系。

uv sync

运行后端服务器

uv run uvicorn app.main:app --reload

API将于 http://localhost:8000.

运行后端测试

uv run pytest

注释API

基础路径: http://localhost:8000/api/v1/notes

  • POST /api/v1/notes/ –创建注释。主体: { "content": "your note" } (最多500个字符,修剪后不为空)。
  • GET /api/v1/notes/ –按顺序列出注释 created_at 下降。
  • DELETE /api/v1/notes/{note_id} –按ID删除注释。如果找不到,则返回404。

前端(Next.js+TypeScript)

前端生活在 frontend/ 目录,并使用Next.js、TypeScript和Tailwind CSS构建。

快速开始

cd frontend
npm install
npm run dev

前端将在 http://localhost:3000 并期望后端在 http://localhost:8000.

前端测试

cd frontend
npm test

有关更多详细信息,请参阅 前端/README.md.