home / mcp / hhs media mcp server

HHS Media MCP Server

Exposes the HHS Media Services API via MCP using the OpenAPI source for streamlined client interactions.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ag2-mcp-servers-hhs-media-services-api": {
      "command": "python",
      "args": [
        "mcp_server/main.py",
        "stdio"
      ],
      "env": {
        "CONFIG": "JSON string containing the configuration",
        "SECURITY": "Security-related environment variables (e.g., API keys)",
        "CONFIG_PATH": "Path to a JSON configuration file (e.g., mcp_server/mcp_config.json)"
      }
    }
  }
}

An MCP (Model Context Protocol) Server provides a structured endpoint for clients to interact with a defined context model. This server targets the OpenAPI specification for the Health and Human Services (HHS) domain and is designed to be started from your environment to serve MCP-enabled clients with consistent data access and actions.

How to use

You run the MCP server in a local process and connect to it with an MCP client. Start the server in stdio mode to enable in-process communication with tooling or scripts that invoke it directly. You can also supply a configuration path or a JSON string to customize behavior at startup.

How to install

Prerequisites for this MCP server include Python 3.9 or newer, and the Python package manager tools you prefer.

1. Clone the project and navigate into the project directory.

2. Install dependencies. You can install in editable mode to develop against the package.

pip install -e ".[dev]"

If you prefer to run via uv, you can install in editable mode through uv as well.

uv pip install --editable ".[dev]"

3. Start the MCP server in stdio mode to interact with your in-process tooling.

python mcp_server/main.py stdio

Additional notes

You can also manage project quality with linting, static analysis, and tests. Linting uses ruff, and static analysis can be performed with a provided script. Tests run via pytest with coverage reports.

Environment variables allow you to tweak how the server launches and which configuration it uses. Common variables include CONFIG_PATH for the path to a JSON config file, CONFIG for a JSON string containing the configuration, and SECURITY for security-related parameters like API keys.

Available tools

ruff

Lints and formats the codebase to ensure consistent style and catch issues early.

mypy

Performs static type checking to catch type errors before runtime.

pytest

Runs unit tests and collects test results to verify correctness.

hatch

Builds and publishes the MCP server package.

pre-commit

Enforces code quality checks before each commit via pre-commit hooks.

semgrep

Static analysis tool to detect code patterns and potential issues.

bandit

Security-focused static analysis to identify vulnerabilities.