Optare v1.0 is now available. Get started →
Deployment
MCP Server Deployment

Deploying Optare MCP Server

The Optare MCP Server supports two modes: Stdio (Local) and SSE (Remote).

1. Local Use (Stdio)

For local development with Claude Desktop or Cursor, you don't need to "host" the server. You run it directly.

Claude Desktop Config

{
  "mcpServers": {
    "optare": {
      "command": "npx",
      "args": ["-y", "@optare/mcp-server"],
      "env": {
        "OPTARE_API_KEY": "sk_..."
      }
    }
  }
}

2. Remote Hosting (SSE)

To allow remote agents (like a web-based IDE or a custom agent) to access Optare tools, deploy the server as a web service using the SSE transport.

Option A: Vercel (Monorepo Strategy)

Yes, you can host it alongside your main app in the same repository.

Strategy: Two Projects, One Repo Since Vercel deployments are based on a "Root Directory", you will create two separate Vercel projects connected to this same GitHub repository:

  1. Project 1: Main App

    • Root Directory: . (or apps/web)
    • Framework: Next.js / Remix
    • Domain: app.optare.one
  2. Project 2: MCP Server

    • Root Directory: packages/mcp-server
    • Framework: Other (Node.js)
    • Build Command: npm run build
    • Output Directory: dist
    • Environment Variables: OPTARE_API_KEY
    • Domain: mcp.optare.one

Why separate?

  • Scaling: You can scale the AI agent traffic independently of your user traffic.
  • Isolation: If the AI agent crashes the server (heavy load), your main app stays up.
  • Configuration: The MCP server uses Express/SSE, while your main app likely uses Next.js/Remix. Keeping them as separate deployments avoids framework conflicts.

Option B: Docker / Railway / Render

The server listens on PORT (default 3000) when running in SSE mode.

  1. Dockerfile:

    FROM node:18-alpine
    WORKDIR /app
    COPY . .
    RUN npm install
    RUN npm run build
    CMD ["node", "dist/index.js", "sse"]
  2. Deploy:

    • Push to your registry.
    • Run on Railway/Render.
    • Set OPTARE_API_KEY.

Connecting to Remote MCP

Your agent connects via SSE:

  • URL: https://your-deployment.com/sse