Two env vars and a JSON block
The server is a single stdio process — point your client at it, give it the API base and optionally a key, and the tools appear.
Updated
Install
npx -y @vectr/mcp # nothing to clone, nothing to buildThe server is published as @vectr/mcp on npm, so you never install it by hand: your client runs the npx command below and it fetches the package on first run, then reuses the cached copy. Node 18+ is the only requirement — no daemon, no port, the client spawns the process and talks to it over stdio. The source is at git.vectr.bot/vectr/mcp if you would rather build it and point the client at dist/index.js yourself.
Environment
- VECTR_API_URL
- Backend base URL — defaults to https://api.vectr.bot; point it at a dev backend to test
- VECTR_API_KEY
- Your vectr_ key — required only for the vectr_agent tool
- ~/.vectr/config.json
- Fallback for each value on its own: an environment variable wins, then this file (the one the CLI writes on vectr login, so one login serves both), then the default
Claude Desktop
{
"mcpServers": {
"vectr": {
"command": "npx",
"args": ["-y", "@vectr/mcp"],
"env": {
"VECTR_API_URL": "https://api.vectr.bot",
"VECTR_API_KEY": "vectr_…"
}
}
}
}Claude Code
claude mcp add vectr -e VECTR_API_KEY=vectr_… -- npx -y @vectr/mcpCursor
// ~/.cursor/mcp.json (every project) or .cursor/mcp.json (this project only)
{
"mcpServers": {
"vectr": {
"command": "npx",
"args": ["-y", "@vectr/mcp"],
"env": { "VECTR_API_KEY": "vectr_…" }
}
}
}Other clients take the same command, args and env block under their own MCP config key. Restart the client after saving — tools are listed at startup, and the server logs one line to stderr (vectr-mcp ready) that most clients show in their MCP log.
What works without a key
The four read tools — vectr_get_price, vectr_get_tokens, vectr_search_token, vectr_get_token — call public endpoints and work with no key at all. Only vectr_agent needs VECTR_API_KEY, because jobs are scoped to a wallet.
What the server can and cannot do
Through the API, MCP server or CLI, an agent job returns the unsigned transaction and stops there: nothing is signed or broadcast until you submit it yourself. The four read tools cannot move anything at all.
The key lives in the client, not in chat
Put the key in the MCP config env block — never paste it into a conversation. The server reads it at startup; the model never sees it, and every request goes out over the one connection the process owns.
Update and uninstall
- Newest release
- "args": ["-y", "@vectr/mcp@latest"]Restart the client after changing it; tools are read at startup
- Hold a version
- "args": ["-y", "@vectr/mcp@1.0.0"]Pin the release you tested against
- Remove from Claude Code
- claude mcp remove vectr
- Remove elsewhere
- Delete the vectr block from the client's MCP config and restartNothing runs once no client starts it; npx only keeps a cached copy
- Credentials
- ~/.vectr/config.jsonShared with the CLI: delete it if you use neither, and revoke the key on your profile
Troubleshooting
| You see | Cause | Fix |
|---|---|---|
| The server never appears in the client | npx is not on the client's PATH, or the first fetch failed offline | Run npx -y @vectr/mcp once in a terminal to prime the cache, then restart the client |
| npm error 404 @vectr/mcp | An old config still points at a local build, or a private registry is configured | Use "command": "npx", "args": ["-y", "@vectr/mcp"], and check npm config get registry |
| vectr_agent needs an API key. Set VECTR_API_KEY… | No key in the env block or ~/.vectr/config.json | Add VECTR_API_KEY to the env block, or run vectr login --key with the CLI |
| Agent job failed: 401 Unauthorized: …Invalid or revoked API key | The key is mistyped or was revoked | Create a new key on your profile and restart the client |
| …403…is not in this key's allowlist | The key has an IP allowlist and this machine is not on it | Allowlists are set when a key is created: make a new key for this machine |
| Could not fetch price from <url>: fetch failed | VECTR_API_URL points at a backend that is down or wrong | Remove VECTR_API_URL to use https://api.vectr.bot |
| Job <id> is still processing after 180s | The agent turn took longer than the tool waits | Poll GET /agent/job/<id> later; the job keeps running |
| …is not available to a read-only API key | The prompt asked for an order or auto top-up | Use a read-write key, or create the order in the Terminal |
- The server never appears in the client
- Cause
- npx is not on the client's PATH, or the first fetch failed offline
- Fix
- Run npx -y @vectr/mcp once in a terminal to prime the cache, then restart the client
- npm error 404 @vectr/mcp
- Cause
- An old config still points at a local build, or a private registry is configured
- Fix
- Use "command": "npx", "args": ["-y", "@vectr/mcp"], and check npm config get registry
- vectr_agent needs an API key. Set VECTR_API_KEY…
- Cause
- No key in the env block or ~/.vectr/config.json
- Fix
- Add VECTR_API_KEY to the env block, or run vectr login --key with the CLI
- Agent job failed: 401 Unauthorized: …Invalid or revoked API key
- Cause
- The key is mistyped or was revoked
- Fix
- Create a new key on your profile and restart the client
- …403…is not in this key's allowlist
- Cause
- The key has an IP allowlist and this machine is not on it
- Fix
- Allowlists are set when a key is created: make a new key for this machine
- Could not fetch price from <url>: fetch failed
- Cause
- VECTR_API_URL points at a backend that is down or wrong
- Fix
- Remove VECTR_API_URL to use https://api.vectr.bot
- Job <id> is still processing after 180s
- Cause
- The agent turn took longer than the tool waits
- Fix
- Poll GET /agent/job/<id> later; the job keeps running
- …is not available to a read-only API key
- Cause
- The prompt asked for an order or auto top-up
- Fix
- Use a read-write key, or create the order in the Terminal
Node 18 or newer is required. The server logs one line to stderr when it starts; if that line says no key: vectr_agent disabled, the key did not reach the process.