Connect
Add the server URL to your assistant. The first call opens MIA's sign-in in your browser: sign in with your MIA account and approve the connection. There is no API key to paste, store or rotate.
claude.ai / ChatGPT · add a custom connector with this URL
https://mcp.mia.tech
Claude Code · terminal
claude mcp add --transport http mia https://mcp.mia.tech
Claude Desktop · claude_desktop_config.json
{
"mcpServers": {
"mia": { "type": "http", "url": "https://mcp.mia.tech" }
}
}
Cursor · .cursor/mcp.json
{
"mcpServers": {
"mia": { "url": "https://mcp.mia.tech" }
}
}
Any client that supports remote MCP servers over Streamable HTTP with OAuth works the same way. Clients set up with the older https://mcp.mia.tech/mcp keep working. In Claude Code, run /mcp or start a new session after adding it so the tools load.
How an agent works
Five stateless tools, read in order: Explore → Describe → Run, with mcp_status on demand and give_feedback to report a problem. The server remembers nothing between calls, so an agent may start at any tool. explore_mcp, describe_entity and mcp_status carry next_steps, a list of suggested calls.
explore_mcp to see which entities your account holds.
describe_entity("MediaSpot") to get its resolvers, fields and examples.
run_query with a query built from those fields:
query {
mediaSpots(first: 3) {
edges { node { id cost } }
totalCount
}
}
Entities come in four families: own (your campaigns, traffic and results), competitive (the market), social and news. The catalog lists only what your account can query.
All five are read-only.
explore_mcp
Explore MIA
explore_mcp(family="all", search=None)
The map. Who you are, your account and its clients, the credits you have left, the query guide, the input types every query shares, and every entity you can query grouped by family.
| Argument | Type | Notes |
| family | "all" | "own" | "competitive" | "social" | "news" | "nested" | Narrows the entity list. nested lists the shared object types rows point to (Brand, Calendar, …). |
| search | string | null | Words matched against field names and descriptions. Adds up to 30 field_hits. Agents are told to search first when a term in the question is not obviously an entity name (a metric such as "score" or "FTD"). |
Returns
{ schema_version, user, account, credits, guide, shared_types, entities, field_hits?, warnings?, next_steps }
describe_entity
Describe entity
describe_entity(name, full=False)
How to query one entity: its single, list and grouped resolvers, the fields worth selecting first, every field of its rows and of its grouped rows on one line each (name, type and the first line of its description), one example query per resolver and related entities in other families. With full it also returns the GraphQL schema slice the entity needs, nested types included, and every other example.
| Argument | Type | Notes |
| name | string | An entity name from explore_mcp, case-insensitive. An unknown name returns unknown_entity with the 3 closest names. |
| full | boolean | Adds the descriptions to schema, and more_examples. Default false. |
Returns
{ entity, family, scope, resolvers, key_fields, fields: { row, grouped }, examples, full, schema, more_examples?, note?, alternatives, next_steps }
run_query
Run GQL query
run_query(query, variables=None, format="json", export_url=False)
Runs a read-only GraphQL query as you and returns MIA's GraphQL response unchanged. Partial results keep their data next to the errors. Each response reports the credits it spent.
With format="csv" the rows come as CSV text, one per root field, in extensions.csv and there is no data. With export_url=true MIA writes one file per root field and returns its download link in extensions.exports instead of the rows. An answer with errors, or whose file could not be written (an export_failed warning), keeps its rows in data instead. Anyone who has an export link can download the file, and the link stops working at url_expires_on, about 24 hours later.
| Argument | Type | Notes |
| query | string | A GraphQL query document. Mutations and subscriptions are refused. |
| variables | object | null | GraphQL variables. |
| format | "json" | "csv" | How the rows come back. Default "json". |
| export_url | boolean | A download link per root field instead of the rows. Default false. |
Returns
{ data?, errors?, extensions: { credits: { spent, remaining, cycle_end }, warnings?, csv?: { alias: text }, exports?: [{ alias, url, format, rows, columns: [{ name, type }], url_expires_on }] } }
mcp_status
MCP status
mcp_status()
Whether MIA is reachable, and this cycle's credit usage with a day-by-day series for the last 31 days. Also returns the link where you manage your connections.
Returns
{ reachable, latency_ms, credits: { used, limit, remaining, scope, cycle_end, limiting_factor, limit_reached, daily }, manage_connections_url, next_steps }
give_feedback
Give feedback
give_feedback(intent, tried, stuck, tool_name, expected=None)
Reports a problem you hit with this server so it gets fixed: a tool that failed unexpectedly, returned something confusing or wrong, lacked a capability you needed, forced a workaround, or whose description was misleading. It only records the report: it does not query MIA and spends no credits. Do not include tokens or personal data. Limited to 20 reports per hour.
| Argument | Type | Notes |
| intent | string | What you were trying to achieve for the user. At most 2,000 characters. |
| tried | string | The calls and arguments you used, and what came back. At most 2,000 characters. |
| stuck | string | Where it went wrong: the error, the confusing output, the missing tool, the misleading description. At most 2,000 characters. |
| tool_name | string | The tool the report is about; none when no tool covers it. At most 2,000 characters. |
| expected | string | null | What you expected to happen or to find. At most 2,000 characters. |
Returns
{ success, id } | { success: false, error, retry_after_seconds }
Prompts
Tools are called by the model; prompts are started by you. Clients show them as slash commands or in the connector menu. In Claude Code, with the server added as mia, usage is /mcp__mia__usage.
- usage
- This cycle's credit consumption: used, limit, what is left, which ceiling applies, and the daily series.
- build_query(question)
- Turns a plain-language question into a working query, using the catalog instead of guessed field names.
- period_performance(days=7, brand?)
- The last N days against the N before, over the metrics your account actually has.
- explore_entity(entity)
- What one entity holds, which fields can be filtered, and one small query that works.
Errors and warnings
run_query reports problems in the standard GraphQL shape, each with a code in errors[].extensions.code. Connection and limit failures use the same shape.
{ "errors": [{ "message": "…", "path": ["mediaSpots"], "extensions": { "code": "unknown_field" } }] }
- unknown_resolver, unknown_field, invalid_filter, orderby_not_selected, invalid_groupby
- The query does not match the schema. Call
describe_entity, fix it and run again.
- invalid_argument
- A wrong or missing argument value: currency, id, type or enum.
- invalid_query
- Syntax error, a mutation or subscription, several operations, or another document error.
- limit_exceeded
- The query is too long, too deep or uses too many aliases. Narrow it.
- credits_exhausted, user_credit_limit_reached
- The account's credits, or your own cap, are used up. Call
mcp_status.
- auth_invalid
- The connection is no longer valid. Reconnect and sign in again.
- rate_limited
- Too many queries in a minute. Carries
retry_after_seconds. This is not a credit limit.
- backend_unreachable, backend_error
- MIA could not be reached or answered unreadably. Retry, or call
mcp_status.
Warnings arrive in extensions.warnings as {code, text, path}, next to a successful answer:
- own_brands_only
- Your own data holds your brands only. The warning names the competitive entity that holds the others.
- default_currency_usd
- A money field was selected without a currency, so results are in USD.
- credits_low
- 10 credits or fewer remain after the query.