The three options
- A hosted bridge runs the MT5 terminal for you and gives you an API. FiveSocket is one.
- The MetaQuotes Python package runs on Windows and talks to a terminal on the same machine.
- A self-hosted MCP server built on that package gives an assistant tools on your own VPS.
How they compare
| What differs | Hosted bridge like FiveSocket | Python package on your VPS | Self-hosted MCP server on your VPS |
|---|---|---|---|
| What you run | Nothing. The provider runs the terminal. | A Windows machine, the MT5 terminal and your Python program. | The same, plus the MCP server. |
| Who holds the broker password | The provider, encrypted. | You, on your machine. | You, on your machine. |
| How your code reaches it | HTTPS from any language. | Python on the same Windows machine. | MCP tools. You choose how to expose them. |
| AI assistant access | Remote MCP with OAuth, built in. | You build it. | Built in locally. Remote access needs HTTPS and sign-in that you set up. |
| Expert Advisors and custom indicators | Not available on FiveSocket. | Yes, in the same terminal. | Yes, in the same terminal. |
| Ticks and streaming data | Not available on FiveSocket. Requests only. | Yes. The package reads ticks from the terminal. | Depends on the server you run. |
| Updates, restarts and monitoring | The provider handles them. | You handle them. | You handle them. |
| Direct cost | A monthly fee per plan. | A VPS, and your time. | A VPS, and your time. |
When self-hosting is the better choice
- You need tick data or want to react to every price change. FiveSocket has no streaming feed.
- You run Expert Advisors or custom indicators and want your code beside them.
- Your rules say broker credentials cannot leave your own systems.
- You already keep a Windows VPS running, and one more process costs you little.
- You link far more than 20 accounts and have someone to operate the setup.
- You want to read and change every line of the code that touches your account.
In any of those cases, self-hosting is the better answer and FiveSocket is probably the wrong tool.
When a hosted bridge is the better choice
- Your code runs on macOS, Linux or a serverless platform, and you do not want a Windows machine in the picture.
- You want an AI assistant connected through OAuth without building sign-in or exposing a server yourself.
- You need account reads and policy-limited trading, and polling is fast enough.
- You would rather pay a monthly fee than maintain a terminal, Windows updates and restarts.
What self-hosting takes
If you decide to run it yourself, plan for these jobs:
- Rent a Windows VPS, or keep a Windows machine online.
- Install MT5, log in, and allow algorithmic trading in the terminal.
- Install Python and the MetaTrader5 package, then keep your program running as a service.
- Restart the terminal after Windows updates, broker maintenance and crashes.
- Add your own authentication and HTTPS if anything outside the machine will connect.
Whichever option you choose, automated trading carries risk. Test on a demo account and start with small sizes.
Frequently asked questions
- Is a hosted MT5 API safe?
- You are trusting the provider with your broker password, so ask how it is stored. FiveSocket encrypts it, keeps the keys in a separate store, and never returns it. You can link with an investor password so MT5 refuses trades, and trading stays off until you turn it on.
- Is the MetaTrader5 Python package free?
- Yes. MetaQuotes publishes it on PyPI under an MIT license. You still need Windows and a running MT5 terminal.
- Can I run an MCP server for MT5 on my own VPS?
- Yes. A self-hosted server built on the Python package runs on the same Windows machine as the terminal. To reach it from an assistant in the cloud, you need to add HTTPS and sign-in yourself.
- Which is cheaper?
- Compare a VPS quote and your own time with the plan price. FiveSocket starts at $9.99 a month for one MT5 account. If you already run a Windows VPS, adding a process there may cost almost nothing.
- Can I move from one to the other later?
- Yes, but expect to change your code. The Python package uses function calls and the REST API uses HTTP requests. Your MT5 account stays the same in both cases.