tradeos-mcp

tradeos-mcp

Connects TradeOS trading intelligence to MCP-compatible AI tools, enabling natural language-driven market analysis, ticker search, spread comparison, macro context, and custom trading agent management.

Category
访问服务器

README

tradeos-mcp

TradeOS MCP lets you connect TradeOS trading intelligence to MCP-compatible AI tools, so your assistant can analyze markets, search tickers, compare spreads, use macro context, and manage custom trading agents directly from natural-language prompts.

Overview

This repo publishes @tradeos/tradeos-mcp on npm: a stdio MCP bridge that proxies tools to TradeOS Streamable HTTP (mcp-call). You can connect in two ways:

Mode Best for Auth
HTTP (recommended) Cursor, Claude Code, most MCP clients Browser OAuth in the client
npm stdio Clients that only support command / stdio TRADEOS_ACCESS_TOKEN env var

Production endpoint (both modes ultimately call this):

https://ai.tradeos.xyz/api/agent/mcp/mcp-call

Product docs: TradeOS MCP integration & usage


Prerequisites

  • Node.js 18+
  • A TradeOS account with MCP API access
  • For npm stdio: ability to run a local install (see Windows notes)

Option A — HTTP (recommended)

No npm install. The client handles OAuth.

Cursor

Edit user config ~/.cursor/mcp.json (Windows: %USERPROFILE%\.cursor\mcp.json):

{
  "mcpServers": {
    "tradeos": {
      "url": "https://ai.tradeos.xyz/api/agent/mcp/mcp-call"
    }
  }
}

Save, restart Cursor (or refresh MCP in Settings → MCP), then complete OAuth when prompted.

Claude Code (plugin — recommended)

Use the bundled plugin in tradeos-skills/:

claude --plugin-dir ./tradeos-skills

Then complete OAuth and run /tradeos:analyze. Full plugin workflow (validate, community marketplace submit): tradeos-skills/README.md — aligned with Claude plugin docs.


Option B — npm stdio bridge

Use when your client requires a local process (command + stdio).

1. Install locally

Do not rely on npx inside MCP on Windows (cache/path issues). Install once to a fixed directory:

mkdir -p ~/tradeos-mcp-run   # Windows: mkdir %USERPROFILE%\Downloads\tradeos-mcp-run
cd ~/tradeos-mcp-run         # Windows: cd %USERPROFILE%\Downloads\tradeos-mcp-run
npm install @tradeos/tradeos-mcp

Pin a version if you prefer, e.g. @tradeos/tradeos-mcp@1.0.0.

2. Get TRADEOS_ACCESS_TOKEN

Run the OAuth helper (opens browser → log in on TradeOS → prints token):

# Linux / macOS
npx -y -p @tradeos/tradeos-mcp tradeos-mcp-oauth

# Or subcommand on main bin:
npx -y @tradeos/tradeos-mcp oauth

# Or, from your install directory:
node node_modules/@tradeos/tradeos-mcp/scripts/fetch-token.mjs

Windows (recommended):

cd /d %USERPROFILE%\Downloads\tradeos-mcp-run
node node_modules\@tradeos\tradeos-mcp\scripts\fetch-token.mjs

Copy the printed JWT (eyJ...). For local development of this repo, copy into .env:

cp .example.env .env
# TRADEOS_ACCESS_TOKEN=eyJ...

End users who only npm install the package do not need .env — set the token in MCP client config (mcp.json) instead.

Do not commit tokens to git.

3. Configure Cursor

{
  "mcpServers": {
    "tradeos-npm": {
      "command": "node",
      "args": [
        "C:/Users/YOU/Downloads/tradeos-mcp-run/node_modules/@tradeos/tradeos-mcp/build/index.js"
      ],
      "env": {
        "TRADEOS_ACCESS_TOKEN": "eyJ..."
      }
    }
  }
}

Replace YOU and the path with your actual install location. Use forward slashes or escaped backslashes in JSON.

If Cursor cannot find node, set the full path:

"command": "C:/nvm4w/nodejs/node.exe"

Enable tradeos-npm in Settings → MCP. Status should show connected with tools listed.

4. Verify in terminal (optional)

Environment variables in mcp.json do not apply to your shell. Set the token in the same terminal session:

REM Windows CMD
set TRADEOS_ACCESS_TOKEN=eyJ...
node C:\Users\YOU\Downloads\tradeos-mcp-run\node_modules\@tradeos\tradeos-mcp\build\index.js
# Linux / macOS
export TRADEOS_ACCESS_TOKEN=eyJ...
node ~/tradeos-mcp-run/node_modules/@tradeos/tradeos-mcp/build/index.js

Success:

[tradeos-mcp] remote: https://ai.tradeos.xyz/api/agent/mcp/mcp-call
[tradeos-mcp] stdio bridge ready

Press Ctrl+C to stop. Cursor starts its own process; you do not need to keep this terminal open.


Windows notes

  1. Use local node + install path in mcp.json, not npx, for MCP.
  2. If npm cache errors mention C:\Program Files\nodejs\node_cache, run once:
    npm config set cache "%USERPROFILE%\.npm-cache"
    
  3. npx @pkg tradeos-mcp-oauth may run the wrong bin on Windows. Prefer:
    npx -y -p @tradeos/tradeos-mcp tradeos-mcp-oauth
    
    or node .../scripts/fetch-token.mjs from your install directory.
  4. Clear a broken npx cache (quit Cursor first):
    rmdir /s /q "%USERPROFILE%\.npm-cache\_npx"
    

npm package reference

Item Value
Package @tradeos/tradeos-mcp
MCP Registry name io.github.TradeOS-AI/tradeos-mcp
Bin: MCP bridge tradeos-mcp
Bin: OAuth token tradeos-mcp-oauth
OAuth subcommand oauth on bin tradeos-mcp

Install:

npm install @tradeos/tradeos-mcp

Development (this repo)

git clone https://github.com/TradeOS-AI/tradeos-mcp.git
cd tradeos-mcp
npm ci
npm run build
npm run oauth:token    # browser OAuth → prints token (copy into .env if needed)
npm run registry:verify
Script Purpose
npm run build Compile stdio bridge to build/
npm run oauth:token Browser OAuth → print token
npm run registry:verify Pre-publish checks (package.json ↔ server.json)
npm run registry:sync-version <ver> Sync version from release tag

Publishing (maintainers)

Push a version tag to trigger .github/workflows/publish-mcp.yml:

git tag v1.0.0
git push origin v1.0.0
  • Stable tags (v1.0.0) publish to npm latest and the MCP Registry.
  • Pre-release tags (v1.0.0-beta.1) publish with an npm dist-tag matching the prerelease label (e.g. beta).
  • Requires GitHub Actions secret NPM_TOKEN (Classic Automation token for @tradeos).

Verify on the registry API:

curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.TradeOS-AI/tradeos-mcp"

Troubleshooting

Symptom Likely cause Fix
TRADEOS_ACCESS_TOKEN is required Token not set in env / mcp.json Run oauth helper; set env in MCP config
unauthorized on connect Expired or invalid token Re-run oauth; paste fresh JWT (no Bearer prefix)
EPERM / node_cache npm cache under Program Files npm config set cache "%USERPROFILE%\.npm-cache"
TAR_ENTRY_ERROR / 'tradeos-mcp' is not recognized npx failed on Windows Local install + node path in mcp.json
MODULE_NOT_FOUND for node_modules/... Ran script from wrong directory cd to install dir or use absolute path
Token works in terminal, not in Cursor mcp.json path or token mismatch Match paths; restart Cursor / refresh MCP
MCP connects but no tools Wrong server enabled Disable broken localhost entries; use production HTTP URL or working tradeos-npm

Related

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选