Metadata-Version: 2.4
Name: apollo-tool-mcp
Version: 0.2.0
Summary: MCP server for Apollo configuration export and diff workflows
License-Expression: MIT
License-File: LICENSE
Keywords: apollo,config,mcp,model-context-protocol,server
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.11
Requires-Dist: mcp[cli]<2,>=1.17.0
Provides-Extra: dev
Requires-Dist: coverage[toml]<8,>=7.6.0; extra == 'dev'
Description-Content-Type: text/markdown

# Apollo Tool MCP

Python MCP server for Apollo configuration workflows. It exposes tools for listing available environment and cluster targets, diffing a config key across targets, and exporting a target's full configuration to a `.properties` file.

## Features

- List available `env/cluster` targets for an Apollo application
- Diff one config key across all discovered targets
- Export all config items from one target to a `.properties` file
- Run as a local MCP server over stdio

## Requirements

- Python 3.11+
- `uv` for dependency management and publishing
- Network access to your Apollo admin service

## Installation

For local development:

```bash
uv sync --extra dev
```

After publishing, install from PyPI:

```bash
uv tool install apollo-tool-mcp
```

## Running The Server

Run the MCP server directly:

```bash
uv run python -m mcp_server
```

Or use the published console command:

```bash
apollo-tool-mcp
```

Use MCP Inspector during development:

```bash
uv run mcp dev mcp_server/server.py
```

## Configuration

Apollo credentials can be passed as tool arguments or environment variables:

```bash
export APOLLO_ADMIN_URL=https://apollo-admin.example.com
export APOLLO_USERNAME=your-username
export APOLLO_PASSWORD=your-password
```

## Development

Run tests:

```bash
uv run python -m unittest discover -s tests -v
```

Run coverage:

```bash
uv run coverage run -m unittest discover -s tests
uv run coverage report -m
```

Build release artifacts:

```bash
uv build
```

For a Chinese introduction to building your own MCP Server using this repository as an example, see [GETTING_STARTED.md](/Users/iivum/IdeaProjects/apollo-tool/GETTING_STARTED.md).

## Publishing

Publish to TestPyPI first when validating packaging changes:

```bash
uv publish --publish-url https://test.pypi.org/legacy/
```

Publish to PyPI:

```bash
uv publish
```

See [RELEASE.md](/Users/iivum/IdeaProjects/apollo-tool/RELEASE.md) for the release checklist.

## Project Layout

- `mcp_server/`: MCP server entrypoint, Apollo client, and service layer
- `tests/`: unit tests for client, services, and MCP wrappers
- `src/main/java/`: legacy Java CLI implementation kept for reference during migration

## Legacy Java CLI

This repository started as a Gradle-based Java CLI. The Java code is still present under `src/main/java/`, but active development is now centered on the Python MCP server.
