AdapTable MCP Server and CLI

View as Markdown

Summary

  • One package the Skills use to read the docs for the installed version, and to check Initial State, Expressions and setup
  • Install it in the project as a devDependency; the Skills find it by themselves
  • The same package can run as an MCP server, for work across many folders or before there is a project

AdapTable provides one package, @adaptabletools/adaptable-mcp, as part of its AI Resources. Installed in a project, the Skills and CI run it as the CLI. The same package can also run as an MCP server.

The Skills use that package to:

  • read the docs for the AdapTable version in the project
  • check Initial State and Expressions against that version
  • check how the project is set up

Caution

  • In a chat, you talk to the Agent Skills. They call this package
  • From a terminal, a pre-commit hook or CI, you run the MCP package yourself, as the CLI

The package runs in three ways, with the same results.

The first two are the CLI: use one of them.

The MCP server is optional, and a project can have it as well.

How it runsWhat you get
Installed in the project
  • Recommended for every project
  • The Skill runs it with no network, and the lockfile pins the version for the team and CI
  • All commands. CI uses this copy
Through npx
  • What the Skill does when the package is not installed
  • Needs no setup; asks the npm registry for the newest release on every call
MCP server
  • Optional. For work across many folders, before there is a project, or when the agent calls tools in-process
  • Configured once for your user, or in the project. About 4,500 tokens of tool definitions load into every chat
  • 12 of the 20 commands; the Skill runs the rest as the CLI. CI still uses the CLI

See CLI or MCP for the full comparison — speed, cost and the other trade-offs.

Important

Nothing is added to the application, and your code stays on your machine

Install the Agent Skills first. These tools need Node 22.20 or later.

Install and run

Developer Guide

Install the package

Do step 1 for a project. Step 2 is optional: run the same package as an MCP server, for work across many folders or when the tools should be in-process. A project can have both. CI uses the CLI from step 1.

1
For a project: install the package

Add the package as a devDependency at the repository root, and commit package.json and the lockfile. The Skills and CI run this copy as the CLI.

Terminal
npm i -D @adaptabletools/adaptable-mcp

The Skills run npx -y @adaptabletools/adaptable-mcp@^1, and npx runs this copy when the installed version is in that range, so:

  • each call starts in about half a second, with no network
  • the whole team and CI run the version the lockfile names
  • Dependabot or Renovate keep it up to date

In a monorepo, install it at the root, where the agent runs: a copy in a package folder is not seen from the root, and detect warns about it.

Hint

A global install (npm i -g) is not recommended: npx uses it only after asking the npm registry for the newest release, on every call, and nothing records which version each developer has

2
Optional: run the same package as an MCP server

The MCP server suits work across many folders, or before there is a project.

Add it as well as the project install, or on its own when there is no project yet.

Configure it once for your user, or in one project.

When it is configured, the Skills call its tools. Commands it does not expose still run as the CLI.

Click the button to open Cursor and add the MCP server:

Add AdapTable MCP Server to Cursor

Or add it to ~/.cursor/mcp.json for every folder (or .cursor/mcp.json for one project):

{
  "mcpServers": {
    "adaptable": {
      "command": "npx",
      "args": [
        "-y",
        "@adaptabletools/adaptable-mcp@latest",
        "mcp"
      ]
    }
  }
}

Restart the client and ask the agent which AdapTable tools it can see.

It should name tools from this package, including detect_environment, search_docs, check_state, check_expression and check_setup.

A user-level config starts the server outside any one project.

The Skill passes that project's folder on the tool call, so the check runs in the project the chat is about.

The config launches the latest release, which npx looks up each time the server starts: restart the client after a release to pick it up.

The Skills tell you when the server is behind.

Run the checks in CI

From a terminal, a pre-commit hook or CI, you run the MCP package yourself, as the CLI.

With the package installed, npx adaptable runs that copy.

A check exits 1 when it reports an error or a warning (info does not), so that run can fail on it:

Terminal
npx adaptable check setup npx adaptable check state src/adaptableOptions.ts --columns src/columnDefs.ts

The GitHub Actions job, the pre-commit hook and what a 21–23 project needs are in the Technical Reference.

Troubleshooting

Symptom

The agent cannot see the AdapTable tools

Suggested fix

The command in the MCP config must end in mcp, and the client must be restarted after the config is saved. Ask again which tools it can see; it should name detect_environment, search_docs and check_state.

Symptom

The tools are an older release

Suggested fix

The MCP config launches @adaptabletools/adaptable-mcp@latest, which npx looks up each time the server starts: restart the client. When the CLI was started through npx with a range such as ^1, the Skill names the npx cache folder to delete. Installing the package in the project avoids that cache.

Symptom

A check runs against the wrong folder

Suggested fix

A user-level MCP server starts outside the project. The Skill passes the project folder on the tool call. In a monorepo, install the package at the repository root, where the agent runs. When you run the CLI yourself, pass --cwd (or check setup --project) for the package that holds the grid.

Find Out More

See Technical Reference for every command, what it prints, JSON output, exit codes, offline cache and troubleshooting

FAQ

Does the MCP Server send my code anywhere? No, everything stays on your machine

Do I need both the CLI and the MCP server? No. It is one package. In a project, install it as a devDependency: the Skills run that copy as the CLI, and so does CI. The MCP server is optional, for work across many folders or before there is a project. Installing it as well is supported: the Skills then call its tools, and run the commands it does not expose as the CLI.

How do I keep it up to date? In a project, npm update @adaptabletools/adaptable-mcp, or let Dependabot or Renovate do it. Through npx, delete the npx cache folder the Skill names when that copy is behind. For the MCP server, restart the client. The Skills check the version on every task and tell you when it is behind.