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,
npxis usually a.cmdshim, socmd /cis important. - If you use WSL, use the macOS / Linux command inside WSL instead.
- If Claude Code already has an older
nanogptMCP entry, remove it and add it again. - An immediate
Invalid API keyerror 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.