Skip to main content

Mage Agent unified MCP/CLI tooling

Project description

mage-agent

Phase 1 status

Implemented:

  • Python package scaffold with mage-agent entrypoint
  • MCP stdio runtime (mage-agent mcp)
  • Shared core config/auth/http/error modules
  • Tools layer (Python API wrappers) for pipeline CRUD, block operations, run trigger, and log retrieval

Local setup

python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -e ".[dev]"

Configure credentials (recommended)

Use interactive login:

mage-agent login

Or provide values non-interactively:

mage-agent login \
  --cluster-url https://your-mage-url \
  --email YOUR_EMAIL \
  --password YOUR_PASSWORD \

login authenticates with the cluster URL using username/password, then writes ~/.mage-agent/config.json with your cluster_url and oauth_token. The agent uses a built-in default API key for requests.

Authentication gates runtime functionality: MCP tool calls require valid auth credentials.

Configure credentials (manual option)

Create ~/.mage-agent/config.json:

{
  "cluster_url": "https://your-mage-url",
  "oauth_token": "RAW_OAUTH_TOKEN"
}

Optional developer tooling

Dev tooling (flake8, pre-commit) is defined in pyproject.toml under optional dependency group dev. If you installed with pip install -e ".[dev]", run local checks with:

flake8 src
pre-commit run --all-files

Run MCP server

mage-agent mcp

Install and connect from IDEs

After installing mage-agent and running mage-agent login, configure your IDE/agent client to launch the MCP server with:

  • command: mage-agent
  • args: ["mcp"]

If mage-agent is not on PATH in the client runtime, use the absolute path to the executable.

Sync project to local files

mage-agent sync-project-to-local --local-project-dir .mage-agent/local_sync

If --local-project-dir is not provided, the CLI prompts for it.

Connect Cursor to MCP

  1. Open Cursor settings and go to MCP servers.
  2. Add a new server named mage-agent.
  3. Use this command configuration:
{
  "mcpServers": {
    "mage-agent": {
      "command": "mage-agent",
      "args": ["mcp"]
    }
  }
}

If mage-agent is not on your PATH in Cursor, use the full executable path instead:

{
  "mcpServers": {
    "mage-agent": {
      "command": "/absolute/path/to/mage-agent",
      "args": ["mcp"]
    }
  }
}

After saving the config, reload Cursor and confirm the mage-agent MCP tools are available.

Connect Codex CLI to MCP

Add mage-agent to Codex MCP config (for example in your Codex config file):

{
  "mcpServers": {
    "mage-agent": {
      "command": "mage-agent",
      "args": ["mcp"]
    }
  }
}

Then restart Codex CLI and verify tools/resources are visible.

Connect Claude Code to MCP

Configure MCP servers in Claude Code with the same command:

{
  "mcpServers": {
    "mage-agent": {
      "command": "mage-agent",
      "args": ["mcp"]
    }
  }
}

Restart Claude Code after saving config, then run a simple MCP call (for example pipeline_list) to verify connectivity.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mage_agent-0.2.0.tar.gz (35.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mage_agent-0.2.0-py3-none-any.whl (41.7 kB view details)

Uploaded Python 3

File details

Details for the file mage_agent-0.2.0.tar.gz.

File metadata

  • Download URL: mage_agent-0.2.0.tar.gz
  • Upload date:
  • Size: 35.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mage_agent-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7a1a43f146abd2a6b423d581134dd90ae99ec209ede44f8978048c5b89cc10b3
MD5 40021197b015b777c9bea4740334f6e1
BLAKE2b-256 db2eb3b1e02a1f5cd9804756518619895be7588e81d2769668ca5aa92b0705c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for mage_agent-0.2.0.tar.gz:

Publisher: publish.yml on mage-ai/mage-agent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mage_agent-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mage_agent-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 41.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mage_agent-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eeec05a8c28f5664015a93386f7f4c7ea8284ba584d00648ed02dbd8821ccd17
MD5 c13b7cd78f3a83ff93d32a3322d58ad7
BLAKE2b-256 675c14aa51e8ac4555424519eb37d7321e9aafa75335b26def070ec18b43e82a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mage_agent-0.2.0-py3-none-any.whl:

Publisher: publish.yml on mage-ai/mage-agent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page