dotquant-mcp
v1.3.0
Published
MCP server exposing dotQuant OAP endpoints as tools for LLM clients (ChatGPT Desktop, Claude, Copilot)
Readme
dotQuant MCP Server
Exposes dotQuant's OAP command surface as MCP tools for LLM clients (ChatGPT Desktop, Claude Desktop, GitHub Copilot, Cursor).
OAP spec version: aligned with Open Agent Protocol v0.4.10
Tools
| Tool | What it does |
|---|---|
| get_command_catalogue | List all commands this tenant accepts (configure-broker, configure-indicator-alert, submit-signal, etc.) |
| get_command_schema | Fetch the full JSON Schema for a specific command type — learn the exact fields required |
| send_command | Send a command to dotQuant (CloudEvent). TenantId is injected automatically. |
Intended LLM flow: get_command_catalogue → pick a command → get_command_schema → gather required fields → send_command.
CloudEvent envelope notes
When sending a command, the MCP server builds a CloudEvent 1.0 envelope. Two fields require attention:
source— OAP v0.4.10 requires this to be a URI identifying the caller. However, dotQuant's backend uses this field as a message-queue routing key and requires the specific value"trading"for all commands. This is a known deviation from the spec. The required value is stated in the schemadescriptionreturned byget_command_schema— always read it from there and do not invent or default it.dataschema— Set to a relative URI in the form{schema}/{version}(e.g.configure-broker/1.0). It is relative to the tenant endpoint and must not be an absolute localhost or environment-specific URL.
Setup
1. Install and build
cd mcp-server
npm install
npm run build2. Get your API key and tenant ID
- Log in at dotquant.io
- Go to Account → API Keys to create or copy your API key
- Your tenant ID is in the URL:
dotquant.io/tenants/{tenantId}/...
Environment variables
| Variable | Required | Description |
|---|---|---|
| DOTQUANT_API_KEY | yes | Bearer API key for OAP endpoints |
| DOTQUANT_TENANT_ID | yes | Your tenant ID |
| DOTQUANT_BASE_URL | no | App base URL (default: https://dotquant.io) |
| MCP_TRANSPORT | no | stdio (default) or http |
| MCP_HTTP_PORT | no | HTTP port when MCP_TRANSPORT=http (default: 3000) |
Transport options
stdio — VS Code Copilot, Cursor, Claude Desktop
MCP_TRANSPORT defaults to stdio. Add to your client's MCP config (e.g. claude_desktop_config.json or VS Code settings.json):
{
"mcpServers": {
"dotquant": {
"command": "dotquant-mcp",
"args": [],
"env": {
"DOTQUANT_API_KEY": "<your-api-key>",
"DOTQUANT_TENANT_ID": "<your-tenant-id>"
}
}
}
}HTTP — ChatGPT Desktop
ChatGPT Desktop connects to MCP servers over HTTPS. Start the server in HTTP mode and expose it via a tunnel for local development:
# Start in HTTP mode
MCP_TRANSPORT=http MCP_HTTP_PORT=3001 \
DOTQUANT_API_KEY=<key> \
DOTQUANT_TENANT_ID=<tenantId> \
node dist/index.js
# Expose via ngrok (or Cloudflare Tunnel)
ngrok http 3001Then in ChatGPT Desktop: Settings → Apps & Connectors → Create
- Connector URL:
https://<your-ngrok-subdomain>.ngrok.app/mcp
In production, deploy the MCP server with a real cert and use the HTTPS URL directly.
Example prompts
- "What commands can I send to dotQuant?"
- "Configure a new IBKR broker account called 'Main Account'"
- "Set up an indicator alert on AAPL to buy 10 shares at market"
- "Submit a buy signal for ENI.BVME"
Development (local dotQuant instance)
# HTTP mode
MCP_TRANSPORT=http MCP_HTTP_PORT=3001 DOTQUANT_API_KEY=<key> DOTQUANT_TENANT_ID=<tenantId> DOTQUANT_BASE_URL=http://localhost:5173 npm run dev
# stdio mode
DOTQUANT_API_KEY=<key> DOTQUANT_TENANT_ID=<tenantId> DOTQUANT_BASE_URL=http://localhost:5173 npm run devPublishing to npm
The package is published as dotquant-mcp on the public npm registry.
Steps to publish a new version
Bump the version in
package.json:npm version patch # 1.0.0 → 1.0.1 (bug fixes) npm version minor # 1.0.0 → 1.1.0 (new features, backward-compatible) npm version major # 1.0.0 → 2.0.0 (breaking changes)This updates
package.jsonand creates a git tag automatically.Build the TypeScript output:
npm run buildFix any package.json issues (run once after each version bump — npm can auto-correct things like bin paths):
npm pkg fixLog in to npm (first time or if your token has expired):
npm loginPublish using your granular access token (bypasses 2FA):
npm publish --access public --//registry.npmjs.org/:_authToken=<your-token>To generate a token: npmjs.com → avatar → Access Tokens → Granular Access Token → enable "Allow publishing without 2FA" → set Read and write on
dotquant-mcp.Push the version tag to git:
git push && git push --tags
