MCP server
Connect Claude, ChatGPT or any MCP app to your accounts, with the workspaces and scopes you approve.
Pipsocket's MCP server lets an AI app read and trade your MT5 accounts, and set up TradingView hooks, through tools. You add one URL to the app, sign in to Pipsocket in your browser, and tick what it may do in each workspace. There's no API key to paste: the app signs in with OAuth.
https://mcp.pipsocket.com/mcpIt's a remote server (Streamable HTTP), so it works from apps on the web, like Claude and ChatGPT, as well as from desktop and command line apps. MetaTrader 5's own MCP server is local: it runs with the terminal on your computer. Pipsocket's is hosted, for the terminals Pipsocket runs for you, so apps on the web can reach it and your computer can be off.
Pass-through, like the API
The trading tools are the REST API, one tool per call:
- A tool sends exactly one REST request, with your arguments as they are. Nothing is adjusted, split, retried or confirmed on the way, and Pipsocket sets no risk limits of its own: the call does what it says, on accounts that may be live.
- The answer is the REST answer: its status, its
Retry-Afterand its body. A2xxnever means filled: the body'sstatesays what happened. See MCP tools. - Trades are safe to retry with an
idempotency_key, by the same rules as the REST API'sIdempotency-Key. See retries and errors.
Pipsocket doesn't ask you to confirm a trade: tools that change things are marked so, and your app decides whether to ask you first. Check its permission settings before you let it trade.
Connect an app
You need a Pipsocket account with a confirmed email address, in at least one workspace. Then add the server in your app.
- In Claude on the web or desktop, open Customize, then Connectors. Click + Add, then Add custom connector.
- Name it Pipsocket, paste
https://mcp.pipsocket.com/mcpand click Continue. - Under Authentication, choose Sign in now. Under OAuth client, choose Register automatically: Claude's default, its published identity, isn't accepted yet. Leave request headers empty and click Add.
- Sign in to Pipsocket and approve (below). In a chat, turn Pipsocket on under +, Connectors.
On Team and Enterprise plans, an owner adds the connector in organization settings, and you click Connect.
The dashboard's sign-in page opens in your browser. If you're new, sign up from there; you can approve once your email address is confirmed.
Approve workspaces and scopes
The approval page shows the app's name, marked Unverified app (any app can register itself), and the host its answers go to, in large type. Check that host before you allow anything.
Below it is a grid: one row per workspace you're in, one column per scope the app asked for. Tick the workspaces it may use and what it may do in each:
| Scope | Lets the app, in that workspace | Who can allow it |
|---|---|---|
| Read | Read accounts, positions, orders, history, prices, hooks and alerts. Build alert messages and give you dashboard links. | Owners, admins and members |
| Trade | Place, change and close trades on every account in the workspace, which may be live. Engage and lift the kill switch. Resend a TradingView alert. | Owners and admins |
| Manage | Start, stop and restart accounts. Set up TradingView hooks, which trade when alerts arrive, and their symbol mappings. | Owners and admins |
- Read comes first. Ticking trade or manage ticks read in that row; unticking read clears the row.
- Members read only. In a workspace where you're a member, trade and manage are greyed out.
- Nothing is ticked to start with, unless the app already has a connection: then its current ticks are shown, with a notice that this replaces it. Anything you untick loses access.
- Up to 20 workspaces in one connection. Workspaces you make later aren't added: connect again to add one.
Then choose Allow. Deny sends the app away with nothing.
One connection is one app for one person, across the workspaces you ticked. Its rights are what you ticked, cut to your role as it is now: if you're made a member of a workspace, the app can only read there from its next token on. Connecting the same app again replaces the old connection once the new one is in use.
Getting more later
The app sees every tool your best role across its workspaces allows, whatever you ticked, and each tool's description says the scope it needs and where. A call the connection can't make is refused with the workspace and scope it needs (see errors): connect again from the app and tick that box. Lowering or removing is done in Connected apps, without the app.
Connected apps and revoking
Your connections are under your name at the bottom of the dashboard's sidebar, in Connected apps: each app, its host, when it connected and was last used, and its workspaces with their scopes. For each workspace you can stop trade or manage, or remove the workspace; Revoke disconnects the app everywhere.
A workspace's Settings list its connections too. Owners and admins see everyone's and can take the workspace out of anyone's connection (not revoke the whole connection, which may cover workspaces they don't run). Members see their own, and can take the workspace out of them.
A connection ends, for good, when:
| What happens | What it ends |
|---|---|
| You revoke it in Connected apps | That connection |
| You remove its last workspace, or the last one is taken out of it | That connection |
| You're removed from a workspace | That workspace in every connection of yours; a connection left with none ends |
| You reset your password | Every connection of yours |
| You connect the same app again | The older connection, once the new one is in use |
| The app revokes one of its tokens | That connection |
| The app uses a refresh token a second time | That connection: a used refresh token turning up again looks like a stolen one |
Account and hook tools stop at once. Trading tools can keep working for up to 5 minutes, the life of an access token, and that includes lifting the kill switch. Calls already sent when it ends may complete. To use the app again, connect it again.
Ending a connection doesn't touch what it set up:
- Hooks it made keep trading when alerts arrive, and a hook URL it was given keeps working. Pause or delete the hook in the dashboard, or rotate its URL, to stop them.
- Trades it placed stay open. To stop trading on an account at once, engage the kill switch from the dashboard or the API, and revoke the connection too: until its token runs out, an app with trade could lift it. The kill switch blocks new exposure, then closes and cancels what it can; read the account afterwards to see what's left.
What isn't over MCP
| Instead | |
|---|---|
| Connecting an account, or changing its MT5 password | connect_account_link gives you a link to the dashboard's connect dialog, filled in. The password never goes through the app. |
| Removing an account | The dashboard |
| Revealing a hook's URL again | The dashboard (it asks for your password), or rotate_hook_url for a new one |
| Settling a request whose outcome is unknown | The dashboard |
| API keys, members, invitations, workspace settings, billing, Connected apps | The dashboard: an app can't widen its own access |
| Streams | Polling: MCP is request and answer. Use the WebSocket stream from your own code. |
For app builders
Everything a standard MCP client needs is discovered from a first, unauthenticated call:
- Protocol: MCP
2026-07-28, and for apps that open withinitialize,2025-11-25and2025-06-18. Every request is aPOST /mcpwith its own access token, in either era; there's no session, and answers are JSON (no event streams). A request carrying2026-07-28request metadata is served as that version. Aninitializegets the version the app asked for when it's one of those two (otherwise2025-11-25), the tools capability, and noMcp-Session-Id; every later request must carryMCP-Protocol-Version.2025-03-26and its batches aren't served, so a request without that header is refused400.GETandDELETEanswer405.server/discoverlists every version above, and an unknown version is refused400withUnsupportedProtocolVersionErrorlisting them too. No tool asks the app for input mid-call (multi round-trip). Apps on2025-11-25or2025-06-18get tools andpingonly: resources, prompts, logging and completions aren't offered there, and a call carryinginputResponsesorrequestStateis refused as invalid params. A request with anOriginheader is refused403, so the server can't be called from a web page. - Discovery: a call without a token answers
401withWWW-Authenticate: Bearer resource_metadata="https://mcp.pipsocket.com/.well-known/oauth-protected-resource/mcp", scope="read trade manage offline_access". That metadata names the authorization server,https://app.pipsocket.com/api/auth, whose own metadata is athttps://app.pipsocket.com/.well-known/oauth-authorization-server/api/auth. - Registration: dynamic client registration (
/api/auth/oauth2/register), withtoken_endpoint_auth_methodnone,client_secret_basicorclient_secret_post. Client ID metadata documents aren't accepted yet. - Authorization: authorization code with PKCE (
S256), namingresource=https://mcp.pipsocket.com/mcpexactly. Ask forread trade manage offline_access: the person picks per workspace.prompt=createisn't offered. - Tokens: access tokens are JWTs (
typ: at+jwt) for that resource, and live 5 minutes. Refresh tokens live 30 days and rotate on every use, with no grace period: refresh one at a time, since a refresh token used twice ends the connection. Bearer tokens only, sent in theAuthorizationheader; DPoP isn't offered. - Revoking:
/api/auth/oauth2/revoke(RFC 7009) with either token ends the connection. - When the token route fails: a
503(temporarily_unavailable) to a code exchange means the code is spent: start the authorization again. A503to a refresh may come before or after the refresh token was used up: send the same refresh token once more, and if that answersinvalid_grant, connect again.invalid_grantalways means connect again. An HTTP503from/mcpitself is never the token's fault: try again, without refreshing.
The token is checked on every request. The workspaces and scopes it carries are cut to the person's role when it's issued, and account and hook tools also check the connection as it is now, so a lowered scope or a removed workspace takes effect at once there.