Skip to main content

MCP server for Apollo Config Center with portal session authentication

Project description

mcp-apollo-config

MCP server for Apollo Config Center using portal username/password login, implemented with FastMCP.

PyPI package: mcp-apollo-config

Install

pip install mcp-apollo-config

Local editable install:

pip install -e .

Auth Mode

The plugin authenticates by portal session:

  1. POST /signin with username/password
  2. Receives SESSION cookie
  3. Uses portal management APIs under /apps/{appId}/envs/{env}/...

No OpenAPI token is required.

Governance Mode

  • readonly (default): query only
  • editable: query + edit (requires --operator)

MCP Configuration

Configure the server in your MCP client with command + args:

{
  "mcpServers": {
    "apollo": {
      "command": "mcp-apollo-config",
      "args": [
        "--portal-url", "http://apollo-portal.example.com",
        "--username", "your.username",
        "--password", "your.password",
        "--governance-mode", "readonly",
        "--default-app-id", "your-app-id",
        "--default-env", "DEV",
        "--default-cluster", "default",
        "--default-namespace", "application"
      ]
    }
  }
}

Full Parameters

Required:

  • --portal-url or APOLLO_PORTAL_URL
  • --username or APOLLO_USERNAME
  • --password or APOLLO_PASSWORD

Optional:

  • --login-submit or APOLLO_LOGIN_SUBMIT
  • --governance-mode or APOLLO_GOVERNANCE_MODE: readonly|editable
  • --operator or APOLLO_OPERATOR (required in editable mode)
  • --default-app-id or APOLLO_DEFAULT_APP_ID
  • --default-env or APOLLO_DEFAULT_ENV (for example DEV, TEST)
  • --default-cluster or APOLLO_DEFAULT_CLUSTER (default: default)
  • --default-namespace or APOLLO_DEFAULT_NAMESPACE
  • --timeout-ms or APOLLO_TIMEOUT_MS (default: 10000)
  • --log-level or MCP_APOLLO_LOG_LEVEL: DEBUG|INFO|WARN|ERROR (default: WARN)
  • --debug-http or MCP_APOLLO_DEBUG_HTTP=true

Tools

  • apollo_get_namespace_configs: query all key/value items under a namespace/environment/cluster with pagination controls (pageSize, maxItems).
  • apollo_get_key: query one config key under a namespace/environment/cluster.
  • apollo_edit_key (editable mode only): create or update one key and return the updated item.

Tests

Local tests use a mock Apollo portal server and do not require real credentials or network access.

python -m unittest discover -s tests -p "test_*.py"

Covered scenarios:

  • tools/list in readonly and editable mode
  • apollo_get_key
  • apollo_get_namespace_configs
  • apollo_edit_key
  • Portal session login + cookie flow

Notes

  • The management API path includes /envs/{env}. Set --default-env or pass env in tool arguments.
  • The server is built on FastMCP and runs in stdio transport mode.
  • After editing a key, Apollo release may still be needed before clients see the change.
  • Avoid keeping DEBUG logs enabled in production for long periods.

Chinese README

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

mcp_apollo_config-0.1.0.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

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

mcp_apollo_config-0.1.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file mcp_apollo_config-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_apollo_config-0.1.0.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for mcp_apollo_config-0.1.0.tar.gz
Algorithm Hash digest
SHA256 592992cd747869d222fb9e6a039b96ad4729e1005b946a90a5dc1eaadd4bec6e
MD5 e2a2c31bfe607a3815ef01312c878156
BLAKE2b-256 512f1ea3b386e657ce6969f0a0038ae31d5ef3738f71374a11b63cb564409b73

See more details on using hashes here.

File details

Details for the file mcp_apollo_config-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_apollo_config-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 abf221f531c1febefdfeb42346faa52065b62d20e6f0c2b7fc5654f50a1b9cce
MD5 a1e755a1b6b645b9d231de6c32cb13a2
BLAKE2b-256 5cb0fb048f5002b983fe82aece5df7e2af34f56dd27995855635fc305cda9199

See more details on using hashes here.

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