Use AmDital as an AI agent tool provider via the Model Context Protocol.
The Model Context Protocol (MCP) allows AI agents to discover and invoke tools from AmDital — creating tasks, querying workspaces, and managing tickets directly from chat.
The AmDital MCP server exposes the following tools to AI agents:
create_task — Create a task in a workspacecreate_ticket — Create a support ticketget_workspace_health — Check workspace statussearch_docs — Search workspace documentsPoint your MCP client to ${API_URL}/mcp with an AmDital API key. The server advertises available tools on connect.
Two practical patterns you will use in most MCP integrations with AmDital.
Register the AmDital MCP server and list available tools on connect. Use this when building a custom agent or IDE extension.
import { Client } from '@modelcontextprotocol/sdk/client/index.js'
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js'
// 1. Instantiate the client
const client = new Client({ name: 'my-integration', version: '1.0.0' })
// 2. Connect to the AmDital MCP server
await client.connect(
new StreamableHTTPClientTransport(
new URL('https://api.amdital.com/mcp'),
{ headers: { Authorization: `Bearer ${process.env.AMDITAL_API_KEY}` } }
)
)
// 3. Discover registered tools
const { tools } = await client.listTools()
console.log('Available tools:', tools.map(t => t.name))
// → ['create_task', 'create_ticket', 'get_workspace_health', 'search_docs', ...]Invoke a specific tool and handle the structured response. The AmDital MCP server returns typed JSON payloads for every tool call.
// Create a task in a workspace
const result = await client.callTool({
name: 'create_task',
arguments: {
workspaceId: 'ws_abc123',
title: 'Fix login redirect bug',
priority: 'high',
projectId: 'proj_xyz', // optional
},
})
// The result payload is strongly typed
if (result.content[0].type === 'text') {
const task = JSON.parse(result.content[0].text) as {
id: string
title: string
status: string
url: string
}
console.log('Created task:', task.url)
}
// Handle tool errors gracefully
if (result.isError) {
console.error('Tool call failed:', result.content[0].text)
}All tool inputs are validated server-side against the tool schema. Invalid arguments return a structured error in result.content rather than throwing.