This is a simple note-taking application built with FastAPI for the backend, PostgreSQL for persistent storage, and Redis for caching. The frontend is implemented using HTML, CSS, and JavaScript. The backend also supports Model Context Protocol (MCP) for LLM and tool integration.
- View, add, edit, and delete notes.
- Persistent storage using PostgreSQL.
- Caching with Redis for faster data retrieval.
- MCP server for LLM and tool integration (via fastapi_mcp).
Make sure you have the following installed on your system:
- Python 3.10 or higher
- PostgreSQL
- Redis
-
Clone the repository:
git clone <repository-url> cd note_taking_app2
-
Create a virtual environment and activate it:
python3 -m venv venv source venv/bin/activate -
Install the dependencies:
pip install -r requirements.txt
-
Set up the
.envfile: Create a.envfile in the root directory with the following content:DATABASE="your_database_name" USER="your_database_user" PASS="your_database_password" HOST="127.0.0.1"
-
Set up the PostgreSQL database:
- Create a database named
your_database_name. - Run the necessary SQL commands to create the
notetakertable.
- Create a database named
-
Start the Redis server:
redis-server
-
Start the FastAPI server:
uvicorn app:app --reload
-
Open your browser and navigate to:
http://127.0.0.1:8000 -
Access the API documentation at:
http://127.0.0.1:8000/docs -
(Optional) Use MCP tools:
- Ensure you have the VS Code MCP extension installed.
- The MCP server will be available at
http://127.0.0.1:8000/mcp. - You can interact with your app using LLMs and tool calls.
app.py: Backend logic for FastAPI and MCP integration.static/: Contains frontend files (index.html,styles.css,script.js,icon.png).README.md: Project documentation..env: Environment variables for database configuration.requirements.txt: Python dependencies.
This project is licensed under the MIT License.