Note App MCP Server
MCP server for a JWT-authenticated note-taking API, exposing CRUD tools for notes.
README
Note App — FastAPI + MCP Demo
A simple JWT-authenticated note-taking API built with FastAPI, backed by SQLite via SQLAlchemy, and exposed as MCP tools for agents using fastapi-mcp.
Requirements
- Python 3.13+
- Node.js (only needed to run the MCP Inspector via
npx)
Setup
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Create a .env file in the project root (see src/environment.py for the full list of settings):
USERNAME=admin
PASSWORD=changeme
JWT_SECRET=some-long-random-secret
JWT_EXPIRATION_MINUTES=60 # optional, defaults to 60
Running the server
python server.py
This starts uvicorn on http://0.0.0.0:8000, serving src.app:app.
- Swagger UI: http://localhost:8000/docs
- The root URL
/redirects to/docs
Authentication
Get an access token:
curl -X POST http://localhost:8000/auth/login \
-H "Content-Type: application/json" \
-d '{"username": "admin", "password": "changeme"}'
Use the returned access_token as a Bearer token on all /notes endpoints:
curl http://localhost:8000/notes/ \
-H "Authorization: Bearer <access_token>"
Notes API
| Method | Path | Description |
|---|---|---|
| GET | /notes/ |
List notes |
| GET | /notes/{id} |
Get a note |
| POST | /notes/ |
Create a note |
| PUT | /notes/{id} |
Update a note |
| DELETE | /notes/{id} |
Delete a note |
Using the MCP server
The app mounts an MCP server at /mcp, exposing every endpoint tagged Note as an MCP tool. Requests require the same Bearer token as the REST API, forwarded via the authorization header.
Inspecting it with MCP Inspector
- Start the server:
python server.py - In a separate terminal, launch the inspector:
npx @modelcontextprotocol/inspector - In the inspector UI, set:
- Transport: Streamable HTTP
- URL:
http://127.0.0.1:8000/mcp - Header:
Authorization: Bearer <access_token>(obtained from/auth/login)
- Click Connect, go to the Tools tab, and click List Tools to see
list_notes,get_note,create_note,update_note,delete_note. - Select a tool, fill in parameters, and click Run Tool to test it.
Connecting from an MCP client (e.g. Claude Desktop)
Since the server requires auth headers, use mcp-remote as a bridge:
{
"mcpServers": {
"note-app": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8000/mcp",
"--header",
"Authorization:${AUTH_HEADER}"
],
"env": {
"AUTH_HEADER": "Bearer <access_token>"
}
}
}
}
Project structure
server.py # entrypoint (uvicorn runner)
src/
app.py # FastAPI app + MCP mount
environment.py # settings loaded from .env
modules/
auth/ # login route, JWT issuing/verification
note/ # notes CRUD (model, schema, service, route)
sqlalchemy/ # base model + engine/session setup
Dev tooling
Config files are included for:
ruff check . # linting (ruff.toml)
mypy . # type checking (mypy.ini)
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.