Strands agents use Pexafy through its MCP server, https://mcp.pexafy.com/mcp, with your API key in the Authorization header. The agent searches free-to-use photos (Unsplash, Pexels, Pixabay and more) and gets each one back with its licence and credit line.

Install

pip install "strands-agents[anthropic]"
export PEXAFY_API_KEY="pexafy_..."      # free key: pexafy.com/dashboard/api-keys/create
export ANTHROPIC_API_KEY="sk-ant-..."   # for this example; any Strands model provider works
Create a key at pexafy.com/dashboard/api-keys/create. Any Pexafy key works.

Use

import os

from strands import Agent
from strands.models.anthropic import AnthropicModel
from strands.tools.mcp import MCPClient

pexafy = MCPClient(
    url="https://mcp.pexafy.com/mcp",
    headers={"Authorization": f"Bearer {os.environ['PEXAFY_API_KEY']}"},
    tool_filters={"allowed": ["search_photos", "search_photos_by_image"]},
)

agent = Agent(
    model=AnthropicModel(model_id="claude-haiku-4-5", max_tokens=2000),
    system_prompt="Find free stock photos and give each photo's credit line.",
    tools=[pexafy],
)

agent("Find a header photo for a post about remote work.")
tool_filters keeps the two search tools. The other tools are for chat clients, where a person views a photo grid or links an account. On the free plan, show the credit line next to each photo you publish. See what the MCP server can do for the full tool list.