Documentation · MCP
Connect Affine to your assistant
Connect Affine once and your assistant can research the legislation and case law for your jurisdictions, and cite what it used. This page is the whole of it: what you need first, the steps for each assistant, what the five tools do, and where the edges are. For what the connection is and why it exists, see the MCP overview; when something is broken, go to MCP support.
https://mcp.affine.neuralshift.ai/mcp1Before you start
Two things have to be true. The first is the one that catches people.
- An Affine account you have already used. Sign in at affine.neuralshift.ai at least once and finish the setup steps, including choosing your jurisdictions. Until you do, the connection politely refuses to work — your jurisdictions are what tell Affine which sources to search.
- An assistant that supports connectors. In ChatGPT and Claude this is a paid-plan feature. If you cannot find the menus described below, check your plan with the provider — or use Microsoft 365 Copilot, where Affine is installed for you by your organisation.
2Set up the connection
You do this once per assistant. Nothing is installed on your machine — you are pasting an address and signing in.
Claude
- Open Settings → Connectors.
- Choose Add custom connector.
- Paste
https://mcp.affine.neuralshift.ai/mcpand confirm. - Click Connect. A sign-in window opens — sign in with your Affine account (if your organisation uses Microsoft accounts, choose Sign in with Microsoft), then allow access.
- The connector appears in the list as Affine.
In a new conversation, open the tools menu — the icon next to the message box — and make sure Affine is switched on.
ChatGPT
Adding a connection yourself requires developer mode, which is switched off by default.
- Open Settings → Apps & Connectors (called Connectors in some versions).
- Open Advanced settings and turn on Developer mode.
- Go back to Apps & Connectors and choose to create a new connection manually, using an MCP address.
- Paste
https://mcp.affine.neuralshift.ai/mcpand confirm. - Sign in with your Affine account when prompted, and allow access.
- Affine now appears among your apps and connectors.
ChatGPT often prefers to search the web unless you point it at Affine. The reliable way is to type @Affine in your message.
Microsoft 365 Copilot
There is nothing to paste — Affine is published to your organisation.
- Open Microsoft 365 Copilot.
- Go to Agents and look for Affine in your organisation's list.
- Add it. The first time you use it, sign in with your Affine account.
- Start a chat with the Affine agent and ask your question.
- From then on you can also reach it from any Copilot chat by typing @Affine and picking it from the list.
3Your first question
There is nothing to prime and no set-up message to send. Ask a real question — the kind you would put to a colleague — and name Affine so it doesn't get answered from memory:
- In ChatGPT and Microsoft 365 Copilot, type @Affine and pick it from the list.
- In Claude, switch Affine on in the tools menu and start with “Using Affine, …”.
What happens next, in order:
- Your assistant hands the question to Affine — as you asked it, not reduced to keywords.
- Affine checks it is you. Every call carries your own sign-in, and reaches exactly the public sources your account's jurisdictions cover.
- Your jurisdictions and sources are applied on our side, from your account. Neither you nor your assistant has to supply them.
- Affine researches: it searches, opens documents, cross-checks them and writes a cited report. This takes longer than a normal reply — commonly a minute or two. A long silence is the tool working, not failing.
- Your assistant answers, with the documents it relied on attached as citations you can open.
4Tools
Connecting Affine gives your assistant five tools, and the list is the same for every user — it does not change with your plan, your jurisdictions or your role. All five only read: nothing in Affine can be created, changed or deleted from a conversation.
One of them answers questions; the other four go deeper on a single document.
| Tool | What it does | Reach for it when |
|---|---|---|
research | Runs a full research pass over your sources — searching, reading and cross-checking documents — and writes a cited answer. | Any real legal, tax or regulatory question. This is the starting point. |
find_document | Looks a document up by its name or number. | You name a document rather than ask a question. |
read_document | Returns the full text of one document. | The exact wording matters, or you want the context around a citation. |
search_in_document | Finds the passages of one document that bear on a question, by meaning. | You have the right document but not the right paragraph. |
grep_document | Finds an exact string inside one document. | You want a specific article number, defined term or citation. |
Every document that comes back carries an identifier — law_pt.1974376 and the like — and a ready-made citation link. That identifier is how the last four tools are pointed at a document: your assistant copies it from an earlier result, so you never need to see or type one.
researchthe one that answers
The entry point, and the only tool that answers a question end to end. Given your question, it searches your sources on its own, opens the documents that matter, resolves conflicts between them and writes a report in which every substantive statement carries an inline citation. It comes back with the list of documents it relied on.
- Your question is passed as you asked it — not reduced to keywords, not translated. Constraints you mention (a date, a particular law, your own situation) are part of the question and scope the research.
- Your jurisdictions and source set are applied on Affine's side, from your account.
- It runs several searches and reads before answering, so it takes noticeably longer than a lookup — up to a few minutes. That is normal.
- If it finds nothing, it says so rather than filling the gap from the assistant's own knowledge.
- It reaches public legal sources only.
find_documentlocate a document by name
Use it when you name a document your assistant has not seen yet — “the Portuguese Labour Code”, “Lei n.º 7/2009”. It returns matching documents as references — title, date, aliases, identifier — not their contents; reading one is the next step. It searches public legal sources only, never your private documents.
read_documentthe full text
Returns one document's real text, so the assistant quotes the wording rather than a summary of it. The text comes back with line numbers, alongside the document's metadata and — where the source has structure — an outline of its sections and the lines each one covers. Long documents arrive in windows the assistant can page through, or jump within by going straight to a section.
In assistants that render inline app content — Microsoft 365 Copilot and ChatGPT — a document opened this way also appears as a readable panel in the conversation, laid out the way that source should look, rather than as a wall of text. Portuguese legislation and case law, EU legislation and Court of Justice rulings in Portuguese, Spanish consolidated legislation and Portuguese arbitral decisions have their own layouts today; other sources render plainly.
search_in_documentfind the relevant passages
Semantic search inside one document: it ranks that document's passages by how well they bear on a question. Use it when you have the right document but not the right part of it — the cited excerpt was too thin, or you want to see how a point is treated across the text. Up to five questions can be put to the document at once.
It returns ranked excerpts, not the whole text, each placed in the document's structure — which matters in case law, where whether a passage is the court's decision or a party's allegation changes what it is worth.
grep_documentfind exact text
Exact matching inside one document, for when meaning is not what you want: an article number, a defined term, a specific phrase or citation. Matches come back as numbered lines, optionally with the lines around them, and each is situated in the document's structure.
The line numbers line up with read_document, so a hit can be opened in place. Grep to find it, read to see it in context.
5Getting better answers
- Call Affine by name. Left to themselves, assistants decide which tools to use, and often guess wrong. @Affine in ChatGPT and Copilot; the tools menu plus “Using Affine, …” in Claude.
- Ask one question at a time. Split a multi-part question into separate messages; each gets a properly researched answer.
- Say the jurisdiction when it is not your usual one — “in Spain”, “under EU law”.
- Ask for the source. “Which article says that?” or “Quote the exact wording.” The assistant can open the document and read the real text.
- Ask for the current status. “Is this still in force?” or “Has it been amended?”
- Ask a real question rather than naming a tool. A substantive question goes through
researchon its own; phrases like “research this properly” reinforce it. It takes longer, and that is the point. - Follow up on a single document. Once an answer cites something, “quote me article 12 of that” or “what else does that decision say about notice periods” keeps the assistant inside the document it already found, which is quicker than a fresh research pass.
- Check the citations. The assistant supports your judgement; it does not replace it.
6Citations
Every document Affine returns carries a ready-made citation link, built by Affine rather than composed by the assistant, and the assistant is told at every turn to reproduce those links exactly and to list its sources at the end of an answer.
That is strong steering, not a guarantee. In practice:
- An answer with no citations to legal documents should be treated as unverified, however confident it sounds. Ask “which article says that?” or “search Affine and cite the articles you used”.
- Citation links point to the document, not yet to the exact passage inside it. To get to the passage, ask the assistant to quote it — it can open the document and read the real text, down to the line.
- For anything high-stakes, open the cited document and read it. Affine grounds the answer in real sources; the legal judgement stays yours.
7What it cannot do
Deliberate limits, so none of them is a surprise mid-matter. Through your assistant, Affine:
- reaches public legal sources only. Your private documents, uploads, projects and audio transcripts are not in reach from a conversation. Use the Affine app for those.
- cannot act for you. No editing documents, sending emails or saving files — there is no write path at all.
- covers the law as it stands today. Documents no longer in force, and earlier versions of a consolidated document, are not reachable yet — so a repealed article, or the wording as it read a few years ago, will not come back.
- takes minutes on a researched answer, and some assistants give up first. Where the assistant's own timeout is shorter than the research pass, you see a failure rather than a partial answer. Asking once more usually works; resending while it is still running does not.
- shows no progress along the way. You cannot watch the intermediate searches; the report arrives whole.
- renders one kind of panel. Only a document opened with
read_documentappears as a styled panel, and only in assistants that support inline app content. Everything else is text. - does not have structure for every source. Outlines, section labels and per-section navigation exist where the source provides them; elsewhere a document is one long run of text.
Coverage differs from source to source, and very recent publications may not be there yet — the Sources page lists everything currently connected. When a date matters, ask the assistant for the document's date and whether it is still in force; it can check.
8Privacy
- It runs under your own Affine login. The chatbot (ChatGPT, Claude, Copilot) can only reach the public legal sources your account's jurisdictions cover — no more, no less.
- Only the question travels. To answer you, your assistant sends Affine the question or search terms it needs to look up, and Affine returns the matching legal documents.
- Affine has no access to your other conversations in ChatGPT, Claude or Copilot.
- Your private documents in Affine are never exposed through this connection.
- Your questions are never used to train models, shared with other clients or aggregated.
The Security page covers how Affine handles your data in general, and the Privacy Notice is the formal version.
9Need help?
MCP support covers the problems we see most often — an assistant that never mentions Affine, a sign-in that loops, an answer about the wrong country — and what each message means. If none of it matches, write to general@neuralshift.ai and a person will take it from there.