TRAE is project-scoped only: cd to your repo root, then npx -y zephex setup --trae. Writes stdio to .trae/mcp.json (command npx, args, ZEPHEX_API_KEY) — not hosted HTTP url.
Official Trae MCP documentation: Trae MCP docs
Without MCP, your agent guesses project layout and misses supply-chain risk. Zephex connects one hosted endpoint so every session gets the same ten tools — no per-machine npm installs, no version drift across the team.
HTTP and stdio setups both need a key from your Zephex dashboard. OAuth-only flows (ChatGPT, Claude.ai web) sign you in in the browser instead — skip this section for those.
Matches the published CLI (mcp-proxy/src/commands/setup.ts). One command signs you in, writes the correct transport, and verifies 10 tools.
Account teardown: logout vs disconnect · Connect MCP walkthrough
Search docs for “where is my MCP file” — the answer is always: run list first, then open the path it prints.
Documented paths: <project>/.trae/mcp.json
TRAE project mcp.json uses stdio in the setup wizard.
Runs the same code as mcp-proxy/src/commands/setup.ts — OAuth in browser, creates a CLI key, writes your editor config, verifies tools.
npx -y zephex setup --traeSkip browser OAuth — paste a key from zephex.dev/dashboard/keys. Must start with mcp_prod_, mcp_dev_, or mcp_sk_.
npx -y zephex setup --trae --api-key mcp_prod_your-key-hereIf you edit by hand after setup: Transport: stdio (see <project>/.trae/mcp.json).
{ "mcpServers": { "zephex": { "command": "npx", "args": ["-y", "zephex"], "env": { "ZEPHEX_API_KEY": "mcp_sk_your_key_here" } } }}After CLI install, fully restart the app if tools do not appear. Manual JSON/TOML blocks below are equivalent — use them when CLI commands are unavailable.
Full comparison: HTTP vs stdio · npx zephex reference
TRAE is project-only: cd to repo root, then npx zephex setup --trae writes stdio to .trae/mcp.json (command npx, not url HTTP).
Replace mcp_sk_your_key_here with your key from Dashboard → API Keys. Copy the full key once at creation — paste into Authorization: Bearer … for HTTP configs, or into ZEPHEX_API_KEY for stdio/npx configs.
mcpServers.zephex with command npx — matches writeTraeConfig in setup.ts.
{ "mcpServers": { "zephex": { "command": "npx", "args": ["-y", "zephex"], "env": { "ZEPHEX_API_KEY": "mcp_sk_your_key_here" } } }}Tip
Fully restart Trae after MCP JSON edits if the server list does not refresh.
Run these in a terminal when the editor UI is unclear — catches stale npm, wrong transport, and project shadows.
npx -y zephex@latest listnpx -y zephex@latest doctornpx -y zephex@latest repair# Fully quit the editor (Cmd+Q / Alt+F4), reopen, start a new agent sessionAfter saving your config, confirm Zephex is connected before you rely on it in real work.
Questions people ask when Trae does not show Zephex tools — indexed for docs search.
TRAE Zephex MCP file location
Project root .trae/mcp.json only. Run setup --trae from that directory.
You do not call tools yourself — ask your agent in plain language. Try these once Zephex is connected:
“Trae IDE: get_project_context on github:myorg/mobile-app — React Native stack.”
Remote repo context via Trae MCP JSON url transport.
“find_code NavigationContainer setup in our app entry.”
Mobile codebase search from Trae agent.
“check_test: add biometric unlock to the login screen.”
Scoped native + JS files for the feature.
“check_package on a native module npm wrapper before linking.”
Registry check for bridge packages.
“explain_architecture for offline sync queue and API client.”
Diagram for mobile data flow decisions.
“read_code the redux slice responsible for session tokens.”
Focused state-management read.
Trae MCP uses the same mcpServers url shape as Cursor. Name the repo path in prompts if the agent does not infer the workspace.
These situations usually mean the setup cannot work until you fix the underlying issue:
No tools
stdio command/args/env in .trae/mcp.json — run setup --trae from repo root.
Wrong folder
cd to project root before setup; list confirms .trae/mcp.json path.
JSON invalid
mcpServers wrapper, no trailing commas.
HTTP url block present
Remove url HTTP — setup writes stdio only.
Empty project
github: or absolute path in prompt.
Zephex missing in this folder only
cd to repo root and run npx -y zephex@latest setup --trae again.
Tools work for packages but not my repo
Include github:owner/repo or absolute path in the same message as get_project_context.
Duplicate zephex entries
Keep only stdio command/args/env — remove url HTTP variant.
Trae MCP JSON url transport — ten tools for the IDE agent:
get_project_context
Reads your project structure, dependencies, scripts, env vars, and framework markers in one call. Replaces manually opening package.json, tsconfig, and multiple config files at the start of every session.
read_code
AST-based code extraction: pass a symbol name and get the implementation without reading entire files. Supports symbol lookup, batched file reads, and structural outlines for large files.
find_code
Ranked search across the repo for definitions, usages, and patterns. Faster than blind grep when the agent does not know where a symbol lives.
check_package
Live registry lookup for npm, PyPI, Cargo, and Go modules. Surfaces typosquat risk, maintainer changes, and suspicious version jumps before you run install.
explain_architecture
Generates Mermaid diagrams for auth flows, service boundaries, and module dependencies so the agent reasons about structure instead of guessing.
check_test
Turns a task description into the smallest file set to read or edit, with risk ratings and caller impact notes.
audit_headers
Grades a deployed URL for CSP, HSTS, TLS, cookies, and redirects. Returns fix snippets for common hosts (Vercel, Cloudflare, Nginx).
keep_thinking
Structured multi-step debugging: tracks hypotheses and conclusions so long investigations do not loop.
Zephex_dev_info
Expert patterns for authentication, databases, frontend frameworks, deployment, and mobile stacks when the agent needs vetted guidance.
project_memory
Persists decisions, gotchas, and conventions per project in ~/.zephex/memory (SQLite FTS5). recall before unfamiliar areas; remember after discoveries. Local stdio only on npx zephex.