nanocoder icon indicating copy to clipboard operation
nanocoder copied to clipboard

[Feature] MCP resources, prompts, and sampling support

Open addyCooks opened this issue 3 months ago • 1 comments

Description

The MCP client implements exactly two operations listTools and callTool. There is no listResources, readResource, listPrompts, getPrompt, createMessage (sampling), elicit, or listRoots anywhere in source/mcp/.

Use Case

docs/battlemap.md claims MCP client parity with Claude Code, but Claude Code additionally surfaces MCP resources as @-mentions and MCP prompts as slash commands. This is parity work on a claim already being made publicly, and it slots into infrastructure that already exists in this codebase.

Proposed Solution

Stage it in three phases:

  1. Resources (highest value, lowest risk) slot into the existing mention system the same way file mentions work today.
  2. Prompts slot into the lazy command registry (source/commands/lazy-registry.ts) the same way custom commands from .nanocoder/commands/ already do.
  3. Sampling, then elicitation and roots last, since those require the client to act as a server back toward the MCP host more design work, lower immediate payoff.

Alternatives Considered

Ship all four at once rejected in favor of staging so resources (the highest-value, most self-contained piece) land without blocking on the more involved sampling/elicitation design.

Additional Context

  • [x] I have searched existing issues to ensure this is not a duplicate
  • [x] This feature aligns with the project's goals (local-first AI assistance)

Implementation Notes (optional)

Resources phase touches the mention system and source/mcp/mcp-client.ts; prompts phase touches the command registry; keep sampling/elicitation/roots out of scope for the initial PR to keep it reviewable.

addyCooks avatar Sep 02 '26 19:09 addyCooks

Hi @akramcodez, could you assign this one to me ?

addyCooks avatar Sep 02 '26 19:09 addyCooks