# OpenRouter Fusion MCP server (`straightforward_understanding/fusion-mcp`) Actor

MCP server exposing the OpenRouter Fusion Router (multi-model deliberation) as a tool, via the apify/openrouter proxy. No API key required.

- **URL**: https://apify.com/straightforward\_understanding/fusion-mcp.md
- **Developed by:** [Yann Feunteun](https://apify.com/straightforward_understanding) (community)
- **Categories:** AI, Agents, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

### OpenRouter Fusion MCP server

An [Apify Actor](https://docs.apify.com/platform/actors) running a [Model Context Protocol](https://modelcontextprotocol.io) server (Streamable HTTP transport) that exposes the OpenRouter [Fusion Router](https://openrouter.ai/docs/guides/features/server-tools/fusion) as a single tool.

**`ask_fusion`** sends your prompt to a **panel of frontier models in parallel**; each panelist can **search the web and cite sources**, then a **judge model fuses** them into one answer plus a **structured analysis** — consensus, contradictions (attributed per model), unique insights, and blind spots. You get the fused answer, the cited source URLs, and every panelist's full response.

It reaches OpenRouter through the [`apify/openrouter`](https://apify.com/apify/openrouter) proxy, so **no OpenRouter API key is required** — requests are authenticated and billed with your Apify token.

#### Why use it

Use it for **hard, high-stakes, or ambiguous questions where one model is not enough**: a single model can be confidently wrong, omit a key angle, or miss recent facts. Fusion runs several models, grounds them in live web sources, and surfaces exactly where they **agree, disagree, and fall short** — so you can trust the consensus and scrutinise the contradictions.

### Tool: `ask_fusion`

| Input | Type | Default | Description |
|-------|------|---------|-------------|
| `prompt` | string | — (required) | The question or task to deliberate on. |
| `system` | string | _none_ | System instruction to steer the panel. |
| `preset` | `"high"` \| `"budget"` | `"high"` | Panel preset. `high` = frontier models (best, pricey). `budget` = cheaper/faster panel with a frontier judge. |
| `analysisModels` | string[] | [preset panel](#presets) | Override the panel with explicit OpenRouter model slugs (**≥ 2**; fewer is ignored). Beats `preset`. |
| `maxToolCalls` | number | `8` (OpenRouter default) | Max web search/fetch iterations per panelist (clamped 1–16). Lower = faster/cheaper, fewer citations. |
| `web` | boolean | `true` | Require the panel to web-search and cite source URLs for factual/current claims. Set `false` for pure reasoning with no grounding. |

#### Presets

`preset` selects the panel that deliberates (the judge is always the frontier model `anthropic/claude-opus-4.8`). Override either with `analysisModels`.

| Preset | Panel models | Use when |
|--------|-------------|----------|
| `high` (default) | `~anthropic/claude-opus-latest`, `~openai/gpt-latest`, `~google/gemini-pro-latest` | Best quality and most reliable citations. Pricey, slow (~$0.4–1.1/call). |
| `budget` | `google/gemini-3.5-flash`, `deepseek/deepseek-v4-flash`, `openai/gpt-5.4-mini` | Faster/cheaper. Weaker panelists cite less reliably (the judge still vets sources). |

The `~…-latest` slugs are OpenRouter floating aliases that always resolve to the current frontier model.

#### Output

`ask_fusion` returns the fused answer as text (with a `Sources:` list appended), plus structured fields:

| Field | Description |
|-------|-------------|
| `answer` | The judge's fused answer. |
| `sources` | Distinct source URLs from the **judge's vetted answer**. The judge drops citations it deems fabricated/unverifiable, so these are not the raw union of panel URLs (weak panel models can hallucinate plausible-looking URLs; those are filtered out). The full per-panel citations remain in `panel`. |
| `analysis.consensus` | Points all/most panelists agreed on. |
| `analysis.contradictions` | Topics where panelists disagreed, with each model's stance — plus an `"evidence"` stance that is the judge's own adjudication (not a panel model). |
| `analysis.uniqueInsights` | Points only one model raised. |
| `analysis.blindSpots` | Topics the panel under-addressed. |
| `analysis.partialCoverage` | Points some (not all) panelists made. |
| `panel` | Each panel model and its full response (where its own citations live). |
| `model` | The judge/router model that produced the fused answer. |
| `usage` | Token usage reported by the proxy. |

> **Grounding & citations.** With `web: true` (default), the panel is instructed to verify current facts/prices/versions via web search, cite the real source URL, and say "no source found" rather than guess. The judge then adjudicates the panel's citations — fabricated or unverifiable URLs (which weaker panel models can invent) are dropped from `sources`. For the most reliable citations, use `preset: "high"` (frontier panelists search and cite more reliably than the budget panel).

#### Example output

Prompt: *"For tuning the hyperparameters of an expensive-to-train ML model, compare Bayesian optimization vs reinforcement learning … cite sources."* (abridged)

```jsonc
{
  "answer": "# Bayesian Optimization vs. Reinforcement Learning …\n\nFor tuning a single expensive-to-train model, **Bayesian optimization (BO) is the right default** on sample efficiency, practicality, and tooling maturity. **RL is a specialized choice** … BO builds a probabilistic surrogate (GP or TPE) and finds strong configs in a few dozen to a few hundred trials ([Frazier, BO tutorial](https://arxiv.org/pdf/1807.02811)). Standard model-free RL is sample-hungry — Hyp-RL needed ~10M frames / 24 GPU-hours of pretraining ([Hyp-RL](https://ar5iv.labs.arxiv.org/html/1906.11527)) …",
  "sources": [
    "https://arxiv.org/pdf/1807.02811",
    "https://ar5iv.labs.arxiv.org/html/1906.11527",
    "https://arxiv.org/abs/1611.01578",
    "https://research.google/pubs/google-vizier-a-service-for-black-box-optimization/",
    "https://arxiv.org/pdf/1807.01774"
    // … 18 more
  ],
  "analysis": {
    "consensus": [
      "For tuning a single expensive model on a limited budget, Bayesian optimization is the better default.",
      "Standard model-free RL is sample-inefficient for one-off HPO; its cost only pays off when amortized across many tasks."
    ],
    "contradictions": [
      {
        "topic": "Has RL been 'replaced' by BO in neural architecture search?",
        "stances": [
          { "model": "~google/gemini-pro-latest", "stance": "A 2023 NAS survey says RL was outperformed and replaced by BO and evolutionary strategies." },
          { "model": "~anthropic/claude-opus-latest", "stance": "The field moved to one-shot/differentiable methods (DARTS), not specifically BO." },
          // "evidence" is the judge's own adjudication of the disagreement, not a panel model.
          { "model": "evidence", "stance": "In NAS, RL controllers were displaced mainly by one-shot/weight-sharing methods (ENAS, DARTS), not BO." }
        ]
      }
    ],
    "blindSpots": [
      "Population Based Training (PBT) — a leading method for dynamic schedules — is omitted.",
      "Parallel/async evaluation often dominates wall-clock efficiency more than raw sample count."
    ]
  },
  "panel": [
    { "model": "~anthropic/claude-opus-latest", "content": "# Bayesian Optimization vs. Reinforcement Learning …" },
    { "model": "~openai/gpt-latest",            "content": "## Short answer\nFor a single expensive-to-train ML model, pick Bayesian optimization …" },
    { "model": "~google/gemini-pro-latest",     "content": "When tuning the hyperparameters of an expensive-to-train model …" }
  ],
  "model": "anthropic/claude-4.8-opus-20260528",
  "usage": { "promptTokens": 15831, "completionTokens": 3103, "totalTokens": 18934 }
}
````

This Actor is an MCP server — the result is returned **inline in the tool response** (the `structuredContent` above). It does **not** write to an Apify dataset or key-value store, so there is no run output to download separately; consume it through your MCP client.

### Endpoint

Deployed as a [standby](https://docs.apify.com/platform/actors/development/programming-interface/standby) Actor, the MCP server is reachable at:

```
https://straightforward-under--fusion-mcp.apify.actor/mcp
```

Authenticate with your [Apify API token](https://console.apify.com/account/integrations) as a Bearer token:

```
Authorization: Bearer <YOUR_APIFY_API_TOKEN>
```

> **Note:** a fusion deliberation is slow (frontier panel + web search routinely runs ~100s+) and the proxy can occasionally return an incomplete body on long runs. The server streams keepalive notifications so MCP clients don't time out, and retries incomplete responses automatically. Use `preset: "budget"` and/or a low `maxToolCalls` for faster, cheaper runs.

### Use with Claude Code

Add the server with `claude mcp add` over the Streamable HTTP transport. Replace `YOUR_APIFY_API_TOKEN` with your Apify token.

#### Project scope

Scoped to the current project and written to a `.mcp.json` file in the repo (shared with anyone who checks it out):

```bash
claude mcp add --transport http --scope project fusion \
  https://straightforward-under--fusion-mcp.apify.actor/mcp \
  --header "Authorization: Bearer YOUR_APIFY_API_TOKEN"
```

> **Security:** `--scope project` stores the header in `.mcp.json`, which is committed to git. Do not hard-code a real token there. Claude Code expands environment variables in `.mcp.json`, so prefer a placeholder and let each user supply their own — set the header to `Authorization: Bearer ${APIFY_TOKEN}` (single-quote it in the shell so it is stored literally) and export `APIFY_TOKEN` in your environment.

#### User scope

Available across all your projects on this machine; stored in your user config, never in the repo:

```bash
claude mcp add --transport http --scope user fusion \
  https://straightforward-under--fusion-mcp.apify.actor/mcp \
  --header "Authorization: Bearer YOUR_APIFY_API_TOKEN"
```

After adding, restart Claude Code and run `/mcp` to confirm `fusion` is connected. Claude can then call the `ask_fusion` tool. Remove it any time with `claude mcp remove fusion`.

### Running locally

```bash
npm install
APIFY_TOKEN=<your-apify-token> npm run start:dev
```

The server listens for MCP requests at `http://localhost:3000/mcp`. The token is needed locally because `ask_fusion` calls the `apify/openrouter` proxy; on the Apify platform it is injected automatically.

### Deploying your own

[Push the Actor](https://docs.apify.com/academy/deploying-your-code/deploying) to Apify with standby mode enabled:

```bash
apify push
```

Your standby endpoint will be `https://<username>--fusion-mcp.apify.actor/mcp`.

### Cost

This Actor does not charge a per-call fee. You pay for:

- **Apify compute** while the standby Actor is running, and
- **OpenRouter model usage**, billed by the `apify/openrouter` proxy against your Apify token.

A fusion call is **much pricier than a normal model call** — `preset: "high"` runs three frontier models plus a judge, each able to web-search. Expect roughly **$0.4–$1.1 per call** depending on prompt length and web usage; `preset: "budget"` is several times cheaper. To control cost, prefer `budget`, lower `maxToolCalls`, or override `analysisModels` with cheaper slugs.

> A [Pay Per Event](https://docs.apify.com/platform/actors/publishing/monetize#pay-per-event-pricing-model) schema is included in [`.actor/pay_per_event.json`](.actor/pay_per_event.json) for anyone who wants to monetize a fork. It is **not enabled** on this Actor, and `Actor.charge` is not called.

### Resources

- [OpenRouter Fusion server tool](https://openrouter.ai/docs/guides/features/server-tools/fusion)
- [OpenRouter web search & citations](https://openrouter.ai/docs/guides/features/plugins/web-search)
- [What is Anthropic's Model Context Protocol?](https://blog.apify.com/what-is-model-context-protocol/)
- [How to use MCP with Apify Actors](https://blog.apify.com/how-to-use-mcp/)
- [TypeScript MCP SDK examples](https://github.com/modelcontextprotocol/typescript-sdk/tree/main)
- [Apify SDK documentation](https://docs.apify.com/sdk/js/)
- [Apify MCP server documentation](https://docs.apify.com/platform/integrations/mcp)

# Actor input Schema

## Actor input object example

```json
{}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("straightforward_understanding/fusion-mcp").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("straightforward_understanding/fusion-mcp").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call straightforward_understanding/fusion-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=straightforward_understanding/fusion-mcp",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "OpenRouter Fusion MCP server",
        "description": "MCP server exposing the OpenRouter Fusion Router (multi-model deliberation) as a tool, via the apify/openrouter proxy. No API key required.",
        "version": "0.0",
        "x-build-id": "zwjFwVpug3FoiXbJE"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/straightforward_understanding~fusion-mcp/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-straightforward_understanding-fusion-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/straightforward_understanding~fusion-mcp/runs": {
            "post": {
                "operationId": "runs-sync-straightforward_understanding-fusion-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/straightforward_understanding~fusion-mcp/run-sync": {
            "post": {
                "operationId": "run-sync-straightforward_understanding-fusion-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {}
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
