Reference
MCP Protocol
Model Context Protocol reference
MCP Protocol
Metrifyr implements the Model Context Protocol (MCP) for connecting Claude to Google Marketing APIs.
What is MCP?
MCP is an open protocol that standardizes how AI assistants connect to data sources and tools.
Official spec: https://spec.modelcontextprotocol.io/
Metrifyr Implementation
Server:
- Published as
@metrifyr/mcp-serveron npm - Implements MCP server spec v2024-11-05
- Supports stdio transport
Tools:
- 58 tools across 5 categories
- JSON schema validation
- Structured error responses
Resources:
- Memory system (per-API-key context)
- Usage analytics
- OAuth token management
Transport
Metrifyr uses stdio transport:
{
"command": "npx",
"args": ["-y", "@metrifyr/mcp-server@latest"],
"env": {
"METRIFYR_API_KEY": "your-key"
}
}Tool Schema Example
{
"name": "ga4_run_report",
"description": "Run a GA4 report",
"inputSchema": {
"type": "object",
"properties": {
"propertyId": { "type": "string" },
"metrics": { "type": "array" },
"dimensions": { "type": "array" }
},
"required": ["propertyId", "metrics"]
}
}