Nocturne MCP
OfficialClick on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Nocturne MCP How has my mood been over the past two weeks?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Nocturne MCP
Read-only connector between Nocturne, the journaling app, and AI apps that support MCP: Claude Desktop, Claude Code, Cursor, Codex and others.
Connect your own Nocturne account, or try it first on a fictional demo journal with no account at all.
By default a connected app can see your mood timeline, the dates and mood labels of your entries, and the songs attached to them. It can't see what you wrote. Full entry text stays off unless you turn it on yourself. Every request, allowed or refused, is logged and shown back to you in Nocturne.
Guide: https://melomed.io/developers/nocturne
Requires Node.js 20 or newer.
Demo mode
No account and no network. The server serves a built-in fictional journal: Maya Chen, a made-up college sophomore, about 30 entries over the last 42 days, dated relative to when the server starts in your local time zone. Nothing is real and nothing leaves your computer.
Demo mode runs the same permission checks and output filtering as a real connection:
get_mood_timeline,list_entriesandlist_songswork. They never return what Maya wrote.get_entry_textis refused, the same way it is for a real connection that hasn't turned on full entry text. Start the server with--demo-rawto allow it.Every request, allowed or refused, goes into an in-memory access log.
get_connection_inforeturns it underaccessLog.
Claude Code:
claude mcp add nocturne-demo -s user -- npx -y nocturne-mcp --demoClaude Desktop (claude_desktop_config.json), Cursor (~/.cursor/mcp.json) and other apps that use mcpServers JSON:
{
"mcpServers": {
"nocturne-demo": { "command": "npx", "args": ["-y", "nocturne-mcp", "--demo"] }
}
}Codex (~/.codex/config.toml):
[mcp_servers.nocturne-demo]
command = "npx"
args = ["-y", "nocturne-mcp", "--demo"]Restart the app after editing its config. To allow full entry text, add "--demo-raw" after "--demo". Setting NOCTURNE_DEMO=1 also turns on demo mode.
The demo journal
Days before today | What happens |
24 to 21 | Stressed and anxious before a CHEM 201 midterm on day 21, relief after |
10 to 8 | A rough patch: missed tasks and a fight with her roommate |
3 to 2 | BIO 210 lab report due, finished a day late |
last 3 days | A little anxious, CHEM 201 exam 2 is 4 days from today |
Tuesdays, Thursdays, Sundays | Climbing nights and long runs, calmer and happier days |
The same student and dates are in the 2DooD demo (npx -y 2dood-mcp --demo), so you can line her tasks up against her moods.
Related MCP server: kilter-mcp
Your own journal
You need a Nocturne account (Apple, Google or email sign-in). Guest accounts can't connect apps.
1. Connect once
npx -y nocturne-mcp loginIn Nocturne, open Settings > Privacy & Security > Connected apps, create a connection, and paste the token it shows you. The token is shown once. It is saved to ~/.config/nocturne-mcp/session.json, readable only by you. Your Nocturne password and session are never stored.
If your account uses email and password you can skip the app:
npx -y nocturne-mcp login --emailOther commands:
npx -y nocturne-mcp whoami # this connection and what it can read
npx -y nocturne-mcp logout # turn the connection off and forget the tokenYou can also remove any connection from the app. It stops working on the next request.
2. Add it to your AI app
Claude Code:
claude mcp add nocturne -s user -- npx -y nocturne-mcpClaude Desktop, Cursor and other apps that use mcpServers JSON:
{
"mcpServers": {
"nocturne": { "command": "npx", "args": ["-y", "nocturne-mcp"] }
}
}Codex (~/.codex/config.toml):
[mcp_servers.nocturne]
command = "npx"
args = ["-y", "nocturne-mcp"]Restart the app after editing its config.
Tools
All tools are read-only. There are no write tools in this version.
Tool | Permission | What it returns |
|
| Per day or week: entry count, average valence and arousal, top emotion labels, and whether valence is rising, falling or steady |
|
| Entry ids, dates, times, mood label and numbers, whether songs or a drawing are attached. Never the text |
|
| The song picked for each entry and the songs Nocturne suggested, title and artist only |
|
| The full text and bullets of one entry. Off by default |
| none | Which permissions this connection has (in demo mode, also its access log) |
New connections get moods:read, entries:read and songs:read unless you change them. Never anything that reads what you wrote.
Full entry text
journals:read:raw is a separate permission. No other permission includes it, and a connection can't give it to itself.
In the app: Settings > Privacy & Security > Connected apps, pick the connection, turn on full entry text. This works for every account type.
Email accounts can also run
npx -y nocturne-mcp grant journals:read:rawthemselves in a terminal. It asks for your password again and refuses to run when nobody is at the keyboard, so an AI app with terminal access can't switch it on.
Turn it off any time, from the app or with:
npx -y nocturne-mcp revoke journals:read:rawReads of entry text are marked as elevated in your access log in the app.
Mood labels are automatic reads of the writing and can be wrong. Nocturne is a journaling app, not therapy, and the server tells AI apps not to treat moods as a diagnosis.
Privacy
The server runs on your computer and talks to the Nocturne API with a token that only works for your account and only for the permissions you chose. Nocturne checks those permissions on its server for every request, so changing this program can't widen them. What you share with an AI app is handled under that app's privacy policy.
Not shared, whatever the permissions: Health app (State of Mind) data, safety flags, themes extracted from your writing, and the reasons Nocturne gives for its song picks (they can quote your entry).
Develop
npm install
npm test # node --test, fake fetch and demo data, no network
npm run dev -- --demo # run from source on the demo journal
npm run build # one-file bundle in dist/Environment overrides: NOCTURNE_DEMO=1 (demo mode), NOCTURNE_API_URL, NOCTURNE_SUPABASE_URL and NOCTURNE_SUPABASE_ANON_KEY (publishable key, only for login --email), NOCTURNE_MCP_HOME (session folder), NOCTURNE_MCP_TOKEN (non-interactive login).
src/vendor/mcp-consent-audit/ is a copy of mcp-consent-audit (MIT), the consent and access log library the connector uses.
License
MIT. The Nocturne name is a trademark of MeloMed, Inc. and is not covered by the license.
Available Tools
5 toolsget_connection_infoConnection infoARead-only
Which permissions this Nocturne connection has, including whether full entry text is on. In demo mode it also returns the access log of this session.
Inputs: no named parameters.
get_entry_textRead entry textARead-only
Full text of one journal entry, by id from list_entries. OFF by default: works only if the person turned on full-text access for this connection. Every read is logged and shown to them. Only use it when the person asks about a specific entry.
Inputs: id (required).
get_mood_timelineMood timelineARead-only
Mood over a date range, grouped by day or week: number of entries, average valence and arousal, top emotion labels, and whether valence is rising, falling or steady. No journal text.
Inputs: to, from, bucket.
list_entriesList entriesARead-only
Journal entries in a date range, newest first: id, date, time, mood label, valence, arousal, and whether songs or a drawing are attached. Never returns entry text. Filter by a primary emotion label (for example "joy") if useful.
Inputs: to, from, limit, offset, +1 more.
list_songsList songsARead-only
Songs attached to entries in a date range: the song the person picked and the songs Nocturne suggested. Track name and artist only.
Inputs: to, from, limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct resource and action: aggregate mood stats, entry metadata, attached songs, single-entry text, and connection permissions. The boundary between list_entries (metadata only) and get_entry_text (full text, gated) is explicitly spelled out, so misselection is unlikely.
All five tools follow a clean verb_noun pattern (get_/list_ + resource). No mixed casing or vague verbs.
Five tools is well-scoped for a journaling/mood server, with each tool covering a distinct slice of the data. Nothing feels redundant or padded.
The surface is read-only: there is no way to create or update entries, log mood, or retrieve drawings even though drawings are mentioned as attachments. Some gaps may be intentional given the permission model, but agents cannot complete a full journaling lifecycle.
Maintenance
Related MCP Connectors
User-authorized access to a LuckMeAI life book, journal, memories, relationships, and charts.
Secure AI access to OpenOak tasks, notes, and Kanban boards.
Read-only glucose, meal and spike data the user chooses to share from Journey for Health.
Read-only access for your AI to Search Console, GA4, Google Ads, Meta Ads and your store's sales.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables read-only access to a Nightscout instance for glucose readings, treatments, and deterministic server-side aggregates, allowing users to discuss their diabetes data with an AI assistant without write permissions.1MIT
- AlicenseAqualityBmaintenanceEnables AI agents to read and analyze your Kilter Board logbook, including sessions, sends, projects, and grade progress, entirely read-only.925 PyPI2MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to read a member's own LinkedIn data — profile, connections, messages, posts, and other snapshot domains — through LinkedIn's Member Data Portability API. Access is strictly read-only, with search, pagination, and recent-activity changelog support.9MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to read and analyze consolidated financial data across banks, cards, payments, accounting, payroll, and equity sources. Provides tightly controlled, read-only access so AI can answer finance questions without moving money.2AGPL 3.0