Detailed Article
I made MCP (Model Context Protocol) alternative.
My alternative solution is utilizing LLM Function Calling feature, provided by Swagger/OpenAPI and TypeScript class functions, enhanced by compiler and validation feedback strategy. With these strategies, you can fully replace the MCP of Anthropic Claude to much smaller models like gpt-4o-mini
(Possible to replace to Local LLMs).
Below is a demonstration of my alternative solution, searching and purchasing product in a shopping mall. Its bacakend server is composed with 289 number of API functions, and I could call all of these API functions just by conversation texts in the gpt-4o-mini
model of 8b
parameters.
- Related Repositories
@samchon/openapi
: Swagger/OpenAPI to function calling schematypia
:typia.llm.application<Class, Model>()
function@nestia
: Type safe OpenAPI/MCP builder in NestJS@agentica
: Agentic AI framework utilizing above (coming soon)
- Shopping AI Chatbot Demonstration
@samchon/shopping-backend
: Backend server built by@nestia
ShoppingChatApplication.tsx
: Agent application code built by React.
import { Agentica } from "@agentica/core";
import { HttpLlm, OpenApi } from "@samchon/openapi";
import typia from "typia";
const agent = new Agentica({
service: {
api: new OpenAI({ apiKey: "*****" }),
model: "gpt-4o-mini",
},
controllers: [
HttpLlm.application({
model: "chatgpt",
document: OpenApi.convert(
await fetch(
"https://shopping-be.wrtn.ai/editor/swagger.json",
).then(r => r.json())
)
}),
typia.llm.application<ShoppingCounselor, "chatgpt">(),
typia.llm.application<ShoppingPolicy, "chatgpt">(),
typia.llm.application<ShoppingSearchRag, "chatgpt">(),
],
});
await agent.conversate("I wanna buy MacBook Pro");