algoforge-mcp-server/README.md

98 lines
2.4 KiB
Markdown

# Algo Forge MCP Server
MCP (Model Context Protocol) server for [MQL5 Algo Forge](https://forge.mql5.io).
Lets AI agents manage your MQL5 code repositories directly through 12 tools — create
repos, commit `.mq5`/`.mqh` files, branch, open pull requests, file issues, tag
releases, and explore public projects.
Algo Forge is a Git platform, so the server talks to its standard REST API over
HTTPS. There is no terminal, no COM interface, and nothing Windows-specific — it
runs anywhere Python runs.
## Prerequisites
- An MQL5 account with access to Algo Forge
- A personal access token (Algo Forge → Settings → Applications → Generate New Token)
- Python 3.10+
## Setup
```bash
cd algoforge-mcp-server
pip install -r requirements.txt
```
Edit `config.json` with your token:
```json
{
"base_url": "https://forge.mql5.io",
"token": "your_personal_access_token",
"timeout": 30
}
```
The token can also be supplied via the `FORGE_TOKEN` environment variable instead
of the config file.
## Run
```bash
python server.py
```
This starts the MCP server on stdio transport.
## Claude Desktop Configuration
Add to your Claude Desktop `claude_desktop_config.json`:
```json
{
"mcpServers": {
"algoforge": {
"command": "python",
"args": ["C:/path/to/algoforge-mcp-server/server.py"]
}
}
}
```
## Claude Code Configuration
```bash
claude mcp add algoforge python C:/path/to/algoforge-mcp-server/server.py
```
## Tools
| Tool | Description |
|------|-------------|
| `get_me` | Authenticated user — login, name, profile URL |
| `list_repos` | List your repositories |
| `create_repo` | Create a new repository |
| `get_file` | Read a file's text content |
| `commit_file` | Create or update a file with a commit |
| `list_branches` | List branches and their latest commits |
| `create_branch` | Create a new branch |
| `list_issues` | List issues (open/closed/all) |
| `create_issue` | Open a new issue |
| `open_pull_request` | Open a PR from one branch into another |
| `create_release` | Tag a version with release notes |
| `search_repos` | Search public projects (Explore) |
## Testing
Use the MCP Inspector for interactive testing:
```bash
npx @modelcontextprotocol/inspector
```
Select stdio transport, command: `python server.py`
## Security
The personal access token grants write access to your Algo Forge account. Keep
`config.json` out of version control, and revoke/regenerate the token if it is ever
exposed.