Nano GPT logo
NanoGPT

Private AI

Back to Blog

NanoGPT MCP: Use NanoGPT inside Claude Code and Cursor

Feb 2, 2026
NanoGPT MCP: Use NanoGPT inside Claude Code and Cursor

NanoGPT now supports the Model Context Protocol (MCP) via the NanoGPT MCP server.

If you want to use NanoGPT directly from tools like Claude Code or Cursor, MCP is the simplest way to connect your editor/agent to NanoGPT tools like chat, web search, image generation, URL scraping, and YouTube transcripts.

Quick links

  • Main landing page: /mcp
  • Full documentation: https://docs.nano-gpt.com/integrations/mcp

What is NanoGPT MCP?

NanoGPT MCP is an MCP server that runs locally and exposes a set of tools your MCP client can call. Your MCP client (Claude Code, Cursor, etc.) connects to the server and uses your NanoGPT API key to make requests.

How to set it up

Follow the official setup guide here:

https://docs.nano-gpt.com/integrations/mcp

For Claude Code, use the current claude mcp add ... -- command args form.

Claude Code quick start

macOS / Linux:

claude mcp add nanogpt --scope user \
  --env NANOGPT_API_KEY=your_actual_key_here \
  -- npx -y @nanogpt/mcp

Windows:

claude mcp add nanogpt --scope user --env NANOGPT_API_KEY=your_actual_key_here -- cmd /c "C:\Program Files\nodejs\npx.cmd" -y @nanogpt/mcp

Notes:

  • On native Windows, npx is usually a .cmd shim, so cmd /c is important.
  • If you use WSL, use the macOS / Linux command inside WSL instead.
  • If Claude Code already has an older nanogpt MCP entry, remove it and add it again.
  • An immediate Invalid API key error can be caused by a bad MCP launch command, not just a bad key.

That guide includes:

  • How to add the server to Claude Code
  • Required environment variables (NANOGPT_API_KEY)
  • Tool list (chat, web search, image generation, etc.)

Why this matters

If you search for "NanoGPT MCP" and don’t see great results yet, this page is intended to be a clear, crawlable entry point on the main NanoGPT domain, with direct links to the canonical documentation.

Milan de Reede

Milan de Reede

CEO & Co-Founder

milan@nano-gpt.com

Related articles

Continue with more NanoGPT guides and research on this topic.

The Cheapest Way to Use Claude in 2026

Compare every way to access Claude models — Claude Pro, API direct, and NanoGPT. See real costs per conversation and find the cheapest option for your usage level.

Mar 15, 2026

Claude Opus 4.6 is now available on NanoGPT — with thinking and adaptive effort

Anthropic's newest flagship model brings a 1M token context window, adaptive thinking with configurable effort levels, and best-in-class coding and reasoning. Available now on NanoGPT with prompt caching.

Feb 5, 2026

Building AI Automations with the Right Model and Tool

A practical guide to combining NanoGPT models with web search, memory, MCP, scrapers, and application tools for useful AI automations.

May 7, 2026

Use NanoGPT Image Models in OpenAI-Compatible Clients

Connect OpenAI-compatible image clients and SDKs to NanoGPT for image generation, editing, live model discovery, and clearer capability information.

Jul 16, 2026
Back to Blog