Skip to main content
Version: v5.1

AI Service as MCP server

Overview#

The AI Service can act as an MCP Server. Using this approach, the AI Service can expose MCP Tools and enable external MCP clients such as Claude and GitHub Copilot, to directly call AI Service APIs.

Capabilities#

Note the following capabilities:

  • All Platform API read methods become MCP Tools.
  • External MCP clients can execute these tools automatically during conversations
  • The transport is streamable HTTP.

Authorization#

Authorization is via a new one-time API key mechanism which is issued by the Passport Service and will authorize client requests.

How to connect to MCP endpoint#

The AI Service can expose an MCP streamable HTTP endpoint.

MCP endpoint#

Connect to the endpoint listed below.

POST /aisvc/api/v1/stateless/mcp/tools?nsfilter=<namespace>[&filter=...][&_serviceName=...][&_name=...][&_type=...]

Query parameters#

ComponentTypeDescriptionRequired
nsfilterStringnamespaceYes
_servicenameStringPlatform API module name, such as IafItemSvc, IafFileSvc, IafNotification. Example for multiple values: _serviceName=IafItemSvc&_serviceName=IafFileSvcNo
_nameStringTool name, similar to _serviceName. It can have multiple values.No
_typeStringEither user_mcp_tool or system_mcp_toolNo
filterStringThe filter can be defined separately and you can refer to the ID here. If it is provided, then the inline criteria in the query parameter such as _type, _serviceName and _name will be ignored.No

Authorization header#

The Authorization header is mandatory for authentication and authorization. You can use the API Key for the namespace. Alternatively, you can use a bearer token.

How to configure MCP client#

This section lists sample code for connecting to GitHub Copilot and Claude Desktop.

GitHub Copilot#

To connect to GitHub Copilot, tefer to the sample code below.

{  "servers": {    "twinit": {      "url": "https://qa2-api.invicara.com/aisvc/api/v1/stateless/mcp/tools?nsfilter=test123_pQZvfbEE",      "type": "http",      "headers": {        "Authorization": "Basic base64(apiKey:secretKey)"      }    }  },  "inputs": []}

Claude Desktop#

To connect to Claude Desktop, refer to the sample code below.

{"mcpServers":{    "twinit": {      "type": "http",      "command": "npx",      "args": [        "-y",        "mcp-remote@latest",        "--header",        "Authorization": "Basic base64(apiKey:secretKey)",        "--header",        "mcp-protocol-version: 2025-06-18",        "https://qa2-api.invicara.com/aisvc/api/v1/stateless/mcp/tools?nsfilter=test123_pQZvfbEE"      ],      "env": {}    },}}