Egor Urvanov

MCP for an AI agentWhat problem it solves and how to delegate setup to the agent

MCP plugs an agent into working systems, so it reads facts from the source instead of a retelling. It is easy and quick: understand the problem it solves and delegate the setup to the agent itself. Below: the idea, connecting, what it gives and which rights to grant. The QA example with MCP is covered in the article QA with an agent via MCP.

What MCP is

MCP is one common plug, like USB. Connect the agent to Jira or GitLab and it takes the data from there itself. More

The picture shows two data paths. In the first a person retells the task to the agent, and details are lost on the way. In the second the agent reads the system itself through MCP and sees everything a person sees. MCP (Model Context Protocol) is an open standard that connects AI applications with external systems. The agent has an MCP client, the system has an MCP server, and the server tells the agent which data and actions are available.

A retelling or the system itself
BY HANDWITH AGENTJiraJira?YouRetellingAgentCtrl+CCtrl+VAgentYouAgent sees a retellingAgent works inside Jira● model, people, systems, data  ● agent and harness  ● risk, stop, boundary
Takeaway
In this exampleIn Jira the agent sees what a person sees: the task PAY-142 itself, comments and change history. No need to find the task and copy it into the conversation. It pulls related tasks on request. It can comment on your behalf, create a task or change a status (after your confirmation). On first use you should feel a “wow”: that means it is set up right. And it is very simple.
In generalThe agent looks wider than a person: it weighs neighbouring tasks, knowledge-base articles and past decisions, and finds non-obvious moves that one task alone does not show. Without MCP it knows only what was pasted in. The person stops being a courier between windows and stays the reviewer.
What to doStart with the task tracker: the easiest and quickest start. How to connect Jira: see below. Also count how many times a day you copy text into the conversation: that is your list of connection candidates.

The agent’s context and other systems

The agent’s context is everything the agent sees at once (the conversation with the agent, project files). Other contexts are everything else (GitLab, Jira, meeting recordings, a knowledge base). The bridge between them is MCP: the agent has an MCP client and the system has an MCP server.

AGENT CONTEXTOTHER CONTEXTSDialogueFilesHarnessthe agent and everything around itLocal machineMCP clientMCP serverGitLabCode and MRsJiraTasks and requirementstldvMeeting recordingsConfluenceKnowledge baseAnd more● model, people, systems, data  ● agent and harness

On the left of the picture is the agent’s context: the conversation with it and the project files it sees at once. On the right are other systems: GitLab, Jira, tldv with meeting recordings, Confluence with a knowledge base. Until MCP is connected, the agent does not see them. The bridge between them has two parts: an MCP client on the agent’s side and an MCP server on the system’s side.

What context is

Context is everything the model sees at the moment. What is not in the context, the agent does not know.

Context
LLMseescontext windowpromptchatfilessystem datawindow size is counted in tokensoutsidethe agent does not know this● model, people, systems, data  ● agent and harness  ● risk, stop, boundaryThe model knows only what is in the context window right now

Context can be pictured as a desk holding everything the model sees right now: conversation messages, open files, call results. What is not on the desk does not exist for the model until it is put there. So the main question when working with an agent is what is on its desk.

Where the fact livesThe agent sees itWhat happens
The agent’s context: the conversation, project filesat oncean answer from data
Other context: GitLab, Jira, meeting recordingsthrough MCPthe agent fetches what it needs
Nowhere: in heads, in a closed systemnoa guess instead of a fact

The table shows what happens to a fact depending on where it lies. A fact in the agent’s context (the conversation, project files): the agent answers from data. A fact in another system (GitLab, Jira, meeting recordings): the agent fetches it itself, but only through MCP. A fact written nowhere (in people’s heads, in a closed system): the agent will not see it and will replace it with a guess. Hence the practical rule: write decisions down where the agent can take them from.

How the agent fetches other context: ReAct

The agent works in a ReAct loop: it reasons, acts, reads the result and reasons again. MCP is the “act” step: the call result lands in the agent’s context.

Reasoning onlyLLMThoughtThoughtMade-up answerActing onlyActionActionActionWandersReActLLMThoughtActionObservationRight answer↻ think again, using the observation● model, people, systems, data  ● agent and harness  ● risk, stop, boundaryReasoning alone makes things up, acting alone wanders, ReAct alternates them and gets the answer
Reasons“I need the steps of bug PAY-142”
ActsCalls the Jira MCP server
ReadsThe Jira reply lands in context
Only reasonsOther contexts are closed: the model makes up the answer.
Only actsCalls everything without a plan and burns tokens.
AlternatesFetches exactly what is missing and answers from data.

An example of the cycle: the agent reasons (“I need the steps of bug PAY-142”), acts (calls the Jira MCP server), reads the answer (it lands in the context) and answers from the data. The three cards show what happens when the cycle breaks. Reasoning alone gives an invented answer, acting alone gives extra calls and token spend, and alternating gives an answer exactly from the data.

Grounding: every part of the answer has support

An answer is grounded when every part of it comes from the context. Such a matching with no empty spots is called an epimorphism.

dataanswerepimorphism: every part has supportnothing in the data?no supportthe model guesses — a hallucination● model, people, systems, data  ● agent and harness  ● risk, stop, boundaryEvery part of the answer comes from something in the data; a part without support is room for a hallucination
Part of the answerSupport
Reproduction stepsJira, ticket PAY-142
Where the code failsGitLab, file and line
Why it was decidedtldv, meeting recording

The table shows a check of support on an example. The reproduction steps come from the Jira ticket, the place where the code fails from GitLab, the reason for the decision from a meeting recording. If a part of the answer has no such support, it is rechecked by hand.

Hallucination: a part with no support

A hallucination is a confident guess where there is no support. It looks as smooth as an answer from data. Details and Anthropic advice are in the hallucinations section below.

no sourceno dataagent?a confident inventionfunctions, links, facts that do not existwith a source and a checksourcechecka supported answer● model, people, systems, data  ● agent and harness  ● risk, stop, boundaryWithout support in a source the model confidently invents; a source and a check restore the support

A hallucination looks as smooth as an answer from data, so they cannot be told apart by tone. Only the support tells them apart: it is there or it is not.

Why these

GitLabCode and merge requests: the agent reads real code
Without it: The agent guesses the code from other contexts and is often wrong, which is how hallucinations appear; a person copies files and diffs into the conversation by hand
Official MCPMore
JiraTasks and requirements: what was really asked
Without it: There is a lot to copy by hand and the change history gets lost
Official Atlassian MCPMore
ConfluenceKnowledge base: rules, specs, decisions
Without it: The visualisation and display of requirements every developer is used to disappear. It is important to limit the agent and not let it wander far: old requirements may be outdated. Make it check the factual picture in GitLab
Same Atlassian MCPMore
tldvMeeting recordings: decisions that exist nowhere in text. In the author’s experience access appears 5–10 minutes after the meeting, so meeting notes and requirements can be written right away. The enterprise version, access control and MCP are weaker, but translations and transcripts are better quality
Without it: Decisions stay in heads, and meeting notes and requirements get written from memory hours later, with errors
Recording and open APIMore
GranolaAlso meeting recordings. It has an MCP, but in the author’s experience lags tldv slightly: Spanish words slip into Russian text, which hurts the user experience and causes resistance to adoption. From the docs: active workspace only, free plan covers 30 days of notes
Without it: Same as without tldv: decisions from meetings get lost
MCPMore

These systems were chosen because they hold four kinds of facts: code, tasks, rules and decisions from meetings. Each row says what is lost without the connection. Confluence comes with a caveat: connect it only if the pages are polished (an owner and a check date), and let the agent check the actual picture against the code in GitLab. It is even more reliable to keep requirements and specs in Git: there an edit has an author, a date and a reason.

Takeaway
In this exampleYou ask about a bug and the conversation has no steps. The agent searches project files, Jira is closed to it, so it writes the steps itself: confident, smooth, made up. You follow a path that does not exist.
In generalAn agent rarely answers “I don’t know”. If the answer is not in the agent’s context and the others are closed, it fills the gap from general patterns and presents it as fact. Every connected source removes room for invention.
What to doEvery time the agent hallucinates, find the context that holds the answer and give the agent access to it. Start with the last question it answered with an invention.

How to connect Jira

The agent and its harness can connect on their own. Guides: Atlassian and Claude Code.

By hand or delegate
BY HANDWITH AGENT123JiraYouAddSign inCheck“connect Jira”sign-inYouAgentBy hand: three actionsThe agent does it, you log in via browser● model, people, systems, data  ● agent and harness  ● risk, stop, boundary

The picture compares two ways. By hand: you look up the instructions, type commands, sign in and check the result. Delegate to the agent: you say one phrase, the agent connects Jira itself, and all you do is sign in through the browser.

Tell the agent

Connect the Jira MCP server following the Atlassian guide and test it on task PAY-142: read it and summarise the comments.

The agent runs the commands itself. All you do is log in via the browser (OAuth): the agent never gets your password. If the agent asks you to do it.

What will happen

  1. 1
    The agent connects Jira
    with one command, you type nothing
  2. 2
    A Jira page opens — the key step
    it offers to give the agent access to Jira; you sign in and approve, and the agent never sees the password
  3. 3
    The agent reads PAY-142
    opens the task with its comments and retells them

The key step here is the second: you give the access yourself, by signing in through the browser. The agent does not see your password and gets only the rights you confirmed on the Jira page. The agent does the first and third steps itself.

Read-only. You may not always be able to choose read-only access on that page. That is safe: the agent tends to read and hardly writes anything until you ask it to.

How it is done by handmcp addAtlassianJira1Add the server2Log in via browser3Test on a sample task● model, people, systems, data  ● agent and harness  ● risk, stop, boundary
claude mcp add --transport http atlassian https://mcp.atlassian.com/v2/mcp
/mcp               # log in via browser (OAuth)
claude mcp list     # status: connected / needs login / failed
Localyou · this projectProjectthe whole teamUseryou · all projects● model, people, systems, data  ● agent and harness

Where the setup lives and who sees the server: MCP scopes in Claude Code.

By hand it is three commands: add the server, sign in through the browser with /mcp and check the status. The status comes in three kinds: connected, needs sign-in or error. The diagram above shows it step by step, and the scopes below say where the setting is stored.

Takeaway
In this exampleThe agent runs the commands and checks the connection itself, and task PAY-142 is read in full with its comments. That is the “wow” moment.
In generalConnecting takes minutes. The "Project" scope puts the setup in the repo so the whole team gets the same servers. All three scopes are covered in MCP scopes in Claude Code.
What to doDelegate the setup to the agent and compare its answer with what you see in Jira yourself.

Savings

The saving comes from accuracy. A vague request gets a vague answer, a fix spawns a new request, and errors pile up from step to step; when copying and retelling by hand a person adds such slips unnoticed. The agent takes data straight from the source, so the chain is shorter and has fewer errors. The price is growing token use over a long run, and there are limiters for it.

Piling up errors: by hand or from the source
BY HANDWITH AGENT!!!!!!RequestAnswerFixAnswerRequestAgentAnswer1 pass instead of 33 passes, ever more errorsA vague request: errors pile upAn exact request: answer from the sourceACCUMULATED ERRORS (ILLUSTRATIVE)1step 13step 26step 31step 1step 2step 3saved● model, people, systems, data  ● agent and harness  ● risk, stop, boundary

On the left is the path with manual copying: every step adds an inaccuracy, and by the third pass the errors have piled up. On the right is the path from the source: one exact request and one answer, with no chain of retellings.

Vague requests and answersRetelling and copying by hand lose detail, so the request comes out vague and so does the answer.
Errors pile upEvery fix spawns a new request with a new inaccuracy: errors add up from step to step.
Cost: tokensThere are fewer steps, but token use grows over a long run; there are limits for it.

Spending limits

A connected system’s reply lands in the conversation and takes up room there, and room is measured in tokens. So Claude Code watches reply size and sets two thresholds.

Up to 10,000the reply goes into the conversation as is10,000 – 25,000Claude Code warns thatthe reply is largeOver 25,000the reply is saved to a file,the conversation gets only its path10 00025 0000tokens in the reply

The scale shows the size of a system’s reply in tokens. Up to 10,000 tokens a reply passes without remarks. After 10,000 Claude Code warns that the reply is large. After 25,000 the reply does not enter the conversation whole and is saved to a file.

The 25,000 cap can be raised with the MAX_MCP_OUTPUT_TOKENS environment variable, while the warning threshold is fixed.

More.

Takeaway
In this exampleThree passes with growing errors turn into one pass on an exact request.
In generalThe saving is the absence of extra rounds: an exact request and an answer from the source do not pile up errors. Exact figures come only from measuring your own work.
About limitsThe longer the work, the more tokens it uses, so Claude Code limits long replies: it warns after 10,000 tokens and saves to a file after 25,000.
What to doMeasure two things on one task: how many minutes and fixes manual transfer takes, and how many tokens the agent spends.

Fewer hallucinations

Hallucination: the model produces text that looks right but is wrong or does not follow from the data. The model sounds equally confident in two situations. More

Little contextThe model fills in the gaps itself and does not say it is a guess.
Context presentThe model cites it briskly and confidently, so open the link and check it.
Where data is missing
“What are the steps of bug PAY-142?”questionlooks up??DataJira is closedAnswerAgentYouIn the dataanswer from the sourceMissingthe agent fills in● model, people, systems, data  ● agent and harness  ● risk, stop, boundary

The agent’s answer is matched against the data: every part of it should have support. In mathematics such a matching is called an epimorphism. Parts without support are filled in by the model as a guess, and they look just as confident.

What this means in practice. If systems are not connected, the agent fills the gaps with a guess and states it in the same confident tone: the text does not show a guess from a fact. If systems are connected, real data with a link stands where the guess was, and checking takes one click. The three Anthropic tips work together: allow the agent to say “I don’t know” when there is no data, ask it to rely on the verbatim text of the source, and demand a link for every claim.

What Anthropic recommends

"I don't know"Allow admitting missing data
QuoteRely on the source text verbatim
CitationEach claim gets its source

The three Anthropic tips close the gaps in the data. Allow “I don’t know”: otherwise the model fills the gap with a guess. Rely on a quote: the verbatim text of a source can be checked. Give a link for every claim: it can be opened and compared.

Takeaway
In this exampleJira is closed, so the agent made up two parts of the answer. When Jira is connected, those spots hold data from ticket PAY-142 with a link, and you open it in one click.
In generalThe agent fills holes in the data with a guess and does not say so. Anthropic’s three tips close them: allow “I don’t know”, rely on a quote, give a link to the source. This does not remove hallucinations entirely, a human check stays.
What to doRequire a source for every fact: system, number, field. How to do it in requirements and meeting notes is in a separate article.

Risks and rules

In most cases the protection is already built into how MCP works in Claude Code. What remains is to pick trusted servers and not grant extra rights. More

Three risks are worth remembering. Excess rights: a server that was given write access can change or delete data, so rights are given at a minimum. An untrusted server: an MCP server from third parties gets access to what you opened to it, so connect verified ones. Text from systems: a task or a comment may contain a phrase aimed at the agent, which is covered in the article on the data plane and control plane.

PermissionClaude Code asks permission before using a server’s tool.
Project serversServers from a project’s .mcp.json file must be approved before first use.
RightsFor servers with sign-in you can limit which rights they request.
Permission ladder
JiraReadWrite + confirmWrite without confirm● model, people, systems, data  ● agent and harness  ● risk, stop, boundary

The ladder in the picture shows the order of granting rights. First read: the agent only looks. Then write with confirmation: the agent proposes, a person approves every write. Write without confirmation waits until trust has built up. Move up one step only when you have checked that the previous one works.

Takeaway
In this exampleThe agent reads prod, writes only to a test sheet and shows every write to a person.
In generalRights grow up the ladder: read first, then confirmed write. Unconfirmed write waits until trust is earned.
What to doGive a new server read-only and raise rights after a week of checked work.

Where to start

It is better to start small: one source, one person who checks, and read-only mode. Connect Jira, ask the agent five questions about real tasks and compare the answers with what you see yourself. That shows how far the agent can be trusted before you give it write rights.

JiraJira1One read-only server25 queries checked by hand3Write with confirmation● model, people, systems, data  ● agent and harness
Takeaway
In this exampleStart with Jira read-only and compare five agent answers with what you see yourself.
In generalOne source, one reviewer, one rights step at a time.
What to doConnect the first server today and note what the agent read correctly and what not.

Other cases

One approach works across tasks: the agent reads the sources and a person checks the result.

standSentryGrafanaQA: reproduce a bug →Reports: data from a database →Incidents: Sentry and Grafana →● model, people, systems, data  ● agent and harness  ● risk, stop, boundary
CaseSourcesWhat the agent doesWhat a human checks
QAJira, stand, browserreproduces a bug, narrows the path, writes a reportthe steps by hand on the stand
Reports and analyticsdatabase, sheets, documentscalculates with queries, assembles a summaryone number another way
IncidentsSentry, Grafanamatches errors, metrics and release timethe hypothesis against charts and events

How to read the table. Every row follows one order: the agent reads the sources, does the main work and brings a result, and a person checks it with one short action. In QA the steps of the report are repeated by hand on the stand. In analytics one number is recalculated another way. In incidents the hypothesis is compared with graphs and events. Details are in the articles behind the links.

Frequently asked questions

What problem does MCP solve?

Without MCP an agent knows only what it is told. MCP connects it to working systems, so it reads facts from the source.

How do you connect MCP?

Ask the agent to do the connection itself: it takes minutes, and the project scope puts the setting in the repo for the whole team.

Why are there fewer hallucinations with MCP?

When the answer is not in the context, the agent fills it with a guess. Every connected source fills that gap with facts.

What permissions should MCP grant?

Start with read access and grant write only where the task needs it.
Task PAY-142 is made up for the example.
© 2026 Egor Urvanov