Skip to main content
Glama
pa-code-mcp-server

pa-code-mcp-server

by tigeilen

pa-code-mcp-server

A standalone Model Context Protocol server for IBM Planning Analytics / TM1, extracted from the pa-code VS Code extension so it can run without the extension.

It exposes the TM1 model to any MCP-compatible LLM client as callable tools — both read (inspect cubes, dimensions, processes, rules, run MDX) and, in read/write mode, write / model-building (create dimensions, elements, consolidations, cubes, rules, TI processes, views, subsets; write cells; execute processes).

Local / proof of concept. Point read/write mode at a test database whose account has the rights the agent should have. Not a production, multi-user server.

Architecture

MCP client (Claude Desktop, …)
      │  stdio  or  Streamable HTTP
      ▼
pa-code-mcp-server ──REST──> TM1 / Planning Analytics
(read + write tools)
  • src/tm1/ — standalone TM1 REST client + read/write API (no VS Code, no pa-code dependency).

  • src/mcp/ — MCP tool registration (mode-gated, confirm-guarded), server factory.

  • src/index.ts — stdio transport (normal MCP launch).

  • src/http.ts — Streamable HTTP transport (loopback, optional bearer token).

Related MCP server: ibm-mq-mcp

Setup

Requires Node.js ≥ 20.

cd C:\VSCode\pa-code-mcp-server
npm install
copy .env.example .env      # then edit .env
npm run build

Fill in .env:

  • TM1: TM1_BASE_URL, TM1_AUTH_MODE (basic | cam | apikey), TM1_USER, TM1_PASSWORD, (TM1_CAM_NAMESPACE), TM1_SSL_REJECT_UNAUTHORIZED.

  • Mode: MCP_MODE = readonly (default) or readwrite.

Run

As an MCP server (stdio) — e.g. from Claude Desktop or any MCP client:

npm start

MCP client config example:

{ "mcpServers": { "tm1": { "command": "node", "args": ["C:/VSCode/pa-code-mcp-server/dist/index.js"], "env": { "MCP_MODE": "readwrite" } } } }

As an HTTP MCP server:

npm run start:http     # http://127.0.0.1:3900/mcp

Tools

Read (always): tm1_list_cubes, tm1_list_dimensions, tm1_list_processes, tm1_get_cube_dimensions, tm1_get_cube_rules, tm1_get_process_code, tm1_list_dimension_elements, tm1_list_hierarchies, tm1_list_views, tm1_list_subsets, tm1_execute_mdx, tm1_get_server_info.

Write (only in readwrite): tm1_create_dimension, tm1_create_hierarchy, tm1_add_elements, tm1_add_edges, tm1_delete_element, tm1_delete_dimension, tm1_create_cube, tm1_delete_cube, tm1_set_cube_rules, tm1_write_cell, tm1_write_cells, tm1_create_process, tm1_update_process, tm1_delete_process, tm1_execute_process, tm1_create_view, tm1_delete_view, tm1_create_subset, tm1_delete_subset.

Destructive/irreversible tools (deletes, cell writes, rule replacement, process execution) require a confirm argument equal to the exact target name.

Security notes

  • Read/write mode gives the agent the full TM1 rights of the configured account. Use a scoped test account.

  • TM1_SSL_REJECT_UNAUTHORIZED=false disables TLS validation (common for TM1 dev certs). Dev only.

  • The HTTP transport binds to loopback; set MCP_HTTP_TOKEN to require a bearer token.

License

MIT — Copyright (c) 2026 Tim Geilen. See LICENSE.

IBM, Planning Analytics and TM1 are trademarks of IBM Corp.; this project is not affiliated with or endorsed by IBM.

Available Tools

13 tools
tm1_execute_mdxA

Run a read-only MDX query (capped).

Inputs: mdx (required), maxCells.

tm1_get_cube_dimensionsC

Ordered dimensions of a cube.

Inputs: cubeName (required).

tm1_get_cube_gridA

Build a rows × columns value grid for an editable data-entry table. Returns JSON (rows, columns, values, updateable) that maps each cell back to a write tuple.

Inputs: cubeName (required), colElements (required), rowElements (required), colDimension (required), +4 more.

tm1_get_cube_rulesC

Rules text of a cube.

Inputs: cubeName (required).

tm1_get_process_codeC

Full source of a TI process.

Inputs: processName (required).

tm1_get_server_infoA

Static server configuration.

Inputs: no named parameters.

tm1_list_cubesC

List cubes.

Inputs: includeControl.

tm1_list_dimension_elementsB

List elements of a dimension hierarchy (capped).

Inputs: dimensionName (required), limit, hierarchyName.

tm1_list_dimensionsC

List dimensions.

Inputs: includeControl.

tm1_list_hierarchiesB

List hierarchies of a dimension.

Inputs: dimensionName (required).

tm1_list_processesB

List TI processes.

Inputs: includeControl.

tm1_list_subsetsC

List subsets of a dimension.

Inputs: dimensionName (required), hierarchyName.

tm1_list_viewsA

List views on a cube.

Inputs: cubeName (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 13 tools

    Disambiguation5/5

    Each tool maps to a distinct TM1 object or action: list_* enumerates resources, get_* retrieves specific detail, and execute_mdx/get_cube_grid cover querying versus grid-building. There is no meaningful overlap between tools.

    Naming Consistency5/5

    All tools follow the consistent tm1_<verb>_<object> pattern. List is used for collection enumeration, get for detail retrieval, and execute for running a query, so the verb choice is predictable and uniform.

    Tool Count5/5

    Thirteen tools is well within the ideal range for a domain-specific server. Each tool covers a meaningful part of browsing and querying a TM1 environment without unnecessary redundancy.

    Completeness3/5

    The read/exploration surface is strong: cubes, dimensions, hierarchies, processes, rules, MDX, and grid data are all covered. However, there are no write/update or process-execution tools, and the updateable grid has no corresponding save/commit tool, which is a notable gap for typical TM1 workflows.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      An MCP server that connects AI assistants to Anaplan's Integration API v2, enabling users to browse workspaces, manage model data, and execute bulk operations like imports and exports. It provides 25 structured tools to navigate model hierarchies and perform transactional tasks through natural language.
      70
      7
      MIT
    • F
      license
      A
      quality
      B
      maintenance
      Enables LLM clients to interact with IBM MQ by exposing management and messaging REST APIs as 15 MCP tools, covering queue manager queries, MQSC commands, object inspection, and message send/receive operations.
      15
      -