mcp-ai mcp
v1.0.0 · MCP Tool · ai · registry.pascalai.org
Generic AI inference abstraction: chat, text completion, vision and tool-use across multiple providers (OpenAI, Anthropic, Cohere, etc.).
aillmchatgptclaudeinference
Input Parameters
| Parameter | Type | Description |
| providerrequired |
string |
One of: openai, anthropic, cohere, mistral, groq, together, perplexity, ollama. Default: openai. |
| api_keyrequired |
string |
|
| modelrequired |
string |
|
| operationrequired |
string |
One of: chat, complete, embed, vision. |
| messagesoptional |
array[object] |
|
| promptoptional |
string |
|
| systemoptional |
string |
|
| image_urloptional |
string |
|
| max_tokensoptional |
integer |
Default: 1024. |
| temperatureoptional |
number |
Default: 0.7. |
| streamoptional |
boolean |
Default: False. |
Output Fields
| Field | Type | Description |
| content |
string |
|
| model |
string |
|
| provider |
string |
|
| usage |
object |
|
| embeddings |
array[number] |
|
Examples
Chat with any LLM
// Input
{
"provider": "openai",
"api_key": "sk-xxx",
"model": "gpt-4o",
"operation": "chat",
"messages": [
{
"role": "user",
"content": "Summarize the key benefits of microservices."
}
]
}
// Output
{
"content": "Microservices offer...",
"model": "gpt-4o"
}
Install & Discovery
Install
ppm install mcp-ai
Get JSON Schema
GET /v1/packages/mcp-ai/1.0.0/schema
Discover by keyword
GET /v1/mcp/discover?q=ai
Discovery hint: Install with ppm install mcp-ai or invoke remotely via POST /v1/invoke/mcp-ai on the MCP Service.
PascalAI Usage
uses toolslib;
var Tool := LoadTool('mcp-ai');
var R := Tool.Call(JsonObj([]));
Writeln(R.ToJSON);