Skip to content
Integrating Enterprise App UIs into WorkBuddy with MCP Apps: A Hands-On Tutorial

Integrating Enterprise App UIs into WorkBuddy with MCP Apps: A Hands-On Tutorial

This tutorial demonstrates how to integrate enterprise application UIs into Tencent's WorkBuddy AI assistant using MCP Apps, covering the integration rationale, comparison with self-built agents, three integration methods, and a complete CRM example with code for tool registration, UI widget development, and form submission handling.

AI Large Model Application Practice
AI Large Model Application Practice
AI Large Model Application Practice

Tencent recently connected WorkBuddy with Enterprise WeChat, reflecting a broader industry expectation that office agents should go beyond personal email and document handling to participate directly in enterprise business processes. The article argues that personal productivity gains do not equal organizational efficiency, and proposes a collaboration model where the agent understands intent and plans steps, business applications provide context and execute tasks, and humans handle necessary review and takeover.

Why Integrate Enterprise Systems with WorkBuddy

The core logic is to let employees' AI tools, under organizational authorization and management, connect to enterprise systems to participate in business collaboration and undertake actual tasks. A sales visit scenario illustrates the pain point: salespeople must query CRM opportunities, check outstanding service tickets, review weekly meeting notes, and then compile a follow-up plan — information scattered across systems requiring constant switching, copying, and re-entry.

With WorkBuddy, the user can say: "Query my current opportunities, review this week's meeting notes, and create this week's follow-up plan." WorkBuddy calls relevant business tools, aggregates materials, and organizes a plan for review. The user can then say: "Prepare tomorrow's customer visit materials and enter the follow-up plan into CRM." After confirmation, the agent writes the plan via CRM APIs. The integration shines in cross-system material gathering, contextual judgment, and subsequent execution — WorkBuddy orchestrates task execution while enterprise systems store facts, enforce business rules, and perform professional operations.

Difference from Self-Built Shared Agent Systems

The article compares two approaches:

Self-built shared agent service : Suited for continuous operation around unified organizational processes (e.g., continuous lead intake, unified assignment, overdue reminders). Requires unified process, state management, scheduling, and runtime environment; tasks continue even if an employee goes offline or changes roles. Enterprise designs UI, orchestrates flow, and bears all development and ops work.

Integrating with WorkBuddy : Closer to employees' concrete daily tasks. Example: sales feed CRM customer data, local proposals, and Enterprise WeChat meeting notes to the agent, which combines them for the current task to organize materials and give suggestions. Reusing existing chat and task entry points lets development focus on business capability, permission, and UI adaptation.

A comparison across key dimensions:

Work Focus : Self-built — organizational process, shared agent; WorkBuddy — personal agent around immediate tasks

Context : Self-built — enterprise data, shared knowledge; WorkBuddy — primarily approved personal data

Execution Flow : Self-built — server-side, supports multi-user collaboration; WorkBuddy — local execution, primarily individual

Development Focus : Self-built — harness, UI, session, orchestration, scheduling, business services; WorkBuddy — business system connection and adaptation

Typical Tasks : Self-built — cross-system enterprise processes, shared agent capabilities; WorkBuddy — document processing, data analysis, personal work items

The two can combine: shared agents handle unified market research and opportunity generation, while employees advance specific customer follow-ups in WorkBuddy. Professional agents can also be wrapped as services and exposed via MCP to WorkBuddy. WorkBuddy's new "Projects" feature supports shared context and team collaboration with cloud-stored configuration, so desktop agents can access local environments without all data staying on-device.

Three Enterprise Application Integration Methods

Integration requires both ends to cooperate: the agent supports the invocation protocol; the enterprise app provides usable interfaces or entry points. Based on existing system interfaces and tools, three methods are considered:

Skill + CLI/Script : Write operation instructions into a Skill; the agent invokes CLI tools or scripts to access business systems and execute operations.

MCP Tools & MCP Apps : Wrap application APIs as MCP tools for agent invocation; when interactive UI is needed, add MCP Apps. Other agents can also be wrapped as tools and accessed via MCP.

Browser Automation : For legacy systems lacking usable interfaces, use browser automation to access pages and complete operations (e.g., WorkBuddy's Agent Browser skill).

MCP Apps: Tools with Interaction

For systems with existing APIs, MCP is preferred. If standard OpenAPI descriptions exist, open-source tools can generate MCP wrappers directly for further adjustment. For example, query-customer, read-opportunity, and log-follow-up capabilities become clearly purposed, well-parameterized tools callable by WorkBuddy and other MCP-supporting agents. WorkBuddy already supports calling MCP tools via connectors, letting employees use enterprise app capabilities in a single task and reducing app switching.

The challenge is interaction experience. Filtering data, comparing options, or filling follow-up forms via pure natural language often requires multiple rounds and is inconvenient. The solution: develop MCP Apps UIs for MCP tools, bringing forms and panels into WorkBuddy. Employees view data and complete operations in visual panels, advancing the current task.

How One Interaction Completes

User initiates a task in WorkBuddy, e.g., "Help me log a follow-up plan for customer XX."

WorkBuddy plans steps, identifies the UI resource linked in the CRM tool description, and invokes the corresponding MCP tool via the connector.

Read the UI resource, load the Widget in a sandbox (iframe), and pass tool results (e.g., basic customer info) to the interface for rendering.

Employee fills and confirms. The Widget uses the host's communication bridge (AppBridge) to call the MCP tool, submit data, and update the interface based on the response.

After interaction, WorkBuddy can end the task or proceed to subsequent steps.

Employees can verify and modify input before submission, view results after submission. The interactive UI appears in WorkBuddy, but business rules, data validation, and writes remain the responsibility of the enterprise application. A screenshot shows the MCP Apps side-panel interaction in WorkBuddy. The operation flow stays consistent with direct CRM use, but relevant data and UI now change with task execution, eliminating repeated switching between multiple applications.

CRM Example: Integrating a Business Capability

The article walks through "logging a customer follow-up plan" using MCP Apps to bring enterprise app UI into WorkBuddy.

Define Task, Wrap MCP Tools

Clarify tool inputs, outputs, and responsibilities. The query tool takes a customer identifier, returns customer info, opportunities, and open items, and links the logging form; a separate tool handles submission after the salesperson fills it. Three tools are implemented: crm_customer_workspace: Query and link workspace UI crm_create_followup: Create customer follow-up plan crm_list_followups: Query follow-up plan list

Core code for the first UI-enabled tool:

const uri = 'ui://crm-demo/customer-workspace.html';
registerAppTool(server, 'crm_customer_workspace', {
  inputSchema: { customerId },
  _meta: { ui: { resourceUri: uri } }
}, async args => ({
  content: [{ type: 'text', text: '客户工作台' }],
  structuredContent: await workspace(args.customerId)
}));
structuredContent

returns structured business data passed by the host to the UI for rendering. _meta.ui.resourceUri declares the associated UI resource, telling MCP Apps-capable hosts (WorkBuddy) to load the corresponding UI component when this tool is invoked.

Write Interface, Provide UI Resource

Organize customer summary and follow-up form into a Widget: upper half for verifying business context, lower half for logging the follow-up plan. Skeleton HTML:

<h3 id="customer-name"></h3>
<form id="followup-form">
  <input name="title" placeholder="跟进事项">
  <input name="owner" placeholder="负责人">
  <input name="dueDate" type="date">
  <button>保存跟进计划草稿</button>
</form>

After bundling HTML, styles, and interaction scripts, register the resource in the MCP Server so WorkBuddy can read the interface via the declared uri:

registerAppResource(server, '客户 UI', uri, {
  mimeType: RESOURCE_MIME_TYPE
}, async () => ({
  contents: [{
    uri, mimeType: RESOURCE_MIME_TYPE,
    text: html
  }]
}));

Here html is the full built HTML content; RESOURCE_MIME_TYPE is text/html;profile=mcp-app identifying MCP Apps interface resources. The uri must match the tool registration.

Bind Interaction, Enable Form Submission

When the salesperson submits, WorkBuddy forwards the tool call to write the follow-up plan into CRM. This uses the MCP SDK's callServerTool:

import { App } from '@modelcontextprotocol/ext-apps';
const app = new App({ name: 'CRM', version: '1.0.0' }, {});
app.ontoolresult = result => consume(result);
await app.connect();

form.onsubmit = async event => {
  event.preventDefault();
  // assemble argumentsValue from current form (omitted)
  consume(await app.callServerTool({
    name: 'crm_create_followup',
    arguments: argumentsValue
  }));
};

The form is the above form; on submit, argumentsValue is assembled from UI fields. callServerTool sends the save action to WorkBuddy to forward the tool invocation request (MCP Apps must route requests through the host application), then updates the frontend interface upon response. A diagram illustrates the flow.

Run End-to-End in WorkBuddy

After preparing tools and UI resources, start the MCP Server serving via Streamable HTTP. In WorkBuddy, add the corresponding MCP connector with the service address (e.g., https://crm.example.com/mcp, possibly requiring authentication). Once connected, test with: "Query a customer's info and help me log a follow-up plan." The workspace loads; you can view customer info and history, fill and submit a new plan, and verify the CRM save result — all within WorkBuddy. Combined with Enterprise WeChat entry points and WorkBuddy's project collaboration, this method threads scattered data and operations across systems into a single task: the employee states the goal, verifies information, completes interaction, and the enterprise application handles concrete business processing.

Summary and Outlook

Desktop agents can connect personal data, collaboration tools, and enterprise applications, reducing system switching and duplicate operations. Start with one high-frequency task, a set of business tools, and one interactive component: Agent plans steps and prepares materials; employee verifies and confirms; enterprise application executes business operations.

The CRM example demonstrates using MCP Apps to bring business capabilities and UI into the agent workflow. This extends to more scenarios: expense voucher verification, procurement quote comparison, ops troubleshooting evidence tracking, contract clause confirmation, business metric drill-down, and recruitment material organization. For office agents to truly integrate with enterprise apps, several issues need maturation:

Application openness (e.g., existing SaaS) and impact on business models

Identity authentication, tool authorization, and operation audit

Long-task progress management, interruption recovery, idempotency, and compensation

Unified connector distribution, version management, and execution tracing

As these capabilities improve, office agents are poised to become a major entry point for daily enterprise business.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Frontend DevelopmentAI agentsModel Context ProtocolCRM IntegrationWorkBuddyWidget DevelopmentMCP AppsEnterprise Application Integration
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.