SpaceTraders Agent
timothymcmackin/claude-agent-spacetraders
Automatize SpaceTraders.io com Claude Code Agent SDK
Ver no GitHubAgent Claude que automatiza sua conta no SpaceTraders.io via chat. Interpreta comandos em linguagem natural e executa operações diretas na API ou escreve scripts Node.js para automações complexas. Inclui interface web local com persistência de dados.
Instalação
npx convez-ai timothymcmackin/claude-agent-spacetraders1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Automação de operações repetitivas no jogo SpaceTraders
- Execução de comandos em linguagem natural contra APIs de jogos
- Geração automática de scripts de automação via IA
Veredito

Prototipo bem estruturado do Claude Code Agent SDK com persistência de dados e streaming SSE. Útil como referência de integração agent + API externa, mas limitado ao contexto específico de um jogo web.
README
A tradução para o português deste README ainda está na fila.
SpaceTraders Agent
A Claude Code-powered chat UI for automating your SpaceTraders.io account. Type natural-language commands; Claude calls SpaceTraders API tools directly or writes Node.js automation scripts.
Prerequisites
Setup
You need two API keys — one for Anthropic, one for SpaceTraders.
Anthropic API key — from console.anthropic.com.
SpaceTraders account token — this authorizes agent registration:
- Go to https://my.spacetraders.io and sign in (or create a free account).
- Copy your account token from your account settings.
Add both to .env:
ANTHROPIC_API_KEY=sk-ant-...
SPACETRADERS_TOKEN=<your account token>
On first launch the app will show a registration form. Enter an agent name, click Register Agent, and the app will register the agent using your account token and save the returned agent token for the session.
Starting the app
To start the app, add the Anthropic API key that the app will use to call the Claude Code Agent SDK to the .env file along with your SpaceTraders account token.
Then, run the startup command:
docker compose up --build
Commands
First run (builds the Docker image)
docker compose up --build
Subsequent starts
docker compose up
Stop (credentials are preserved)
# Ctrl-C to stop, then:
docker compose down
Reset saved account data
⚠️ This destroys your saved SpaceTraders token. You will need to re-register.
docker compose down -v
Force-rebuild the image (e.g. to update Claude Code CLI)
docker compose build --no-cache
docker compose up
Usage
Open http://localhost:3000 in your browser.
- Use the quick-action buttons for common commands
- Type anything in the input to give Claude a command
- Claude will call SpaceTraders API tools directly for simple operations, and write/run Node.js scripts for complex automation
Data persistence
| What | Where | Persists? |
|---|---|---|
| SpaceTraders token & agent info | agent-data Docker volume (/data/config.json) | Yes — survives restarts |
| Scripts written by Claude | ./workspace/ (local folder in this repo) | Yes — browse in Finder or any editor |
| Conversation history | In-memory (InMemorySessionStore) | No — resets on restart |
Scripts in ./workspace/ are stored directly on your Mac — open them in any editor or Finder even when the container is stopped. They persist across docker compose down / docker compose up cycles and are only lost if you manually delete the folder.
The agent-data volume (SpaceTraders token) is still a Docker named volume and is only deleted with docker compose down -v, which also requires re-registration.
Architecture
src/server.js— Express server with Server-Sent Events streamingsrc/agent.js— Claude Agent SDK integration with in-process MCP toolssrc/spacetraders-api.js— Rate-limited SpaceTraders API client (1 req/sec)public/— Single-page chat UI