@smartalex/mcp-server npm package runs a SmartAlex MCP server on your own machine. It talks to your AI app over stdio and signs in to SmartAlex with your API key. It suits a setup that already has a key or needs a local server.
In SmartAlex, owners and admins create the key under Settings → Webhooks & API. Create key or Open in the API keys panel opens the API keys tab.
This is the older local package. It needs an API key, which owners and admins can create as a read-only key in Settings → Webhooks & API. Most people should connect to
https://mcp.getsmartalex.com by signing in instead. See Getting started.How do I install it?
No global install needed. Your AI client runs the package vianpx:
- Node.js 18 or later
- A SmartAlex API key (owners and admins create a read-only key in Settings → Webhooks & API)
What API key does it need?
The package reads its key from theSMARTALEX_API_KEY environment variable. Keys start with:
sa_live_, production datasa_test_, staging/test data
How do I set it up in my AI app?
Claude Desktop
Add SmartAlex to your Claude Desktop configuration file.- macOS
- Windows
- Linux
Edit
~/Library/Application Support/Claude/claude_desktop_config.json:Claude Code
smartalex listed with its 28 tools.
Cursor
Add to.cursor/mcp.json in your project root (project-level) or ~/.cursor/mcp.json (global):
- macOS / Linux
- Windows
Developer: Reload Window.
VS Code (GitHub Copilot)
Add to.vscode/mcp.json in your project.
- macOS / Linux
- Windows
Windsurf
Add to your Windsurf MCP configuration.Gemini CLI
Add to~/.gemini/settings.json, your Gemini CLI settings file.
/mcp to connect.
How do I configure it?
Which environment variables does it use?
The API key is the only configuration needed. The server automatically connects to SmartAlex’s production API gateway.
How do I pin a version?
To pin a version, which is recommended for production automations.How do I update it?
To update, run this.@smartalex/mcp-server (without npx) as the command in your config:
What does the package include?
The npm package has its own 28 tools, 7 resources, and 5 prompts.
These are not the same tools as the hosted connection, which has more than 100. The Tools reference documents the hosted connection. Some tools listed there are not in this package.
How does it work?
- Your AI client spawns the MCP server as a local process
- Communication happens over stdio (stdin/stdout)
- The server authenticates to SmartAlex’s API using your API key
- All data stays within your SmartAlex workspace, workspace isolation is enforced server-side
What if it does not work?
”Authentication failed” or 401 errors
- Verify your key starts with
sa_live_orsa_test_ - Check the key hasn’t expired or been revoked
- Confirm the environment variable is set:
Tools not appearing
- Restart your AI client completely after config changes
- Claude Desktop: Fully quit (not just close window) and reopen
- Cursor: Command palette >
Developer: Reload Window - Claude Code: Run
/mcpto check server status
First run is slow
The firstnpx @smartalex/mcp-server downloads the package and its dependencies. Later runs use the npx cache and start much faster.
Windows: “npx is not recognized”
Ensure Node.js is installed and in your PATH:Windows: spawn errors
Windows requires thecmd /c wrapper. See the Windows tab in the setup section above.
How is it different from the hosted connection?
When to use local: You already have an API key. Or your organization requires local tool execution, you want to pin a specific version, or your AI client only supports stdio transport.
When to use the hosted connection: In almost every case. No setup, automatic updates, every tool, and you sign in instead of using an API key. Set up the hosted connection.
Questions people ask
Should I use the npm package or the hosted connection?
Should I use the npm package or the hosted connection?
Almost everyone should use the hosted connection, where you sign in instead of using an API key and get every tool the server offers. Use the npm package only if you already have an API key, need a local stdio server, or want to pin a version.
How many tools does the npm package have?
How many tools does the npm package have?
It has its own 28 tools, 7 resources and 5 prompts. These are not the same as the hosted connection, which has more than 100 tools. Some tools in the Tools reference are not in this package.
What API key does it need?
What API key does it need?
A SmartAlex API key in the
SMARTALEX_API_KEY environment variable. Owners and admins create a read-only key in Settings under Webhooks & API. Never commit the key or share it.Why does it fail on Windows?
Why does it fail on Windows?
Windows needs the
cmd /c wrapper as the command, with the -y flag so npx accepts its install prompt. Also check that Node.js 18 or later is installed and on your PATH.How do I pin or update the version?
How do I pin or update the version?
Add the version to the package name in your config, for example
@smartalex/mcp-server@0.5.0, to pin it. To update, run npx with @latest, or install the package globally with npm.Related
Get started
Connect with a sign-in instead of a key.
Tools reference
Reference for the hosted connection’s tools.
Usage examples
Real workflows and conversation examples.
Error reference
Error codes and troubleshooting.

