Skip to content

feat(elos): MCP server to connect ELOS to local agents (Hermes) - #21

Merged
eulogep merged 1 commit into
mainfrom
feat/hermes-mcp
Oct 23, 2026
Merged

eulogep merged 1 commit into
mainfrom
feat/hermes-mcp

Conversation

@eulogep

@eulogep eulogep commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • mcp/elos-server.ts: local stdio MCP server (official SDK 1.32.1, MIT) with 6 tools built on existing modules: grounded answers + Socratic mode, cited study packs, local English correction, oral roleplays, vocabulary, FSRS vs Leitner replay.
  • Privacy: no network; course files only from an explicit ELOS_SOURCES_DIR (synthetic demo otherwise); knowledge-private/, secrets and path traversal refused; tool descriptions state that results go to the agent model provider.
  • Hermes setup: docs/integrations/HERMES.md; npm run mcp:elos.

Test plan

  • Integration tests with a real MCP client (6/6): tool list, grounded answer with section citation, refusal outside sources, knowledge-private never read, path traversal rejected, demo mode
  • npm test 637/637, typecheck, eslint ., production build
  • Registered in local Hermes: hermes mcp test elos → connected, 6 tools

🤖 Generated with Claude Code

mcp/elos-server.ts (stdio, official MCP SDK 1.32.1) exposes six tools
built on the existing, tested modules: grounded answers with citations
(and Socratic mode), cited study packs (flashcards, quiz, sheet, audio
overview script, prerequisite paths), local English correction, oral
roleplays, Daily English vocabulary and FSRS vs Leitner replay.

Privacy: no network access; course files are read only from an
explicitly configured ELOS_SOURCES_DIR (synthetic demo documents
otherwise); knowledge-private/, secret files and paths outside the root
are refused; tool descriptions state that results go to the agent's
model provider. Integration tests drive the server with a real MCP
client. Setup for Hermes in docs/integrations/HERMES.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
daily-english-mission Ready Ready Preview Oct 23, 2026 5:04am UTC

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d70d4bef-d573-440e-baf2-ef8d9169eae7
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T05:06:39.882610Z ce15831 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@eulogep
eulogep merged commit a0c964a into main Oct 23, 2026
5 checks passed
@eulogep
eulogep deleted the feat/hermes-mcp branch October 23, 2026 05:06

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ce15831d19

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread mcp/elos-server.ts
Comment on lines +48 to +52
const full = path.join(dir, name);
if (FORBIDDEN.test(path.relative(root, full)) || name.startsWith(".")) continue;
const info = statSync(full);
if (info.isDirectory()) walk(full);
else if (/\.(pdf|md|markdown|txt)$/i.test(name) && info.size <= MAX_FILE_BYTES) out.push(full);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Resolve symlinks before admitting source files

When the configured source tree contains an innocently named symlink to an external directory or file, statSync follows it and the lexical path.relative check still treats the entry as internal; subsequent tool calls can therefore read and send outside or knowledge-private content to the model provider. Reject symlinks with lstatSync, or compare each entry's canonical realpath against the canonical source root before traversing or reading it.

AGENTS.md reference: AGENTS.md:L11-L14

Useful? React with 👍 / 👎.

Comment thread mcp/elos-server.ts
Comment on lines +132 to +136
if (kind === "audio_overview") return json(buildAudioOverview(documents).segments.map((segment) => ({ kind: segment.kind, text: segment.text, pauseAfterMs: segment.pauseAfterMs })));
const relations = derivePrerequisites(cards);
return json(cards.map((card) => remediationPath(card.term, cards, relations))
.filter((pathItem) => pathItem.prerequisites.length || pathItem.confusedWith.length).slice(0, limit)
.map((pathItem) => ({ notion: pathItem.term, reviewFirst: pathItem.prerequisites.map((step) => step.term), confusedWith: pathItem.confusedWith })));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve citations in every study-pack branch

For kind: "audio_overview" and kind: "prerequisites", the response serialization drops all provenance even though the tool contract promises that every item is cited. Audio segments already expose an optional citation, and prerequisite relations carry citations internally, but callers receive only text or notion names, so these two advertised study-pack formats cannot be traced back to the course sources.

Useful? React with 👍 / 👎.

This branch was successfully deployed

1 active deployment
Preview — ce15831d Deployed Oct 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant