I gave my YC jobs scraper write access to Notion without ever holding a Notion token Apify developer Artem Lazarev added Apify MCP connector support to his published Y Combinator jobs scraper, letting the Actor write scraped jobs into a user's Notion database without ever handling a Notion API token. The scraper's last full sweep covered 1,429 companies and 3,305 jobs in about an hour and fifty minutes, producing an 18 MB JSON file; the Actor charges per result and has 120 users. Under the connector model, users authorize Notion once in their own Apify account and the Actor receives only an opaque connector ID, with the Apify MCP proxy adding the Notion credential server-side so it never enters the developer's container. Artem Lazarev https://apify.com/artemlazarevm as part of Write for Apify https://apify.com/resources/write-for-apify - a program for developers sharing original articles about what they've built with Apify. TL;DR Apify MCP connectors https://docs.apify.com/platform/integrations/mcp-connectors use the Model Context Protocol MCP to let an Actor write into a user's connected apps without ever touching that app's credentials. I used one to push my scraped Y Combinator jobs straight into Notion and delete my CSV export step. Below: why a token field was never an option for a published Actor and five steps covering connector setup, tool discovery, field mapping, safe writes, and what the whole thing costs per run. The workflow I wanted My Y Combinator jobs scraper https://apify.com/artemlazarevm/yc-jobs-scraper has run happily for months. It walks the YC directory, pulls every company that's hiring, and returns salaries, equity ranges, founder profiles, and full job descriptions. The last full sweep did 1,429 companies and 3,305 jobs in about an hour and fifty minutes. Then the data sat there. An 18 MB JSON file in a dataset. What I actually wanted was boring and specific: a running list of who's hiring, at what salary, in which batch, that I could sort and annotate and come back to a week later. So every time, I exported a CSV, opened it in a spreadsheet, and filtered by hand. The scraper was finished. My workflow wasn't. Apify MCP connectors https://docs.apify.com/platform/integrations/mcp-connectors closed that gap. They let an Actor call an external service's allowed tools through an Apify-managed proxy, using the user's own authorized account. The Actor is published on Apify Store, charges per result, and has 120 users I've never met. After I added connector support, it writes scraped jobs into a Notion database on its own. All it took was a connector field https://docs.apify.com/platform/integrations/mcp-connectors/use-in-actors in the input schema, a declaration of the Notion tools it needs, and the code that turns scraped jobs into Notion pages. The full implementation is in the repo: github.com/artem-lazarev/apify-ycombinator-jobs-scraper https://github.com/artem-lazarev/apify-ycombinator-jobs-scraper . For users of Apify Actors. To use an MCP connector, the Actor's developer has to add support for it first. Once that's in place, open Settings API & Integrations in your own Apify account and authorize the connector you need, such as Notion. Then open the Actor's input form, select that connector, and fill in the destination details. For my YC Jobs Scraper, that's the Notion data source ID. Run it, and the scraped jobs land in your Notion database. Why I couldn't just ask for a Notion token The obvious option was to add a Notion API token field to the input schema and call the Notion API directly. A Notion integration token is a single secret that grants access to everything you've shared with that integration: pages, databases, all of it. Asking those users to paste a Notion token into my Actor means asking them to trust that my code won't log it or send it elsewhere. I wouldn't paste my own token into someone else's Actor, so I don't think it's reasonable to ask. MCP connectors invert that. The user authorizes Notion once, in their Apify account. My Actor receives a connector ID, which is just an opaque string. At runtime it authenticates to the Apify MCP proxy with the run's own Apify token, and the proxy adds the Notion credential server-side before forwarding anything upstream. That credential never enters my container. There's nothing for me to leak and nothing anyone has to trust me about. Users still need to check which tools an Actor declares, because it can read and write through them. Apify treats the Actor runtime as untrusted https://blog.apify.com/announcing-mcp-connectors/ security-considerations precisely because it runs developer-supplied code. I'm the untrusted party here, and I'd rather be. What you need to follow along By the end of this walkthrough your Actor will finish a scrape and push the results into Notion on its own. No CSV export, no import step, no Notion token anywhere in your code. Before any of that works, one thing has to be true: your Notion database has to exist already, with the columns you actually want. This Actor creates pages. It doesn't create databases and it doesn't create columns. Step 3 covers what happens when you gloss over that, which in my case was a batch of jobs landing in Notion with nothing in them but titles. So build the destination first. Start with a title column and add the fields you plan to fill. The rest of the list is short: - An Apify account. - A Python Actor you can build and run in Apify Console. - A Notion workspace you can authorize. Apify provides the managed OAuth client for Notion, so you don't need to register your own OAuth app. - apify-cli 1.8.0 or newer, if you deploy from the command line. The connection code targets Python 3.10 or newer, the Apify SDK, and mcp 2.x. One packaging detail worth knowing up front: mcp 2.x depends on httpx2 , which is a separate package from httpx . Install and import that one. The changes land in three places: inputs go in .actor/input schema.json , the Notion helpers live in src/notion sync.py https://github.com/artem-lazarev/apify-ycombinator-jobs-scraper/blob/main/src/notion sync.py , and the sync gets called after results are saved in src/main.py https://github.com/artem-lazarev/apify-ycombinator-jobs-scraper/blob/main/src/main.py . The repository has the complete scraper; the excerpts below are the integration only. 1. Declare the Apify MCP connector and its allowed tools When I opened my authorized Notion connector, it offered 28 tools: notion-search , notion-update-page , notion-create-database , and 25 more. My Actor can call two of them. The proxy rejects everything else before it ever reaches Notion. Setting up that allowlist is what this step is for, and it lives in .actor/input schema.json . Here's the notionConnector field inside the existing schema's properties object: { "properties": { "notionConnector": { "title": "Notion connector", "type": "string", "description": "Optionally write jobs to Notion through an authorized connector.", "resourceType": "mcpConnector", "nullable": true, "sectionCaption": "Notion output", "mcpServers": { "url": "https://mcp.notion.com/mcp", "tools": { "required": "notion-create-pages", "notion-fetch" } } }, "notionDataSourceId": { "title": "Notion data source ID", "type": "string", "description": "Destination data source UUID or collection:// reference.", "editor": "textfield", "nullable": true } } } resourceType: "mcpConnector" turns the input into a connector picker in Console. After building the Actor, authorize Notion under Settings API & Integrations , then select it in the Notion output section. The second input, notionDataSourceId , chooses where the pages go. Keep both optional so dataset-only runs still work. Step 3 shows how to fetch the destination reference once the connection is up. The tools.required list is the part I'd skim past in someone else's article, so let me be specific about it. It isn't documentation and it isn't a hint. The proxy enforces it: it filters tools/list down to what you declared, and rejects tools/call for anything outside it. Here's the first line my Actor logs on every run, straight from a real run log: 🔧 Tools allowed through the connector: 'notion-create-pages', 'notion-fetch' So a jobs scraper can't rummage through your Notion. Not because I promise it won't, but because the proxy won't pass the call. You can check that yourself without reading a line of my code, which is about the only kind of security promise worth anything in a public Actor store. One thing the allowlist doesn't do: it limits which operations the Actor can perform, not which content those operations can reach. notion-fetch isn't restricted to one database. What it can read still depends on the Notion account and permissions sitting behind the connector. 2. Connect and read the tool descriptions before you write anything Before writing anything to Notion, connect once and check what you're working with: which tools the proxy lets through, and what each one expects. Open a session from Python The Actor needs three values: the selected connector ID, the MCP proxy's base URL, and the Apify run token. Apify supplies the last two in every platform run. Install these in the Actor build: apify =2.0.0 mcp =2.0.0 httpx2 =2.5.0,<3 My first deploy failed with ValueError: not enough values to unpack expected 3, got 2 . The example I'd copied mixed the 2.x function name with 1.x unpacking the docs have since been fixed . On mcp 1.x, the function is streamablehttp client , takes headers instead of http client , and yields a third value. python import asyncio import os import httpx2 from apify import Actor from mcp import ClientSession from mcp.client.streamable http import streamable http client async def main - None: async with Actor: actor input = await Actor.get input or {} connector id = actor input.get 'notionConnector' proxy url = os.environ.get 'ACTOR MCP CONNECTOR BASE URL' token = os.environ.get 'APIFY TOKEN' if not connector id or not proxy url or not token: Actor.log.warning '⚠️ No connector or no proxy credentials - skipping Notion sync. ' 'MCP connectors only resolve in a platform run, not a local one.' return try: async with httpx2.AsyncClient headers={'Authorization': f'Bearer {token}'}, timeout=httpx2.Timeout 60.0 , follow redirects=True, as http client: async with streamable http client f"{proxy url.rstrip '/' }/{connector id}", http client=http client, as read, write : async with ClientSession read, write as session: await session.initialize tools = await session.list tools .tools Actor.log.info f'🔧 Tools allowed through the connector: ' f'{ tool.name for tool in tools }' except Exception: Actor.log.exception 'Notion connector check failed' raise if name == ' main ': asyncio.run main Save the tool descriptions before you build a payload The notion-create-pages description is 5,857 characters long. Console truncated it in my logs, so for the first few attempts I was coding against maybe a third of the contract. The fix is one extra block, and it's the trick I'd start with on any MCP service: save the tool descriptions and input schemas into the run's key-value store, then read them properly. Which means your first connection should do nothing but discover tools. It confirms authorization and hands you the service's real contract before you build a single payload. Each tool description explains what the tool does, and its input schema defines the arguments it accepts. Then, immediately after the tools assignment and inside the same initialized session, add the block that saves everything: payload = { 'name': tool.name, 'description': tool.description, 'inputSchema': tool.input schema, } for tool in tools await Actor.set value 'NOTION TOOL SCHEMA', payload Open the run's default key-value store and read NOTION TOOL SCHEMA . One naming detail that tripped me up: the SDK attribute is input schema , while inputSchema above is just the JSON key I picked for the saved file. Inspect the allowed arguments for notion-fetch and notion-create-pages before going further, because the parent ID and the property formats you need in step 3 are both buried in there. Push to a dev build tag, not latest . I have paying users on latest , and I wasn't going to test a new network call in front of them. There's a second reason to work this way: ACTOR MCP CONNECTOR BASE URL only exists in a platform run, so apify run on your laptop can't reach a connector at all. My whole loop was push to a dev tag, run on the platform, read the log. 3. Prepare the Notion destination and map its fields This is the step that cost me the most time, and the worst failure in it was the silent one. A batch of pages went into Notion with nothing but titles. No company, no salary, no equity. The log cheerfully reported that it was sending all columns. It wasn't lying, exactly: my schema parser had returned an empty dict, and the row builder read {} as "this database has a title column and nothing else", so it filtered every other field out on the way through. Two things have to be right before you write anything: the destination reference and the column map. Get the data source reference My first mistake here was simpler. I sent the database ID, because that's what the Notion URL hands you, and the tool rejected it. A Notion database contains one or more data sources, and the write needs the ID of the source that should receive the jobs, not the database itself. A database URL on its own isn't the destination value either. Fetching the database is what makes the distinction obvious. Set database url to the URL copied from your Notion database. Add this after session.initialize in the connection example, at the same indentation as the other statements inside that session: result = await session.call tool 'notion-fetch', arguments={'id': database url} if result.is error: raise RuntimeError 'Notion could not fetch the database' await Actor.set value 'NOTION DATABASE', result.model dump mode='json', by alias=True , Open NOTION DATABASE in the run's key-value store and find the collection:// reference for the data source you want. Put that reference, or its bare UUID, into notionDataSourceId . The sync strips collection:// before sending parent: {"data source id": source id} . Read the schema before building rows Back to the empty dict. But there's a reason I was reading the schema at all, and it wasn't the bug. I had it working against my own database, and I nearly shipped that. But it needed to work for my users' databases too. My database has a column called Salary Min . Theirs might call it Salary min , or have no salary column at all. The title column is usually Name , but Notion lets you rename it to anything. Since one unknown column kills an entire batch, an Actor that assumes my layout works for exactly one person. So the Actor reads the target before writing to it. That's what the second declared tool, notion-fetch , is for. In src/notion sync.py https://github.com/artem-lazarev/apify-ycombinator-jobs-scraper/blob/main/src/notion sync.py , fetch data source schema calls notion-fetch for source id and passes the response to parse data source schema . Those helpers, and logger , are defined in that file. The sync uses their result like this: schema = await fetch data source schema session, source id or None if schema: logger.info f'🗂️ Target columns: {sorted schema }' else: logger.warning '⚠️ Could not read the data source schema - sending all columns' That or None is the fix for the silent failure. An empty dict is falsy, but it isn't None , and the row builder treated {} as a real schema with no optional columns. Collapsing it to None forces a failed or empty lookup down the fallback path: send the expected fields and let Notion report the mismatch out loud. You can still end up with a rejected batch, but you'll know about it instead of finding 50 half-empty pages later. And either way the complete scraped data is already sitting in the Apify dataset. The parsing itself has a wrinkle. notion-fetch doesn't return JSON. It returns a document wrapped in a JSON envelope: some prose, a