Get the FREE Ultimate OpenClaw Setup Guide →

daydreams

Daydreams is a set of tools for building agents for commerce

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio daydreamsai-daydreams node ./dist/server.js \
  --env MCP_HOST="localhost or host for MCP server" \
  --env MCP_PORT="3000 or port for MCP server"

How to use

Daydreams provides a composable context framework for building TS agents and includes built-in MCP integration to connect to external tools and services. This MCP integration lets your agent call external tools or services exposed as MCP servers (e.g., filesystem, database, web scrapers, or custom toolchains) via the standard MCP protocol. You can attach MCP extensions to your Daydreams agent so actions can call mcp.listResources, mcp.callTool, and other MCP actions to discover resources and execute tools across different servers. The README demonstrates creating MCP extensions with stdio transports, often using npx to spawn MCP servers, and then calling those tools from within agent actions. This enables capabilities like file system access, database queries, web scraping, or any tool you expose through MCP, all accessible in a type-safe and composable manner from your agent logic.

How to install

Prerequisites:

  • Node.js 14+ (or the version required by Daydreams)
  • npm or yarn
  • A local MCP environment if you plan to run multiple MCP servers

Install steps:

  1. Clone the Daydreams repository or scaffold your project git clone https://github.com/daydreamsai/daydreams.git cd daydreams

  2. Install dependencies npm install

  3. Build or prepare the MCP-enabled server if applicable npm run build

  4. Start the MCP-enabled Daydreams server npm run start

  5. (Optional) Run additional MCP servers or tools via npx as shown in the MCP examples in the README npx @modelcontextprotocol/server-filesystem ./docs

  6. Verify the MCP server is reachable (default port 3000 unless configured differently) curl http://localhost:3000/health

Additional notes

Tips:

  • When configuring MCP, you can attach multiple servers (e.g., filesystem, database) and call them from actions using ctx.callAction('mcp.callTool', ...).
  • The MCP transport in the Daydreams README uses stdio with commands like "npx @modelcontextprotocol/server-filesystem ./docs". You can replicate this pattern to connect any MCP server.
  • Environment variables like MCP_HOST and MCP_PORT can be useful for deploying to different environments (dev/stage/prod).
  • If you encounter transport errors, ensure the MCP server binaries are installed and accessible in PATH, and that the port/host are not blocked by firewalls.
  • For persistent operation, consider exposing MCP servers behind a reverse proxy or orchestrator and use stable hostnames rather than localhost.

Related MCP Servers

Sponsor this space

Reach thousands of developers