How do you give an AI agent safe write access to business systems?

You give an AI agent safe write access by deciding, action by action, what it may change and under whose identity. Expose a short allow-list of business actions instead of raw API access, run each call with the user's own scoped token, sort actions into read, reversible write and irreversible, and attach a safeguard to each class: limits and logs for reversible writes, a preview and human approval for irreversible ones. Then roll out in stages and widen autonomy only where your logs show the agent is right.

This guide covers the decisions and the controls that apply across systems: a CRM, an ERP, a SaaS product, Slack, Jira or an internal tool. It does not repeat implementation detail. For the build itself, see how to build an MCP server for a SaaS product and our 30-day plan for building an AI agent. If MCP is new to you, start with what an MCP server is.

The short version:

  1. List the actions the agent needs, not the systems it touches.
  2. Classify each action by how bad a wrong call would be and whether it can be undone.
  3. Pick the identity: the user's delegated token, or a narrow service identity for background work.
  4. Enforce limits on the server: scopes, allow-lists, caps, idempotency, approvals.
  5. Log every call with the prompt and model version that produced it.
  6. Roll out in three stages: read-only, approved writes, limited autonomous writes.

How do I give ChatGPT or Claude the ability to take real actions in my SaaS apps?

Put a remote MCP server in front of your SaaS app's API, protect it with OAuth so each user signs in with their own account, and expose a small set of named actions such as create_ticket_draft or update_deal_stage. ChatGPT and Claude can both add remote MCP servers as custom connectors or apps, and both ask the user before calling a tool that is not marked read-only. Your server, not the assistant, decides what each user may actually do.

In practice, as of late 2026:

  • Claude adds a remote MCP server by URL as a custom connector on all plans; on Team and Enterprise plans an owner adds it for the organization and each member connects with their own account. Users can set each tool to always allow, ask each time or blocked.
  • ChatGPT connects custom MCP servers in developer mode or as custom apps (OpenAI has renamed this area more than once, from connectors to apps and plugins). Write actions require confirmation by default, and any tool without the read-only hint is treated as a write action. Workspace admins on business plans control which apps and actions are enabled.
  • Your own agents built on the OpenAI or Claude APIs can call the same MCP server, so the rules live in one place.

Menu names and plan limits change often, so check each client's current documentation before you plan a rollout around them. The design choice that does not change: the assistant is a client, and every limit you care about must hold even if the client is careless or the user sets a tool to always allow.

Why is write access different from read access?

Read access can leak data; write access can also change, send or destroy it, and some of those changes cannot be undone. So the line that decides your safeguards runs between reversible and irreversible actions. Updating a deal stage can be reverted in a click. Sending an email to a customer, posting in a public Slack channel, issuing a refund or deleting a Jira project cannot.

Classify every action before you build it:

Action class Examples Worst case if wrong Can it be undone?
Read Search CRM, read a Jira issue, list Slack channels Data shown to the wrong person No, but scope limits prevent it
Draft Draft email, draft invoice, proposed Jira ticket Bad draft a person discards Yes, nothing happened yet
Reversible write Change status, assignee, tags, due date Wrong field value Yes, from history
External or irreversible write Send email, post to a shared channel, publish, delete, close a period in the ERP Message seen by a customer, data lost No
Money or legal Refund, payment, price change, contract status Financial loss Rarely
Bulk Any of the above on many records at once All of the above, multiplied Depends

Most agents need only the first three classes to deliver value. Start there.

Which safeguard does each action type need?

Each action class gets a minimum set of controls, enforced by your server. This is the table we use in scoping:

Action type Required safeguards
Read User's own token, read-only scope, tenant filter on every query, result size limits, audit log
Draft All of the above, write scope limited to drafts, draft clearly labeled as created by the assistant
Reversible write Allow-listed fields only, one record per call, idempotency key, per-user rate limit, before and after values in the audit log
External or irreversible write Preview of the exact change, human approval in your interface or the client, recipient and channel allow-lists, no approval reuse
Money or legal Usually not exposed. If exposed: approval by a person with that authority, amount caps, second check for high values
Bulk Not exposed in the first version. Later: dry-run that returns the affected count, hard cap per call, approval

The table is deliberately conservative. You can relax it later, action by action, with evidence from the logs. Loosening a rule is cheap; recovering from an agent that emailed the wrong customer list is not.

Whose identity should the agent use?

When an assistant or agent works for a specific person, it should act as that person through a delegated OAuth token with narrow scopes. The agent then can never exceed the user's own rights, every change in the CRM or Jira history shows a real person, and revoking access is one click in your settings page.

The opposite pattern, one powerful service account behind the agent, is the most common mistake we see in early prototypes. It means a sales rep's assistant can read the CEO's deals, and a single manipulated prompt can do anything that account can do.

Use a dedicated service identity only for background agents that act for no particular person, such as a nightly agent that triages new Jira issues. Give it its own credentials, only the rights its allow-listed actions need, and log every call under that identity. Never reuse an employee's login or an admin API key.

For remote MCP servers, the current MCP authorization specification (version 2026-07-28) builds on OAuth 2.1. The parts that matter for safety:

  • Protected resource metadata so clients discover your authorization server and the scopes you support.
  • Audience-bound tokens: the server must accept only tokens issued for it, and must not pass a client's token through to other services. When your server calls the CRM or Jira behind the scenes, it uses its own credentials for that user, not the token it received.
  • Step-up scopes: the server can answer a call with an insufficient scope error naming the extra scope, so the user grants write access only when a write is first needed.
  • Tool lists per user: the server may return only the tools a caller's scopes allow, so a read-only user never even sees a write tool.

Why use an allow-list of actions instead of raw API access?

Because a raw API gives the model every endpoint and every field, and you cannot review what you did not design. An allow-list gives it a handful of named business actions, each with a typed input, fixed side effects and its own permission check.

Compare two ways to let an agent update a CRM deal:

  • Raw access: a generic crm_request(method, path, body) tool. The model can change the owner, the amount, delete the deal or call any other endpoint the key allows.
  • Allow-listed action: move_deal_stage(deal_id, stage), where stage is an enum of five values and the tool checks that the user owns the deal.

The second version is easier for the model to use correctly and impossible to stretch into something else. It also makes the audit log readable for people who are not engineers. The same applies to Slack (post_to_own_team_channel instead of chat.postMessage to any channel) and Jira (create_issue_draft in allow-listed projects instead of the full REST API).

How do previews and human approval work for risky writes?

For any external, irreversible or money-related action, the tool should first return a preview: exactly what will change, for which record, and who will see it. The change runs only after a person approves that specific preview. The approval is bound to the preview's content, so the model cannot get approval for one email and send another.

Practical patterns:

  • Draft, then publish in your app. The agent creates a draft invoice or reply; the user publishes it in your interface. This is the simplest and most robust pattern.
  • Dry-run flag. A dry_run: true call returns the diff and an approval token; the real call requires that token and fails if anything changed.
  • Approval queue. For background agents, risky actions land in a queue where a named person approves or rejects them, with the agent's reasoning attached.
  • Client confirmation as an extra layer. ChatGPT and Claude show confirmation prompts for tools not marked read-only. Keep those, but do not rely on them: users can turn on always-allow, and the MCP specification itself says tool annotations are untrusted hints.

How do idempotency keys and rate limits help?

Agents retry. Networks time out, models repeat a step, and a user asks twice. Without protection, a retry creates a second ticket, a second Slack message or a second refund. An idempotency key, generated per intended action and stored with the result, makes the second call return the first result instead of acting again.

Rate limits catch the other failure: a model in a loop. Set them per user and per tool, for example a few writes per minute and a daily cap per action type, and alert when an agent hits them. A loop that stops at ten calls is an incident report; one that runs all night is a cleanup project.

What should the audit log record?

Record every tool call with enough context to answer two questions later: what exactly changed, and why did the agent decide to do it. At minimum:

  • Time, user, organization, client (ChatGPT, Claude, your agent) and session.
  • Tool name, arguments with personal data masked, and the result or error.
  • Before and after values for every write, and the idempotency key.
  • Approval details: who approved, when, and which preview.
  • The model, the prompt or system instruction version, and the tool description version in use.

The last line is often skipped and is the one you need most. When behavior changes after a prompt edit or a model upgrade, the log tells you which version made the bad call and lets you replay the case in your evaluation set. Make the log visible to customers too, because "What did my assistant change this week?" is a support question you will get.

How do you contain prompt injection from data the agent reads?

Assume that any text the agent reads, such as an email body, a CRM note, a Jira comment, a Slack message or a web page, may contain instructions written for the model. You cannot filter all of it reliably, so you limit what a successful injection could achieve.

The dangerous combination is an agent that reads untrusted content, has access to private data and has a tool that can send data out or destroy it. Break that combination:

  • Separate reading from acting. An agent that summarizes inbound email does not also hold the tool that emails external recipients.
  • Constrain outbound tools. Recipients, channels and domains come from allow-lists, not free text. A tool that posts to Slack accepts a channel ID from a fixed set.
  • Require approval for anything leaving the company and for any action triggered while the agent is processing external content.
  • Keep destructive tools out of reach. A tool that does not exist cannot be called by an injected instruction.
  • Validate tool inputs as untrusted. Types, enums, length limits and ownership checks on every argument.
  • Watch the logs for odd chains, such as a read of a customer list followed by an external send.

Prompt injection is ranked first in the OWASP Top 10 for LLM applications for good reason. The goal is to make it boring: an injected instruction should at worst produce a draft that a person discards.

Do you need a staging environment and a kill switch?

Yes, both. Run the agent against a sandbox or staging copy of each system before it touches production: most SaaS systems let you create a test workspace, sandbox or separate test project, and for internal systems we build a sandbox implementation behind the same interface as the real integration. We used that pattern in our flower subscription CRM, where every integration ran in sandbox mode until real credentials existed, so the whole flow was testable from day one.

The kill switch is a single setting that disables all write tools, or the whole agent, without a deploy. Pair it with per-tool switches so you can turn off one misbehaving action and keep the rest running, and make sure the people on call know where it is.

What is a safe rollout plan for an agent with write access?

Roll out in three stages and move an action to the next stage only when its numbers justify it.

Stage What the agent may do Exit criterion
1. Read-only pilot Search, read, summarize, propose changes as text Answers and proposals are correct on the evaluation set and in daily use
2. Approved writes Drafts and writes that a person approves one by one Approval rate is high and rejected actions have known, fixable causes
3. Limited autonomous writes Selected reversible writes without approval, inside caps Error rate per action stays low over weeks of logs; undo path tested

Irreversible and money-related actions usually stay in stage 2 permanently, and that is fine. The value of most agents comes from the many small reversible updates, not from the rare risky ones. Our AI agent development process follows the same staging, raising autonomy action by action based on logs.

How do you run a proof of concept for an AI virtual agent?

Pick one workflow, write down the success threshold before any code (for example: completes 8 of 10 test cases with no unsafe action, under a set cost per task), build an evaluation set from 30 to 100 real cases, and run the agent in a sandbox with read tools and approved writes. A four-week PoC ends with measured accuracy, cost per task and a written go or no-go.

For an agent with write access, add three checks to the usual PoC:

  1. Unsafe action rate, counted separately from accuracy. One wrong write to production data matters more than ten clumsy answers.
  2. Injection test cases in the evaluation set: emails, tickets or notes that contain instructions, with the expected result that the agent ignores them.
  3. Approval statistics from the pilot: how often people approve, edit or reject the proposed action, and why.

Our AI proof of concept guide describes the week-by-week plan, the evaluation set and the go or no-go table in detail.

How do you make your SaaS usable by ChatGPT, Claude or operator agents?

Ship a remote MCP server with OAuth over your existing API, expose 5 to 15 actions shaped like user jobs, mark read-only tools as read-only, and make writes create drafts or reversible changes first. That one server then works with ChatGPT, Claude, developer tools and your customers' own agents, each acting with the signed-in user's permissions.

From the safety side, a SaaS vendor has extra duties because many customers' data sits behind one server:

  • Tenant isolation tests that prove no tool can reach another organization's data.
  • Read-only and write scopes so a customer's admin can connect assistants for search without granting writes.
  • An admin view of connected assistants, their scopes and their recent actions, with revocation.
  • Stable, factual tool descriptions, because they are part of what the model reads.

Agents that operate a browser instead of an API exist, but a clean action interface is cheaper to run, faster and much easier to secure than letting an agent click through your user interface. The full build is covered in our MCP server guide for SaaS, and our MCP server development service delivers it.

How is AI used to connect external AI assistants like ChatGPT and Claude to business data?

External assistants reach business data through connectors: remote MCP servers or vendor-built integrations that sit between the assistant and your systems. The assistant decides which tool to call; the connector checks the user's token, applies permissions, calls the CRM, ERP, Slack or Jira API and returns a compact result. The data stays in your systems and only the results the user is allowed to see reach the model.

For a company connecting its internal systems, the choices are:

Option Fits when Watch out for
Vendor connector from the system's maker The system is a popular SaaS app and its connector covers your actions Scopes may be broader than you want; check what writes it allows
Your own MCP server over internal APIs Internal or customized systems, company-specific rules You own permissions, logs and maintenance
A gateway in front of several servers Many systems, central policy and logging needed One more component to run and secure

Whatever the route, the same controls from this guide apply: per-user identity, allow-listed actions, approvals for irreversible writes and a complete audit log.

How do system integration services price a project that connects an LLM agent to CRM, Slack and Jira?

Integrators price these projects by the number of systems, how many of them the agent writes to, the risk of those writes, and the depth of evaluation required, not by the model. With us, a multi-tool business agent that writes to several systems with human approval steps typically costs $10,000 to $30,000 and takes 8 to 16 weeks; a typical US or UK agency quotes roughly 2.5 to 4 times more for the same scope.

What moves the number for a CRM, Slack and Jira agent:

  • Write actions and approvals. Read-only across three systems is far cheaper than writes with previews, approval queues and undo paths.
  • Identity model. Per-user OAuth into three systems takes more work than one service account, and it is the safer choice.
  • State of the APIs. Slack and Jira have mature APIs; a customized CRM or an ERP without a clean API can add weeks.
  • Evaluation. A real test set, injection cases and regression runs before each change.

A proof of concept or a first MCP server runs as one AI Sprint: $10,000 fixed for 4 weeks. Monthly costs come on top: model tokens, hosting and monitoring, with maintenance often planned at 15 to 25 percent of the build cost per year. Our AI agent development cost guide breaks down ranges by complexity and the monthly run cost.

What do we recommend?

For a first agent with write access: one workflow, an allow-list of 5 to 15 actions, per-user OAuth with separate read and write scopes, drafts for everything external, approval for anything irreversible, idempotency keys and rate limits on every write, and an audit log that records the prompt and model version. Run it read-only for the first weeks, then add approved writes, and grant autonomy only to reversible actions with a clean record.

We apply these rules to our own systems. We run MCP servers in production for our internal project board and our site's content system, used daily by our team and our AI coding agents, and the lesson from that daily use matches this guide: writes that publish immediately should have been drafts.

Next step

Send us the workflow you want an agent to handle and the systems it touches. In a 30-minute call we will sort its actions into the classes above, name the safeguards each needs and tell you whether it fits one fixed-price sprint. See our MCP server development and AI agent development services, or contact us.

Want our AI and software guides at the top of your Google?

Add Lytvynov Production as a preferred source and Google will show our new guides on AI agents, MVP costs and custom software higher in your results.

Case studies

Frequently asked questions

When an agent or assistant acts for a person, it should use that person's delegated OAuth token with narrow scopes, so it can never do more than the person could and every change is attributed to them. A dedicated service identity is right only for background agents that act for no particular person, and then it gets the smallest set of rights its allow-listed actions need. Never give an agent an admin key or an employee's password.

No. Both clients ask before calling tools that are not marked read-only, but users can choose to always allow a tool, and tool annotations are hints the client cannot verify. Treat client confirmations as a convenience. The limits that matter, such as scopes, allow-lists, caps, approvals for irreversible actions and tenant isolation, must be enforced by your server.

It can if the agent has a tool that deletes or sends data out and reads untrusted text in the same session. Text in an email, ticket or web page can carry instructions the model may follow. You contain it by not exposing destructive tools, requiring approval for anything that sends data outside the company, limiting which recipients and fields a tool accepts, and logging every call so unusual chains are visible.

A proof of concept for one workflow with read tools and approved writes takes up to 4 weeks. A production agent that writes to several systems with role-based permissions and approval steps usually takes 8 to 16 weeks. Most of that time goes into permissions, approval flows, tests and the evaluation set, not into the model.

With us, a proof of concept or a first MCP server runs as one AI Sprint at $10,000 fixed for 4 weeks. A multi-tool business agent that writes to systems such as a CRM, Slack and Jira typically costs $10,000 to $30,000 to build, plus monthly model, hosting and maintenance costs. We give a fixed quote after a short scoping call.

Your own agent can call a tool layer over your APIs directly; the safety rules are the same either way. MCP becomes the better interface when external assistants such as ChatGPT or Claude, or several of your own agents, need the same actions with the same permissions, because one server then enforces the rules for every client.

Let’s start your project
Book a call