Targetprocess MCP Server

2.0.0 · active · verified Sun Apr 19

This package provides an an open-source MCP (Model Context Protocol) server designed to act as a crucial bridge, allowing AI assistants to seamlessly integrate with and manage the Targetprocess project management platform. It exposes a comprehensive set of structured tools that empower AI assistants to query, create, and manage Targetprocess entities such as user stories, bugs, tasks, and features through natural language workflows. The current stable version is 2.0.0, indicating a mature state for handling LLM-driven interactions. Release cadence is not explicitly stated in the provided documentation, but the package appears actively maintained given its recent major version. Its key differentiator is its explicit focus on providing an LLM-friendly, tool-based interface, specifically designed for agents like Claude MCP AI, by abstracting the complexities of the Targetprocess API into a more accessible paradigm. This server is valuable for managing large-scale Targetprocess implementations and integrating with other systems. It requires Node.js version 20 or higher for operation.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to programmatically start the Targetprocess MCP Server as a child process, configuring it with necessary environment variables for connecting to your Targetprocess instance. It outlines the essential setup for a functional server instance that AI agents can then connect to and utilize.

import { exec } from 'node:child_process';
import path from 'node:path';

// IMPORTANT: Replace with your actual values or set as environment variables
// Generate an Access Token in Targetprocess: Settings -> Authentication and Security -> New Access Token
const TP_TOKEN = process.env.TP_TOKEN ?? 'YOUR_TP_TOKEN';
// Your Targetprocess API endpoint, e.g., 'https://your-instance.tpondemand.com'
const TP_BASE_URL = process.env.TP_BASE_URL ?? 'https://your-instance.tpondemand.com';
// Your Targetprocess User ID, typically found in your Targetprocess profile
const TP_OWNER_ID = process.env.TP_OWNER_ID ?? 'YOUR_TP_OWNER_ID';

if (!TP_TOKEN || !TP_BASE_URL || !TP_OWNER_ID) {
  console.error('ERROR: Environment variables TP_TOKEN, TP_BASE_URL, and TP_OWNER_ID must be set.');
  console.error('Please configure these either directly in this script or as system environment variables.');
  process.exit(1);
}

// Determine the path to the server's executable script.
// In a typical npm install, this might be in node_modules/targetprocess-mcp-server/build/index.js (after a build step)
// For local development from a repository, it's often the main script in the root.
// This example assumes it's within a local node_modules structure or a directly cloned repo.
const serverScriptPath = path.resolve(process.cwd(), './node_modules/targetprocess-mcp-server/build/index.js'); // Common for installed packages
// Alternatively, if running directly from a cloned repo for development:
// const serverScriptPath = path.resolve(process.cwd(), './index.js'); // Adjust based on actual project structure

const command = `node ${serverScriptPath}`;
const options = {
  env: {
    ...process.env,
    TP_TOKEN,
    TP_BASE_URL,
    TP_OWNER_ID
  }
};

console.log(`Attempting to start Targetprocess MCP Server with command: ${command}`);
const serverProcess = exec(command, options, (error, stdout, stderr) => {
  if (error) {
    console.error(`Server failed to start: ${error.message}`);
    return;
  }
  if (stderr) {
    console.error(`Server stderr: ${stderr}`);
  }
  console.log(`Server stdout: ${stdout}`);
});

serverProcess.stdout.on('data', (data) => {
  console.log(`[MCP Server] stdout: ${data}`);
});

serverProcess.stderr.on('data', (data) => {
  console.error(`[MCP Server] stderr: ${data}`);
});

serverProcess.on('close', (code) => {
  console.log(`Targetprocess MCP Server process exited with code ${code}`);
});

console.log('Targetprocess MCP Server initiated. Check console for startup logs.');
console.log('You will need an MCP client (e.g., LobeHub, Claude) to interact with the running server.');

view raw JSON →