Skip to main content
Feedback

Consumer tags

MCP Gateway lets clients identify themselves using the x-lunar-consumer-tag HTTP header. This enables fine-grained control over access, rate limiting, and observability.

A consumer is any client connecting to MCP Gateway, usually an app or service working with LLMs that calls one or more tools through MCP Gateway.

A consumer group is a logical label for requests from related consumers, such as a team, environment, or use case.

Why use consumer tags?

In AI and multi-agent systems, request context can be hard to pin down. Tags give you a reliable way to group and control traffic.

You can use them to:

  • Distinguish between teams or environments (team:alpha, env:prod).
  • Apply access control lists (ACLs) to restrict access by tag.
  • Define rate limits per group.
  • Add structured metadata to logs and dashboards.

Tag format

Tags are passed as a single HTTP header:

x-lunar-consumer-tag: key:value
For Example
x-lunar-consumer-tag: env:staging

Consumer tags are:

  • Optional but highly recommended for most production use cases.
  • Flexible, allowing you to define any keys that make sense for your organization.
  • Used across features including ACLs, quotas, and observability.
On this Page