How to Connect an AI Agent to French and Spanish Company Registers With MCP

How to give Claude, Cursor or any MCP client access to official French and Spanish company records, which tools to expose, and how to test the answers.

· By the Fuentio team · 7 min read

Share image: "How to Connect an AI Agent to French and Spanish Company Registers With MCP" on Fuentio's paper background, with the Tutorial label.

AI agents are now asked company questions all the time: is this supplier still active, what's this customer's registered office, who is behind this SIREN. Answered from the model's memory, those questions go wrong in predictable ways. Answered from an official register at the moment of the question, they can be checked. The Model Context Protocol (MCP) is the standard way to give an agent that kind of tool. This tutorial shows how to connect an agent to French and Spanish company records, which tools it needs, and how to test that it uses them well.

What you'll learn

  • Why an agent needs a tool for company facts
  • What an MCP server for company data should expose
  • How to connect it in Claude Code, Claude Desktop, Cursor and VS Code
  • How to write instructions so the agent uses the tool
  • Five test questions to run before you trust it

Why a tool, not memory

A language model learns from text gathered up to a date, then keeps answering long after. Companies cease, move and change names in the meantime, and common names hide many different companies. We showed real examples of each failure in why AI agents get company data wrong: a famous French company that ceased in 2021, a name search that returns 10,000 results, and invented numbers that fail their check digit.

A tool fixes this when it returns the official record, its source and the date it was checked, and when the agent passes those along in its answer.

What MCP is, in one paragraph

MCP is an open protocol that lets an AI application (the client: Claude, Cursor, VS Code and others) discover and call tools offered by a server. The server describes each tool, with its name, its purpose and its parameters; the model decides when to call one; the client runs the call and gives the result back to the model. One server works with every compatible client. For more, see what MCP is.

The tools a company-data server should expose

Keep the set small and the names obvious. For French and Spanish companies, three tools cover most questions:

ToolUse it whenInput
search_companiesYou only have a nameA country and a name
lookup_companyYou have a numberA country and a SIREN, SIRET, VAT number or Spanish registry sheet
list_coverageYou aren't sure what's coveredNothing

Each answer should start with one plain sentence the model can quote, then the full record with its source, its licence and the time it was checked. Errors should say what to do next: a malformed number, a well-formed number with no public record, a kind of identifier the server can't look up (such as a Spanish NIF, which the BORME doesn't publish), or an official source that isn't answering.

Connecting it

Fuentio's MCP server isn't open yet; its address is reserved and the setup page shows how it will connect. The steps are the same for any remote MCP server:

Claude Code adds a remote server with one command: claude mcp add --transport http <name> <server address>.

Cursor reads servers from ~/.cursor/mcp.json (or .cursor/mcp.json in a project), as an mcpServers object with a url for each server.

Claude Desktop and claude.ai add a remote server under Settings → Connectors → Add custom connector. VS Code (GitHub Copilot agent mode) reads .vscode/mcp.json.

Menu names change often; check each client's documentation for the current path.

Tell the agent how to use it

Connecting the tool isn't enough: the model must prefer it to its memory. Add a few lines to your system prompt, project rules or agent instructions:

For any fact about a French or Spanish company (existence, status,
name, legal form, address, officers, registered acts), call the
company tools. Never state a company fact from memory.
Prefer lookup by number. With only a name, search, then show the
candidates with their city and number and ask which one is meant.
Never write an identifier the tools didn't return.
Quote the source and the check date in your answer.
If the tools don't say something, answer "unknown".

These lines target the three failures directly: stale status, the wrong entity, invented numbers.

Five test questions

Run these before you trust the setup. Each one has a right answer you can check yourself on the Annuaire des Entreprises or the BORME.

  1. A ceased company. "Is PEUGEOT SA (SIREN 552 100 554) still active?" The right answer says it's ceased, with the date (16 January 2021 in Sirene), and cites the source.
  2. A common name. "What's the registered office of Renault?" The right answer either asks which Renault, or finds the company by number (SIREN 441 639 465) and says how it chose.
  3. A mistyped number. Give a SIREN with one digit changed. The right answer says the number is invalid, without inventing a company.
  4. A Spanish company by NIF. Give a Spanish tax number. The right answer explains that this identifier can't be looked up in the register, and asks for the exact name.
  5. Something not covered. Ask about a country you don't cover. The right answer says it isn't covered, after checking coverage, rather than guessing.

If the agent fails one, look at the transcript: did it call the tool, did it read the answer, did it keep the source? Fix the instructions, and test again.

Where agents still need people

A tool makes an agent's facts checkable. It doesn't make its decisions right. If an agent onboards customers or approves suppliers, keep a person on the uncertain cases: a name match with several candidates, a company in collective proceedings, a register that doesn't answer. For the wider pattern, see AI agents and reliable company data.

Fuentio's server will answer from INSEE Sirene and the State's company data for France, and from the BORME for Spain, with the source, licence and check time on every answer. Join the waitlist below to hear the day it opens.

See what we cover in France and Spain.

Frequently asked questions

Do I need to code to connect an MCP server?

No. Most clients take a server address in their settings or a small configuration file. Building your own server is a different job.

Which AI clients support MCP?

Among others, Claude Code, Claude Desktop and claude.ai, Cursor and VS Code with GitHub Copilot's agent mode. Check each client's documentation.

Why does the agent still answer from memory?

Usually because its instructions don't tell it to prefer the tool. Add explicit rules, and test with the five questions.

Can the agent look up a Spanish company by NIF?

Not from the commercial registry: the BORME doesn't publish the NIF. The agent should ask for the exact legal name.

Sources

← All articles · RSS feed