initial commit: slides ready + upgraded
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
# Integración MCP (Model Context Protocol)
|
||||
|
||||
<v-clicks>
|
||||
|
||||
### MCP en LangChain.js
|
||||
|
||||
Protocolo abierto que estandariza cómo las aplicaciones proporcionan tools y contexto a LLMs.
|
||||
|
||||
```typescript
|
||||
import { ChatOpenAI, tools } from "@langchain/openai";
|
||||
|
||||
const model = new ChatOpenAI({ model: "gpt-4.1" });
|
||||
|
||||
const response = await model.invoke("Roll 2d4+1", {
|
||||
tools: [
|
||||
tools.mcp({
|
||||
serverLabel: "dmcp",
|
||||
serverDescription: "A D&D MCP server for dice rolling",
|
||||
serverUrl: "https://dmcp-server.deno.dev/sse",
|
||||
requireApproval: "never",
|
||||
}),
|
||||
],
|
||||
});
|
||||
```
|
||||
</v-clicks>
|
||||
|
||||
Reference in New Issue
Block a user