Sponsored by Deepsite.site

gpt.nu

创建者
cableheada year ago
a Nushell cross.stream extension to interact with LLMs and MCP servers
内容

gpt.nu

gpt.nu is a Nushell module that enables direct interaction with large language models (LLMs) from your command line. It provides a simple interface supporting multiple LLM providers and the Model Context Protocol (MCP).

With gpt.nu, you can:

  • Chat with AI models using one consistent API. Current providers (it's easy to add more)
    • gemini + search
    • anthropic + search
  • Maintain conversation context across sessions. In addition to storing the conversation, cross.stream makes it convenient to review and manually edit conversation threads, giving you direct control over the context window.
  • Integrate with MCP servers to extend tool capabilities: while rough at the edges, gpt.nu is already as capable as claude code for local file editing, but it's provider agnostic and a lot more flexible.

Built on cross.stream for event processing, gpt.nu brings modern AI capabilities directly into your Nushell workflow, without leaving the terminal.

Usage

First install and configure cross.stream: https://cablehead.github.io/xs/getting-started/installation/

overlay use -pr ./gpt

gpt init

Installs the required dependencies into your cross.stream store, and prompts you to select an LLM provider, an API key, and a model.

gpt

Makes a request to the LLM provider.

gpt thread

Review the current conversation thread.

gpt mcp

Model Context Protocol (MCP) servers are really just CLI tools that read from stdin and write to stdout.

cross.stream generators spawn CLI tools and package each line of output into event frames (.recv) while routing frames ending in .send as input, turning them into services you can interactively poke at.

gpt mcp leverages this approach to provide a hands-on environment for experimenting with and understanding MCP servers.

Features

  • Spawn an MCP server as a cross.stream generator
  • List available tools on the server.

Spawn an MCP Server

Register your MCP server:

# gpt mcp register <name> <command>
gpt mcp register filesystem 'npx -y "@modelcontextprotocol/server-filesystem" "/project/path"'

List Available Tools

List the tools provided by the MCP server:

gpt mcp tools list filesystem
──#──┬───────────name────────────┬─────────────────────────────────────────────────────────────────────────description─────────────────────────────────────────────────────────────────────────┬─...─
 0   │ read_file                 │ Read the complete contents of a file from the file system. Handles various text encodings and provides detailed error messages if the file cannot be read.  │ ...
     │                           │ Use this tool when you need to examine the contents of a single file. Only works within allowed directories.                                                │
 1   │ read_multiple_files       │ Read the contents of multiple files simultaneously. This is more efficient than reading files one by one when you need to analyze or compare multiple files │ ...
     │                           │ . Each file's content is returned with its path as a reference. Failed reads for individual files won't stop the entire operation. Only works within allowe │
     │                           │ d directories.
 ...
推荐的 MCP Server
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
CursorThe AI Code Editor
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
Amap Maps高德地图官方 MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
DeepChatYour AI Partner on Desktop
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Serper MCP ServerA Serper MCP Server
WindsurfThe new purpose-built IDE to harness magic
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Playwright McpPlaywright MCP server
Tavily Mcp
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
ChatWiseThe second fastest AI chatbot™
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"