Skip to content

[MCP] Self-sufficient nushell for remote AI coding sessions #17160

@andrewgazelka

Description

@andrewgazelka

Vision

Make nushell MCP fully self-sufficient so that AI coding assistants (like Claude Code) can operate entirely through nushell — no separate file tools needed.

Current State

Today, Claude Code uses nushell MCP for shell evaluation but still relies on its own built-in tools for:

  • Reading files (Read tool)
  • Writing files (Write tool)
  • Editing files (Edit tool)
  • Searching (Glob, Grep tools)

Goal

Nushell already has all these capabilities natively:

  • open / save for file I/O
  • str replace for editing
  • glob / ls **/* for finding files
  • Built-in string manipulation

If we expose the right primitives and optimize for AI agent usage, nushell MCP could be the only tool an AI needs.

Why This Matters: Remote Sessions

The killer feature: SSH-based remote coding.

If everything goes through nushell MCP over stdio:

  1. SSH to a remote machine
  2. Start nu --mcp
  3. Connect Claude Code to that stdio stream
  4. Everything works remotely — file reads, writes, searches, all over the network

No need for separate file sync, no sshfs, no remote VS Code servers. Just nushell.

Potential Enhancements

  1. Transport options — Currently only stdio, could add streamable HTTP (rmcp already supports transport-streamable-http-server)
  2. Optimized file operations — Perhaps dedicated MCP tools for common patterns (read file with line numbers, atomic edit, etc.)
  3. Session state — The $history variable (feat(mcp): add $history variable and structured response format #17132) is a good start for maintaining context

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions