-
Install Bun to run TypeScript code:
curl -fsSL https://bun.sh/install | bash -
Install dependencies to get required packages:
bun install bun add @modelcontextprotocol/server-filesystem
-
Create directories to enable file operations and logs:
mkdir -p assets downloads logging -
Get a Groq API key to access free LLM inference: Register for a free trial account at console.groq.com and copy your API key
-
Create
.envfile: Copy.env.exampleto.envand add at least one LLM API key (and any other keys you need). -
Configure
mcp-config.jsonto choose your LLM provider:- Copy
mcp-config.example.jsontomcp-config.json. - Under
"providers", setremoteAgent.modelIdto a Groq model (for exampleopenai/gpt-oss-20b) andlocalAgent.modelIdto an installed Ollama model (for examplegpt-oss:20b). - Use the
"models"arrays on each provider to list all available model IDs you want to select from in the app. - Set
"agentProvider": "remoteAgent"or"localAgent"to pick which provider is used by default; you can still switch provider and model from within the host.
- Copy
-
(Optional) Pick a different remote LLM provider if you already have access to one:
- Browse the AI SDK provider catalog to find a compatible provider and note the install instructions.
- Update
agents/remote-agent.tsso themodelfield uses that provider's SDK export instead of Groq (for exampleopenai(this.config.modelId)after importing{ openai } from "@ai-sdk/openai"). - Set
providers.remoteAgent.modelIdinmcp-config.jsonto a model offered by that provider.
-
(Optional) Install Ollama to run local LLMs:
# Install: brew install ollama (macOS) or visit ollama.com ollama serve # Start service ollama pull gpt-oss:20b # Pull this model (preferably) ollama pull llama3.1:8b # Pull this model (if limited with hardware)
-
Run the application to start the agent:
bun run host.ts --local assets downloads --remote /
Use
--localfor allowed filesystem directories and--remotefor allowed uplink (CDN) directories. If you also pass a--prompt "your question"argument, the host will run in single-run (oneshot) mode: it will answer once and then exit. Without--prompt, it stays in interactive chat mode until you type/bye.
- Missing API key errors: Check your
.envfile has the required keys - Ollama connection failed: Run
ollama servein a separate terminal - Permission errors: Run
chmod -R 755 assets downloads - MCP server errors: Test with
bunx @modelcontextprotocol/server-filesystem assets