Targetprocess MCP Server

by aaronsb
Verified

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • Provides tools for interacting with Targetprocess, a project management and agile planning platform. Enables searching, creating, and updating entities (User Stories, Bugs, Tasks, Features, etc.), querying with complex filters, exploring data models and relationships, and handling authentication and API interactions.

目标进程 MCP 服务器

模型上下文协议 (MCP) 是一项标准,它使 AI 助手能够通过统一接口与外部工具和服务进行交互。MCP 服务器通过公开 AI 助手可用于完成任务的工具和资源来提供这些功能。

该 MCP 服务器提供与 Targetprocess(一个项目管理和敏捷规划平台)交互的工具。它使 AI 助手能够:

  • 搜索和检索目标流程实体(用户故事、错误、任务、功能等)
  • 使用适当的验证创建和更新实体
  • 查询具有复杂过滤器和包含项的实体
  • 检查并发现 Targetprocess 数据模型
  • 安全地处理身份验证和 API 交互

主要特点

  • 数据模型发现:探索和理解复杂的 Targetprocess 实现
  • 强大的查询功能:使用复杂的过滤器和包含功能来准确检索您需要的数据
  • 实体管理:创建并更新具有适当验证的实体
  • 关系探索:了解不同实体之间的关系
  • 错误处理:通过重试和信息消息进行强大的错误处理
  • 文档集成:内置访问 Targetprocess 文档

用例

这款 MCP 服务器在企业环境中尤其有用,因为 Targetprocess 可能需要处理数百万条记录,且这些记录具有复杂的架构和数据模型。常见用例包括:

  • 数据模型发现:映射并理解复杂的 Targetprocess 实现
  • 企业分析:提取并分析数百万条记录的数据
  • 跨系统集成:用作 Targetprocess 与其他系统之间的桥梁
  • 自定义报告:构建标准 UI 中不可用的专门报告
  • 批量操作:管理跨多个实体的大规模变更
  • 模式探索:发现复杂实现中的自定义字段和关系

有关详细示例和实施指南,请参阅USECASES.md

入门

递归克隆存储库以包含文档搜索工具:

git clone --recursive https://github.com/aaronsb/apptio-target-process-mcp.git cd apptio-target-process-mcp

开发资源

文档搜索

此存储库包含一个用于 Targetprocess 开发者文档的文档抓取/搜索器,作为子模块。您可以使用它快速搜索 Targetprocess 的文档:

# From the project root: pushd resources/target-process-docs && npm install && ./refresh-docs.sh && popd # First time setup # To search documentation (from any directory): pushd resources/target-process-docs && ./search-docs.sh "your search query" && popd # Example search: pushd resources/target-process-docs && ./search-docs.sh "entity states" && popd

搜索工具位于 resources/target-process-docs 中。我们在这里使用 pushd/popd 命令,因为:

  1. 该工具需要使用相对路径访问其数据库文件
  2. pushd 保存当前目录位置
  3. 临时更改工具目录以运行命令
  4. popd 会自动将您返回到之前的位置这种方法让您可以从任何目录运行搜索,同时确保该工具可以找到其数据库文件。

此工具提供了一种强大的本地搜索 Targetprocess 开发者文档的方法。搜索结果包含相关文档章节及上下文,方便查找特定的 API 详细信息或实施指南。

CI/CD 管道

该项目使用 GitHub Actions 进行自动构建:

  • 推送到main分支触发新的容器构建
  • 版本标签(v*. . )创建版本发布
  • 图像发布到 GitHub Container Registry

您可以使用已发布的图像:

docker run -i --rm \ -e TP_DOMAIN=your-domain.tpondemand.com \ -e TP_USERNAME=your-username \ -e TP_PASSWORD=your-password \ ghcr.io/aaronsb/apptio-target-process-mcp

环境变量

  • TP_DOMAIN :您的 Targetprocess 域(例如 company.tpondemand.com)
  • TP_USERNAME :您的目标进程用户名
  • TP_PASSWORD :您的目标进程密码

使用 Docker 进行本地开发

对于本地开发和测试,请使用提供的脚本:

  1. 构建本地镜像:

    注意:构建脚本默认使用 Docker 的静默模式来最小化日志输出。这样做的目的是减少与 Cline 等处理构建输出的工具交互时 AI 令牌的消耗。在静默模式下,完整的构建日志将保存到/tmp/apptio-target-process-mcp/docker-build.log 。使用--verbose标志可直接在终端中查看构建输出。

./scripts/build-local.sh # Quiet mode (default), logs to file ./scripts/build-local.sh --verbose # Full build output in terminal
  1. 运行本地镜像:
./scripts/run-local.sh
  1. 配置 Cline:编辑~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{ "mcpServers": { "targetprocess": { "command": "./scripts/run-local.sh", "disabled": false, "autoApprove": [] } } }

不使用 Docker 的本地开发

先决条件

  • Node.js 20 或更高版本
  • npm

设置

  1. 递归克隆存储库:
git clone --recursive https://github.com/modelcontextprotocol/targetprocess-mcp.git cd targetprocess-mcp

注意:克隆文档搜索工具子模块时还需要--recursive标志。

  1. 安装依赖项:
npm install
  1. 复制示例配置:
cp config/targetprocess.example.json config/targetprocess.json
  1. 使用您的 Targetprocess 凭证编辑config/targetprocess.json

建筑

npm run build

跑步

node build/index.js

API 功能

有关详细示例和常见用例,请参阅USECASES.md

MCP 服务器提供以下与 Targetprocess 交互的工具:

搜索实体

通过过滤和包含来搜索目标流程实体(用户故事、错误、任务、功能)。

{ "type": "UserStory", // Required: Entity type to search for "where": "EntityState.Name eq 'Open'", // Optional: Filter expression "take": 10, // Optional: Number of items to return (default: 100, max: 1000) "include": ["Project", "Team"] // Optional: Related data to include }

获取实体

获取有关特定实体的详细信息。

{ "type": "UserStory", // Required: Entity type "id": 123456, // Required: Entity ID "include": ["Project", "Team"] // Optional: Related data to include }

创建实体

在 Targetprocess 中创建一个新实体。

{ "type": "UserStory", // Required: Entity type to create "name": "Story Name", // Required: Entity name "description": "Details...", // Optional: Entity description "project": { // Required: Project to create in "id": 123 }, "team": { // Optional: Team to assign "id": 456 } }

更新实体

更新现有实体。

{ "type": "UserStory", // Required: Entity type "id": 123456, // Required: Entity ID "fields": { // Required: Fields to update "name": "New Name", "description": "New description", "status": { "id": 789 } } }

检查对象

通过 API 检查 Targetprocess 对象和属性。

{ "action": "list_types", // Required: Action to perform "entityType": "UserStory", // Required for some actions: Entity type to inspect "propertyName": "Description" // Required for some actions: Property to inspect }

性能考虑

处理可能包含数百万条记录的大型 Targetprocess 实例时:

  1. 使用特定查询:始终使用最具体的查询来限制结果集
  2. 限制结果大小:使用take参数来限制返回的结果数量
  3. 仅包含必要的数据:仅包含您实际需要的相关数据
  4. 考虑分页:对于大型结果集,在应用程序中实现分页
  5. 批量操作:对于批量操作,请考虑批量请求以避免 API 过载

LLM 整合

该MCP服务器可与支持模型上下文协议的各种AI助手一起使用:

有关配置和设置说明,请参阅llms-install.md

配置

可以通过环境变量或 JSON 配置文件来配置服务器。

配置文件格式

{ "domain": "your-domain.tpondemand.com", "credentials": { "username": "your-username", "password": "your-password" } }

执照

麻省理工学院

ID: r67qn2xf6t