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 MCPHow 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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds genuinely non-obvious behavior beyond that: the response is mode-dependent — in demo mode it also returns this session's access log. What's still missing is any hint about what the permission set looks like or how failures behave, but for a zero-parameter read tool this is solid added context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no filler, with the core capability front-loaded and the conditional demo-mode behavior second. The opening clause is slightly awkwardly phrased as a noun phrase rather than a verb phrase, which is the only structural weakness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and no parameters, the description carries the return-value burden and does reasonably well: it says the result covers permissions, the full-entry-text flag, and demo-mode access log. It could go one step further by noting the shape or that the call always succeeds, but an agent has enough to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero input parameters, so the baseline is 4. The description correctly adds nothing about arguments and instead spends its words on what the response contains, which is the right allocation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific resource — the permissions of this Nocturne connection — plus the notable field 'whether full entry text is on', which no sibling tool covers (siblings list entries, songs, timelines, entry text). It lacks an explicit verb, but the noun phrase is unambiguous enough that an agent can tell it apart from list_entries or get_entry_text.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied: an agent can infer this is the tool to call to check capabilities (e.g. whether full entry text is available) before or after fetching content. There is no explicit when-to-use statement, no exclusions, and no mention of alternatives, so the routing guidance is left to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the readOnlyHint, the description discloses behavior the agent could not otherwise know: the tool is disabled by default, depends on a person-enabled full-text access setting, and every read is logged and surfaced to the user. That privacy/audit context is exactly the kind of thing that should change agent behavior before calling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences, front-loaded with what the tool returns, then the gating condition, then the usage restriction. No filler and nothing redundant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter read tool with no output schema, the description covers purpose, opt-in gating, audit logging, and usage restriction. An agent has everything needed to decide whether to call it and how to obtain the id.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the lone 'id' parameter has no description, only a UUID pattern. The description compensates by explaining the id's provenance ('from list_entries'), which is the main thing an agent needs to supply a valid value; it stops short of describing the failure mode for malformed or unknown ids.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb and resource ('Full text of one journal entry') and ties it to the sibling that produces its input ('by id from list_entries'), so it is immediately distinguishable from list_entries and the other siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives an explicit selection rule ('Only use it when the person asks about a specific entry') and points to list_entries as the source of ids, which implicitly excludes bulk/listing use. It does not spell out fallback behavior when the person asks about an entry without having opted in, but the guidance is otherwise clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End date, inclusive. Default: today. Ranges are limited to 366 days. | |
| from | No | Start date, inclusive. Default: 29 days before `to`. | |
| bucket | No | day |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations cover only readOnlyHint and openWorldHint, so the description carries the burden of describing output shape, which it does well: the aggregation fields and the rising/falling/steady trend are disclosed up front, and the explicit exclusion of journal text is a meaningful privacy signal. It stops short of stating anything about the 366-day window or behavior on empty ranges, but the schema covers the range limit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One compact sentence front-loads the resource and scope, then lists return fields in a scannable order, closing with the exclusion. No filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, so the description must describe return values — and it does so field by field, including the derived trend signal. Combined with the schema's date-range constraints and defaults, an agent has everything needed to call this correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 67%: from and to are fully documented with defaults and the 366-day limit, while bucket has only an enum and default. The description's 'grouped by day or week' explains what the bucket choice produces, but that largely restates the enum values rather than adding new meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific resource (mood) with a specific scope (date range, bucketed by day or week) and enumerates exactly what is returned: entry counts, average valence/arousal, top emotion labels, and trend direction. The closing 'No journal text' draws a hard line against text-fetching siblings such as get_entry_text.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'No journal text' implicitly routes text-seeking requests elsewhere, but no sibling is named and there is no explicit statement of when to prefer this over list_entries or get_entry_text. Usage is inferable rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End date, inclusive. Default: today. Ranges are limited to 366 days. | |
| from | No | Start date, inclusive. Default: 29 days before `to`. | |
| limit | No | Default 50. | |
| offset | No | ||
| emotion | No | Only entries whose primary emotion is this label. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations only declare readOnlyHint and openWorldHint, so the description must carry the return-shape burden, and it does: field list, newest-first ordering, and a privacy constraint that text is never returned. It doesn't discuss pagination behavior or what an empty range yields, which is a minor gap for a list tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the resource and scope, then the return fields, then the optional filter. No filler and nothing buried.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With five optional parameters and no output schema, the description appropriately covers what comes back and in what order, which is the key unknown. It could be slightly more complete by noting default window or pagination implications, but the schema handles those defaults.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 80%, so the schema already documents from/to (with defaults and the 366-day cap), limit, offset, and the emotion filter. The description only restates the emotion filter's meaning and supplies one label example, adding little beyond the structured field.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific resource (journal entries), scope (date range), ordering (newest first), and enumerates the returned fields. The line "Never returns entry text" implicitly routes the agent to get_entry_text, so it is distinguishable from its siblings without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives clear context for the common case and suggests the optional emotion filter with a concrete example ("joy"). It stops short of naming alternatives explicitly (e.g. get_mood_timeline for trend questions, get_entry_text for content), so exclusions are only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End date, inclusive. Default: today. Ranges are limited to 366 days. | |
| from | No | Start date, inclusive. Default: 29 days before `to`. | |
| limit | No | Entries, default 50. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already establish readOnlyHint and openWorldHint=false, so the safety profile is covered. The description adds genuinely useful scope information ('the song the person picked and the songs Nocturne suggested', 'Track name and artist only'), which tells the agent the result is a shallow projection rather than full song records. It doesn't mention ordering, pagination behavior, or what happens when an entry has no songs.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One sentence with a colon that front-loads the resource and scope, followed by what is returned. Every clause carries information and nothing is repeated from the schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the 'track name and artist only' note and the picked-vs-suggested distinction are exactly the return-value context an agent needs. Minor omissions are result ordering and behavior for entries without songs, which are low impact for a read-only list tool with fully documented parameters.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, with formats, defaults, the 366-day cap, and the 200 limit already documented in the schema. The description only echoes the notion of a date range and adds no syntax or edge-case guidance beyond the schema, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb and resource ('Songs attached to entries in a date range') and clarifies the data source: the picked song plus Nocturne's suggestions. This is clearly distinguishable from list_entries and get_mood_timeline, though it never names a sibling explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the date-range framing — call this when songs within a period are needed — but there is no explicit when-to-use, when-not-to-use, or pointer to alternatives such as list_entries if the caller actually wants entry text.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.2.1- First observed
get_connection_info - First observed
get_entry_text - First observed
get_mood_timeline - First observed
list_entries - First observed
list_songs
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.
Let your AI agent read and search your Dayora journal, Dayora's replies and moods, and add entries
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.
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.935 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