exsitec/sticky-note-mcp
If you are the rightful owner of sticky-note-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Sticky-Note-MCP server allows agents to attach sticky notes to the context, enhancing future interactions and performance.
sticky-note-mcp
An MCP server built with the FastMCP Python package that lets agents persist sticky notes and surface them when the current session matches predefined context.
Features
create_sticky_note(message, context_regex, note_id?)persists notes in JSONL format and returns every snippet from the active session whose text matches the supplied regex (returned as plain strings).read_relevant_sticky_notes()scans the active session history and, for each unseen note whose regex matches, returns{"message", "trigger_snippets"}once per session.- Pluggable session history provider architecture selected through an environment variable (defaults to
codex). - Codex implementation reads rollout
.jsonlhistory files and normalises content items, reasoning traces, and important events. - GitHub Copilot implementation reads chat history from VS Code workspace storage and supports tool call matching.
Configuration
Environment variables accepted by the server:
MCP_AGENT_FRAMEWORK– selects which session history provider to use (codexorcopilot; default:codex).STICKY_NOTES_DIR– directory where thesticky_notes.jsonlfile is created (default:<repo>/data/sticky_notes).SESSION_HISTORY_DIR– directory containing agent session histories.- For Codex: default is
<repo>/data/history. - For Copilot: optional; if omitted, the server attempts to auto-discover chat sessions in standard VS Code workspace storage locations.
- For Codex: default is
Using with GitHub Copilot
-
Configure the MCP Server in VS Code: Add the server to your VS Code User Settings (
settings.json) undermcp.servers(requires the MCP extension) or via the specific MCP configuration file you are using."mcp.servers": { "sticky-note": { "command": "python3", "args": [ "-m", "server.main" ], "cwd": "/absolute/path/to/sticky-note-mcp", "env": { "MCP_AGENT_FRAMEWORK": "copilot", "STICKY_NOTES_DIR": "/absolute/path/to/sticky-note-mcp/data/sticky_notes" } } }Note: Ensure
python3is in your path or provide the absolute path to the python executable. -
Usage:
- The server will automatically scan your VS Code workspace storage for the most recent Copilot chat session.
- You can use
create_sticky_noteto attach notes to specific keywords or tool calls (e.g., "create a note whencreate_sticky_noteis called").
Using with Codex
-
Install the server’s runtime dependency (once per Python environment):
pip install fastmcp -
Edit your Codex configuration at
~/.codex/config.tomland add an entry undermcp_serversthat launches the server, for example:[mcp_servers.sticky_note] command = "/Users/<username>/.pyenv/shims/python" args = ["-m", "server.main"] cwd = "/path/to/sticky-note-mcp" [mcp_servers.sticky_note.env] SESSION_HISTORY_DIR = "/Users/<username>/.codex/sessions" STICKY_NOTES_DIR = "/Users/<username>/.codex/sticky-notes"- To discover your Python path, run
which python(orpyenv which python) and drop that intocommand. - Set
cwdto the directory containing this repository so relative imports and data paths resolve correctly. - Point
SESSION_HISTORY_DIRat the history store you want the server to read; inside Codex this should be~/.codex/sessions, but you can substitute another directory if you maintain histories elsewhere. - Use
STICKY_NOTES_DIRto choose where sticky notes are persisted (defaults to<repo>/data/sticky_notes; in the example we store them under~/.codex/sticky-notes).
- To discover your Python path, run
-
Restart Codex (or run
codex mcp list) so it picks up the new MCP server. The sticky-note tools—mcp__sticky_note__create_sticky_noteandmcp__sticky_note__read_relevant_sticky_notes—will appear in the tool palette.
Tests
Run the automated tests with pytest:
pip install -r requirements-dev.txt # if you capture dependencies separately
pytest
The test suite covers sticky note persistence, session tracking, and history parsing for both Codex and Copilot.