Deploying Optare MCP Server
The Optare MCP (Model Context Protocol) Server allows AI agents (like Claude or custom agents) to interact with the Optare platform. It supports two modes: Stdio (Local) and SSE (Remote).
1. Local Use (Stdio)
Stdio stands for Standard Input/Output. In this mode, the AI agent (like Claude Desktop) runs your server script directly on your computer and communicates with it via the terminal pipes, rather than over the internet. This is the fastest and most secure way to use MCP locally.
For local development with Claude Desktop or Cursor, you don't need to "host" the server. You run it directly.
Claude Desktop Config
Add this to your Claude Desktop configuration file:
{
"mcpServers": {
"optare": {
"command": "npx",
"args": ["-y", "@optare/mcp-server"],
"env": {
"OPTARE_API_KEY": "sk_..."
}
}
}
}2. Remote Hosting (SSE)
To allow remote agents to access Optare tools, you can deploy the MCP server as a web service.
Option A: Docker (Recommended)
Create a Dockerfile to run the server:
FROM node:18-alpine
RUN npm install -g @optare/mcp-server
CMD ["npx", "@optare/mcp-server", "sse"]Deploy:
- Deploy this Dockerfile to any provider (Railway, Render, Fly.io).
- Set the
OPTARE_API_KEYenvironment variable. - Expose the port (default: 3000).
Option B: Node.js Project
-
Initialize a project:
mkdir my-mcp-server && cd my-mcp-server npm init -y npm install @optare/mcp-server -
Create an entry script (
index.js):import { run } from '@optare/mcp-server'; run('sse'); -
Deploy:
- Deploy to Vercel, Heroku, or any Node.js host.
- Set
OPTARE_API_KEY.
Connecting to Remote MCP
Your agent connects via SSE:
- URL:
https://your-deployment.com/sse