Skip to main content

Accessing portal data with AI coding agents through skills

  • March 16, 2026
  • 0 replies
  • 6 views

I’ve been investigating options for accessing the data on our portal using AI assistants, mainly Claude code. I previously posted my experience of a REST to MCP adapter, which works, but is a bit clunky and not very token efficient. I have recently experimented with a new library called mcp2cli which enables the coding agent to use CLI commands to query data on our portal.

MCP2CLI can create a skill which introspects the swagger.json  - which is published under the portal’s API tab, to understand the explore API of the portal. This enables the coding agent to discover datasets, understand their structure and create SQL queries to return filtered and aggregated data. The skill is an alternative approach to MCP servers that is more token efficient due to progressive disclosure and the use of a command line interface to query the data. I iterated over creation of the skill several times to improve it.

My limited testing of the skill I created indicates that it is quite accurate and token - efficient. It also works on GitHub copilot as well as claude code, and I presume opencode, codex etc.

There’s a more in - depth description of this on my blog.