
You are building an internal GTM research agent for your company's go-to-market team. Before it reaches a single employee, you have five problems to solve:
All five problems are decided by the architecture behind how the agent reaches its tools. Fork the GTM research agent template on GitHub, which addresses all five problems. Claude is the brain of the agent, and Context.dev is its live data source. Scalekit is the agent integration layer: it powers per-user OAuth, stores each employee's Context.dev token, and sits between the agent and its tools as the execution runtime. Scalekit's Virtual MCP server gives the agent 7 of Context.dev's 51 tools, which removes the tool bloat and keeps the agent to its job. The template is a demo, strictly focused on scoped tools for AI agents.
What is Context.dev? Context.dev is a web scraping and search API for AI agents. It scrapes any URL into LLM-ready Markdown, searches the live web, crawls sites and extracts structured data. Its MCP server gives an agent 51 tools for that work.
What is Scalekit? Scalekit is the integration layer between an AI agent and the apps it acts in. It sits on every tool call: it runs per-user OAuth, scopes the tools each agent can see and call, makes the call with that user's credentials, and logs who did what.
The running example is the revenue team at an enterprise that sells to venture-backed startups. Its sales representatives are the users of this GTM research agent.

Scalekit's Virtual MCP server exposes seven Context.dev tools to the research agent:
The Context.dev connector has 51 tools. The other 44 cover work that this GTM research agent doesn't need, such as monitors and batch jobs. So none of those 44 tools is exposed to this research agent.
The common approach is to pass all 51 Context.dev tool definitions in the tools array and restrict the model with a line in the system prompt. That approach fails in two ways:
The fix is not better prompting. It is surface reduction, limiting the tools the research agent can access.
So you configure the tool list once, outside the research agent's process. That is what Scalekit's Virtual MCP server does. A Virtual MCP server is a fixed endpoint that exposes exactly the tools you chose from a catalog of 1,100+ apps. For this GTM research agent, the choice is 7 of Context.dev's 51 tools.
Why scoped tool access matters: an agent can only misuse a tool it can reach. With 7 of 51 tools on the Virtual MCP server, the Context.dev tools this job never needs, such as creating or deleting monitors, stay out of the agent's reach. Claude also chooses from 7 definitions on every turn, where the full connector would send 51.
Recommended Reading: What Is a Virtual MCP Server? Architecture, Capabilities, and How It Works
Four actors run the GTM research agent, and each owns one decision:

Request flow for one prompt:
Note: the same research agent also runs from the terminal with python examples/step4_research_agent.py "<prompt>". The demo is explained through the browser interface, because that is the interface end users work in.
The demo repository has three folders, split by who runs the code, plus a README with the full setup steps:
Nothing under app/ names a Context.dev tool, and nothing under app/ can change which tools Scalekit's Virtual MCP server exposes.
The README covers setup end to end. The short version is five commands:
Two steps happen in the Scalekit dashboard:

The research agent's backend reads five values from .env:
The connection name in your code must match the connection name in the dashboard exactly. The demo reads it from CONTEXTDEV_CONNECTION_NAME and uses contextdevmcp. A mismatch is the most common integration error, and the name can differ between environments.
Note: to extend this template into a full Context.dev-powered research agent, see all 51 Context.dev tools available through Scalekit.
You do this first, as the developer, before any user connects. Every script in the repository starts from the same Scalekit client:
You run admin/setup_mcp_config.py once, and again only when the research agent's job changes. The research agent's backend never runs it.
The script lists every tool on the connection with actions.list_tools(connection_name=CONNECTION_NAME), which needs no connected user. Each tool comes back with the access label Scalekit gives it, such as read-only or destructive. The script offers the 7 recommended Context.dev tools from a file in the repository, mcp_tools.txt, or lets you pick from all 51. The script then writes the chosen tools to Scalekit:
mcp_server_url is the URL of the Virtual MCP server, shared by every user of the research agent. To change the research agent's Context.dev tools, run actions.mcp.update_config with a new mapping. The research agent's code does not change and nothing is redeployed.

The script asks for confirmation, writes the 7 Context.dev tools to Scalekit and prints the Virtual MCP server URL. The local FastAPI server starts next with python app/server.py.

The Virtual MCP server now appears in the Scalekit dashboard under AgentKit > Virtual MCP Servers, mapped to the Context.dev MCP connection with 7 tools.

mcp_tools.txt is only an input to the admin script, and the running research agent never reads it. Your reviewers see the recommended tool list in a pull request. Scalekit's Virtual MCP server enforces the configured tool list.
What the Virtual MCP server gives you: one tool list per agent role, set outside the agent's code. Changing what the research agent can do is a config update in Scalekit with no redeploy, and every user of the agent gets the same 7 tools.
Scalekit's docs list every option to configure a Virtual MCP server.
A connected account is Scalekit's record of one user's authorization for Context.dev. The connected account holds that user's OAuth tokens and a connection status: PENDING_AUTH until the user approves access in Context.dev, then ACTIVE. The research agent's backend creates one connected account per user. Each connected account is keyed by an identifier, which is your app's ID for that user.
A new account starts as PENDING_AUTH. The user opens the authorization link and approves access in Context.dev. The status becomes ACTIVE, and from then on the research agent can call Context.dev tools as that user. The research agent's backend checks the status before every run: ACTIVE proceeds, and any other status gets a new link.

Context.dev shows its consent screen with the permissions the connection receives:

After approval, the connected account appears in the Scalekit dashboard under AgentKit > Connected Accounts with the user's identifier and the status Connected.

Securing the connection. Scalekit encrypts each employee's Context.dev token with AES-256-GCM, under a key that belongs to one environment. Scalekit refreshes the token and adds it to each outgoing request, so the research agent's backend never receives it. Encryption keys rotate without downtime, and you can hold the master key in your own KMS. To revoke one employee's access, delete their connected account. The stored token goes with it. Scalekit's docs cover how credentials are stored.
Why each employee connects their own account: with one shared Context.dev key, every search comes from a single account. With a connected account per employee, credits are spent from that employee's own Context.dev account, one person's access can be removed without touching anyone else's, and every call traces back to a person.
In the demo, app/server.py wraps this in two endpoints. GET /api/status returns the status for the user ID in the request header, and POST /api/connect returns the link. The chat page opens the link in a new tab and closes it when the account is ACTIVE.

Before each run, the research agent's backend asks Scalekit to mint a session token for one user on this Virtual MCP server. The token is short-lived: one hour unless you set an expiry, and it cannot be refreshed. The token works only on the Virtual MCP server it was minted for.
tools/list returns the seven Context.dev tools and their schemas, plus a connect_account helper that the demo leaves out because the chat page already handles connecting.
The research agent asks Scalekit's Virtual MCP server which tools it may use, and the Virtual MCP server answers with the tool list you configured. No code path in the research agent names a Context.dev tool. If you add an eighth tool, the next tools/list returns eight.
Any MCP client can connect to the same URL with the same session token. The demo sends the JSON-RPC calls directly, so each request is readable in the code. Expiry and access level are set when you mint a session token.
The loop is the standard Claude tool-use loop. One line is specific to Scalekit: the tools/call request that executes each Context.dev tool.
The model call carries the 7 Context.dev tool definitions. When the stop reason is tool_use, each requested call goes to the Virtual MCP server with the session token. The result goes back to the model as a tool_result, and the loop continues until the model answers in text.
The version in app/agent.py is the same loop with three additions:
Scalekit protects the research agent's scope in two layers:
Take one prompt as the example. A user types: "Set up a monitor that alerts me when stripe.com/pricing changes."
Context.dev has a tool for monitors, contextdevmcp_create_monitor. create_monitor is one of Context.dev's ten write tools, and it is outside the seven tools configured in the Virtual MCP server.
With the first layer alone, the research agent replies that it has no monitor tool, and no call is sent. To show the second layer in the chat, the demo adds a local probe tool, attempt_unlisted_tool. The probe lets Claude name a Context.dev tool outside the 7, and the research agent's backend forwards that call to the Virtual MCP server unchanged:
Scalekit's Virtual MCP server answers with JSON-RPC error -32602 and the message unknown tool "contextdevmcp_create_monitor". Nothing reaches Context.dev. No monitor is created and no Context.dev credits are spent. The Virtual MCP server rejects the call before any tool runs, so the refusal is not an executed tool call and does not appear in the tool call logs.

In the chat, the tool line reads "create_monitor refused by Scalekit: not in this agent's tool set," and the research agent tells the user that the tool exists but this agent is not allowed to use it.
Scalekit's Virtual MCP server enforces the refusal, whatever the model does. The same unknown tool error comes back for a misspelled tool name and for an invented one. A production research agent leaves out the probe.
Open the chat page at http://localhost:8000 in two browser profiles. In the first profile, enter any user ID, for example user_a, and connect one Context.dev account. In the second profile, enter a different user ID, for example user_b, and connect a second Context.dev account. The chat page appends a random suffix to each user ID before sending it to Scalekit as the identifier, so user_a becomes an identifier such as user-a_6ec77d.
Both users reach the same Virtual MCP server and the same seven Context.dev tools. The session token is what differs. Each run's token is bound to one user and that user's connected accounts, so user_a's searches run with user_a's Context.dev token and draw on that account's credits. Ask each profile "How many Context.dev credits do I have left?" and contextdevmcp_get_usage returns two different balances.

Context.dev's own usage page for the first account shows the same 24 credits: two company searches and two people searches, all made through the Context.dev MCP API key that the OAuth connection created.

Open AgentKit > Logs in the Scalekit dashboard. Every tool call to Context.dev is there with the timestamp, the connection, the tool name, the identifier and the duration. Filter the list by status, by connection or by identifier to see one user's activity. Tool inputs and responses are not stored.

What per-user logging gives you: every Context.dev call is recorded with the employee's identifier, the tool, the status and the duration, and kept for 90 days. An internal security review asks which call ran and for which employee. One filtered view answers both.
Recommended Reading: Agent Tool Observability: Your Agent Is Running. Is It Actually Working?

Each of the five problems from the opening is settled by one part of the architecture:
Scalekit scopes the Context.dev tools and holds each user's credentials. You own the rest of the research agent:
The demo covers two rows of your column. app/guardrails.py caps one prompt at 300 estimated Context.dev credits, and the system prompt sets the output format. Both are in the repository.
The demo runs on your machine with your own keys. Before your team relies on a GTM research agent like this, add five things:
None of these five additions changes the architecture. The tool list stays in Scalekit's Virtual MCP server, and every Context.dev call still runs as one user.
The same architecture holds as the research agent grows:
Decide the tool list per agent role, and enforce it in the layer that executes the call.
Next steps:
No. A Virtual MCP server is created once per agent role, and all users of that agent share its URL. The Virtual MCP server defines which tools exist. The session token defines who is calling. Each token is minted for one user and works only on the Virtual MCP server it was minted for. The token expires after an hour by default. So the research agent has one Virtual MCP server with seven Context.dev tools, and each user calls it with their own session token. A second server is needed only when a different agent role needs a different tool list.
The connected account exists with the status PENDING_AUTH, and tool calls for that user cannot run. The demo checks the status before showing the chat. If the status is not ACTIVE, the chat page shows a Connect button and requests an authorization link for that user. Authorization links are short-lived, so the research agent's backend requests a new link each time the user clicks. Once the user approves, the status becomes ACTIVE and the same identifier works for every later run without another sign-in.
Update the tool mapping in Scalekit's Virtual MCP server. The research agent's code stays as it is. In the demo that means editing mcp_tools.txt or picking from the full list of 51 Context.dev tools, then running python admin/setup_mcp_config.py again, which calls actions.mcp.update_config with the new mapping. The research agent asks the Virtual MCP server for its tools at the start of each run, so the next run picks up the change. No tool name sits in the research agent's code, and nothing is redeployed.
A model can be prompted into attempting the call. The attempt fails, because Scalekit's Virtual MCP server does not have that tool. A call to anything outside the configured list returns JSON-RPC error -32602 with the message unknown tool, and nothing is sent to Context.dev. The demo shows this: ask the research agent to set up a monitor, and the call to contextdevmcp_create_monitor comes back refused. The tool list is configured in Scalekit, and a conversation cannot change it.
Each record carries the user's identifier alongside the tool name and the outcome, so a call can always be traced to the person it ran for. Tool inputs and tool responses are not stored, which keeps research results out of the log. Tool call logs are kept for 90 days and appear under AgentKit > Logs in the dashboard. Because the identifier is on every record, the two demo users, user_a and user_b, appear as two sets of records for the same research agent, each filterable by identifier.
In Scalekit. When a user approves the authorization link, their Context.dev OAuth tokens are encrypted with AES-256-GCM under a key that belongs to one environment. The tokens are kept until the connected account is deleted. The research agent's code only ever holds a Scalekit session token, which acts for one user on one server and expires. The demo's backend therefore runs tool calls for two users without storing anything about their Context.dev accounts beyond a user ID.