MCP for an AI agentWhat problem it solves and how to delegate setup to the agent
MCP plugs an agent into GitLab, Jira, Confluence and meeting recordings. What problem it solves, how to set it up in minutes and delegate that to the agent itself, how it saves time and tokens and why the agent invents less.
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, and access to a 1C database in MCP for 1C.
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
A retelling or the system itself
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.
Our context and others
Our 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. 1C connects the same way: it is one more other context, covered in the MCP for 1C article.
What context is
Context is everything the model sees at the moment. What is not in the context, the agent does not know.
Context
Where the fact lives
The agent sees it
What happens
Our context: the conversation, project files
at once
an answer from data
Other context: GitLab, Jira, 1C, meeting recordings
through MCP
the agent fetches what it needs
Nowhere: in heads, in a closed system
no
a guess instead of a fact
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 our context.
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 handOfficial MCPMore
1CConfiguration code and accounting data: the agent reads real objects and numbers Without it: The agent invents methods and attributes that are not in the configuration and answers with numbers that are not in the databaseOpen MCP serversDetails
JiraTasks and requirements: what was really asked Without it: There is a lot to copy by hand and the change history gets lostOfficial 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 GitLabSame Atlassian MCPMore
tldvMeeting recordings: decisions that exist nowhere in text. In our 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 errorsRecording and open APIMore
GranolaAlso meeting recordings. It has an MCP, but in our 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 lostMCPMore
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 our 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.
it offers to give the agent access to Jira; you sign in and approve, and the agent never sees the password
3
The agent reads PAY-142
opens the task with its comments and retells them
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 hand
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
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
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.
The 25,000 cap can be raised with the MAX_MCP_OUTPUT_TOKENS environment variable, while the warning threshold is fixed.
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
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.
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
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
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
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.