#331 AI agents and MCP 6.7 min
Inside an MCP Server: How entity-intel-mcp Works
Ten tools, seven sources, and a gap is never reported as a no.
Read the whole reason
Copy the code folder first. Run python show.py norway. Then in show.py change [:78] to [:200] in the norway function and run it again. Say in one sentence what the longer text adds.
A hint
The first run cuts the detail line short. The reason is restricted access, not an empty list.
Print when each owner was notified
In show.py, in the chain function, add a line inside the loop that prints ed['notifiedOn'] and ed['active'] after each 'owns' line. Predict what two values you will see. Run python show.py chain.
A hint
Each edge in the recorded data carries these two fields. I saw 2016-04-06 and True for both edges.
List the names of the company
In show.py, in the entity function, add a loop before the 'legalForm' loop that prints n['kind'] and n['name'] for each n in e['names']. Predict how many names there are and what kinds they have. Run python show.py entity.
A hint
The names are in the recorded data under 'names'. I saw one legal name and two former names.
Find the tool that stays offline
This needs Node 22 and the server file, as in the video. In client.py, in the tools branch, replace the print line inside the loop with: if not a['openWorldHint']: print(t['name']). Predict which tool is printed. Run python client.py tools. No keys or network are used.
A hint
The video says only one tool never reaches the network. I saw check_coverage, then the line 10 tools.
These tasks are for you to try on your own machine. Nothing is checked or saved.
What this does not show
Lookups are answers recorded from one live run on 14 November 2026 (public data, one UK group and one Norwegian company); officer lookups and sanctions screening are not shown; the newest MCP spec read has dropped the initialize handshake this server still uses.
Up next in AI agents and MCP
More in AI agents and MCP
- #01 Local AI Agent in Python: No API Key (Ollama)
- #12 Multi-Agent Patterns in Plain Python: Pipeline, Router, Loop
- #22 OpenAI Agents SDK vs LangGraph vs Plain Python
- #23 Agent Memory: What to Keep and What to Forget
- #24 Approval Gates for Risky Agent Actions
- #25 Tool Errors: Retries, Fallbacks and Made-Up Answers