home / mcp / shipengine api mcp server

Shipengine API MCP Server

MCP Server generated by mcp.ag2.ai

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ag2-mcp-servers-shipengine-api": {
      "command": "python",
      "args": [
        "mcp_server/main.py",
        "stdio"
      ],
      "env": {
        "CONFIG": "{\\\"shipengineApiKey\\\": \\\"YOUR_API_KEY\\\"}",
        "SECURITY": "API_KEY",
        "CONFIG_PATH": "mcp_server/mcp_config.json"
      }
    }
  }
}

An MCP server lets you connect clients to the ShipEngine API through a structured, protocol-based interface. It handles requests and responses in a consistent way, enabling you to automate workflows, test integrations, and build tooling that interacts with ShipEngine data and actions efficiently.

How to use

You run the MCP server locally and connect an MCP client to it. The server exposes the ShipEngine API via a standard transport so your client can perform operations such as querying shipments, creating labels, and managing shipments through the MCP channel. Start the server in stdio mode and point your client at the running process. Use the environment variables to specify configuration and security details, then launch your client to send requests and receive structured responses.

How to install

Prerequisites: Python 3.9 or newer, and the uv tool for quick execution of edits and tasks.

# Step 1: Install Python dependencies
pip install -e ".[dev]"

# If you prefer using uv for editable installs
uv pip install --editable ".[dev]"

# Step 2: Run the MCP server in stdio mode
python mcp_server/main.py stdio

Additional sections

Configuration and security are provided through environment variables. You can supply a path to a JSON configuration file, or pass the configuration as a JSON string, and you can include security-related values like API keys as needed.

{
  "type": "stdio",
  "name": "shipengine_api",
  "command": "python",
  "args": ["mcp_server/main.py", "stdio"],
  "env": [
    {"name": "CONFIG_PATH", "value": "mcp_server/mcp_config.json"},
    {"name": "CONFIG", "value": "{\"shipengineApiKey\": \"YOUR_API_KEY\"}"},
    {"name": "SECURITY", "value": "API_KEY"}
  ]
}

Notes and troubleshooting

If you need to run tests or run static checks during development, use the prescribed tooling and scripts for linting, static analysis, and tests. Ensure the environment is configured before starting the server, and verify that the MCP transport mode you choose (stdio) aligns with your client’s expectations.

Available tools

Linting

Code quality checks using ruff to locate stylistic issues and potential errors.

Formatting

Code formatting with ruff to ensure a consistent style across the project.

Static analysis

Run static checks such as mypy, bandit, and semgrep to detect type and security issues.

Testing

Execute tests with pytest and generate a coverage report.

Pre-commit hooks

Enforce code quality and security checks before committing changes.

Server execution

Run the MCP server in stdio mode using the Python entry point mcp_server/main.py.

Shipengine API MCP Server - ag2-mcp-servers/shipengine-api