TradeTi.me / Developers / MCP ← REST API npm ↗

Model Context Protocol

Give your AI agent market hours it can trust.

An LLM asked "is the LSE open?" will confidently guess. This is a small server that gives your assistant 8 tools to actually know — is a market open, when it next opens, holidays, sessions — for 30 exchanges. Read-only, no API key, works with Claude, Cursor, and any MCP client.

/30 open now8 toolsnpx tradetime-mcpMIT · keyless

What is MCP — and why this?

Model Context Protocol (MCP) is an open standard that lets AI assistants use external tools — small functions the model can call to fetch facts or take actions, instead of guessing. Claude Desktop, Cursor, and a growing list of clients support it.

Trading calendars are a mess of local timezones, half-days, and holidays that shift every year — exactly the kind of thing a model gets confidently wrong. Give your agent this server and "is the NYSE open?" becomes a lookup, not a hallucination. It's the same engine behind the REST API, so the two never disagree.

Install

Add one block to your MCP client and restart it — the tradetime tools appear. Nothing to sign up for.

Standard config (Claude Desktop & most clients)
{
  "mcpServers": {
    "tradetime": {
      "command": "npx",
      "args": ["-y", "tradetime-mcp"]
    }
  }
}
Claude Code
claude mcp add tradetime -- npx -y tradetime-mcp
# remote, no install:
claude mcp add --transport http tradetime https://mcp.tradeti.me/mcp
Cursor
Add the standard config block to ~/.cursor/mcp.json (or use a one-click "Add to Cursor" button — coming with launch).
VS Code
code --add-mcp '{"name":"tradetime","command":"npx","args":["-y","tradetime-mcp"]}'
Cline · Windsurf · other clients
Any client that speaks stdio works — paste the standard config into its MCP settings.

Two ways to connect

Local — npx (stdio)

Runs on your machine via npx tradetime-mcp. Zero dependencies to manage, nothing hosted, and no rate limits — it reads a bundled dataset. Best for desktop clients.

Remote — a URL

https://mcp.tradeti.me/mcp (Streamable HTTP). For hosted clients that connect to a URL instead of spawning a process. Same 8 tools, keyless.

Core concepts

Exchange by id or name

Every tool takes an exchange — an id (nyse), or a name/city ("Tokyo"). Case-insensitive. Use list_exchanges to discover ids.

Times are the market's own

Hours and holidays are in the exchange's timezone, not the user's. The tools answer in exchange-local terms; convert at display time.

Ask about any moment

Time-sensitive tools take an optional at (ISO 8601) — "will Tokyo be open at 2pm JST tomorrow?" Leave it off for now.

Read-only, always

The server reads; it never writes, calls out, or needs a key. Safe to hand any agent — the worst it can do is answer a question.

The 8 tools

Each shows an example call and the JSON your agent gets back. Press Run to see it live.

TOOLis_market_open

The fast yes/no — is an exchange open right now (or at a given time)?

ArgumentDescription
exchange requiredid or name/city
at optionalISO time; defaults to now
example
is_market_open({ "exchange": "nyse" })
→ { "open": true, "status": "main_open", "timeToCloseHours": 5.5, "closedReason": null }
tradetime → is_market_open(nyse)
live result
TOOLmarkets_open_now

Which of the world's exchanges are trading right now? Every exchange with its open flag.

ArgumentDescription
at optionalISO time; defaults to now
example
markets_open_now({})
→ { "count": 30, "openCount": 8, "exchanges": [ { "id":"nikkei", "open":true, "status":"main_open" }, … ] }
tradetime → markets_open_now()
live result
TOOLtime_until_next_open

When does an exchange next open? Hours until the next open (weekends + holidays skipped), or until close if it's already open.

ArgumentDescription
exchange requiredid or name/city
at optionalISO time
example
time_until_next_open({ "exchange": "Tokyo" })
→ { "open": false, "hoursUntilNextOpen": 8.5 }
tradetime → time_until_next_open(Tokyo)
live result
TOOLget_exchange_status

Full live status — the open flag plus the status enum, session type, hours-to-next, hours-to-close, and why it's closed. (is_market_open is the trimmed version.)

ArgumentDescription
exchange requiredid or name/city
at optionalISO time
tradetime → get_exchange_status(lse)
live result
TOOLlist_exchanges

List the tracked exchanges as lightweight summaries — the way an agent discovers valid ids. Optional region filter.

ArgumentDescription
region optionalAsia, Americas, Europe, …
tradetime → list_exchanges(Europe)
live result
TOOLget_holidays

The closure calendar for one exchange — full-day holidays and early-close days with their close time.

ArgumentDescription
exchange requiredid or name/city
tradetime → get_holidays(nyse)
live result

Two reference tools

get_exchange — the full record for one exchange (sessions, holidays, early closes, source links). get_trading_sessions — just the session structure in exchange-local decimal hours (9.5 = 09:30; a four-number main is a lunch break). Both take a single exchange argument.

Field glossary

The fields you'll see in a status result — shared with the REST API:

FieldMeaning
opentrue/false — the plain answer.
statusclosed · opening_soon (within ~30 min) · main_open · session_open (a pre/post session).
timeToNextHoursHours until it next opens (weekends + holidays skipped).
timeToCloseHoursHours until it closes — present when open.
closedReasonweekend · holiday · null (just after-hours on a trading day).

Errors

Tools don't crash your agent — a bad input comes back as a normal tool result flagged isError, with a message the model can act on:

Rate limits

Local (npx): none — it runs on your machine against bundled data. Remote (mcp.tradeti.me): shares the same generous edge limit as the REST API (a burst far beyond normal use from one IP is briefly throttled, so a runaway agent can't drain the shared service). A normal agent session is nowhere near it.

Example prompts

Once installed, just ask your assistant naturally — it picks the tool:

FAQ

I don't know what MCP is — do I need it?

MCP lets an AI assistant call tools instead of guessing. If you use Claude Desktop, Cursor, or another MCP client and want it to answer market-hours questions accurately, add this. If you're writing your own code, use the REST API instead.

Which clients work?

Any MCP client. Claude Desktop and Claude Code are the most common; Cursor, VS Code, Cline, Windsurf and others all support the same config.

Do I need an API key or account?

No. It's keyless and read-only — for both the local package and the remote URL.

Is the data real-time?

It's based on published trading calendars — accurate for scheduled hours, holidays and half-days, but not a live feed and unaware of unscheduled halts. Verify with the exchange before any time-sensitive decision.

stdio or remote — which should I pick?

Local npx for a desktop client (no limits, nothing hosted). The remote URL for a hosted client that connects to a URL. Same tools either way.

Is it open source?

Yes — MIT. The package is tradetime-mcp on npm.

Feedback

Missing a client, a tool, or an exchange? Spot wrong data? Tell us — no account, 20 seconds.

Was this page helpful?
🛠 Report a data error
✨ Request a feature

Free today — not a promise forever. The MCP server and API are free and keyless in this early phase. As the service grows, its limits, terms, and pricing may change, and it's offered as-is with no guaranteed uptime. Build on it — just don't assume it stays free indefinitely. (The tradetime-mcp npm package is MIT-licensed — that stays open source regardless.)