se supone que ya
All checks were successful
build-and-push / build (push) Successful in 15s
build-and-push / deploy (push) Successful in 1s

This commit is contained in:
2025-05-02 22:08:38 -06:00
parent 0e1ab5f1c2
commit 01067c009f
3 changed files with 20 additions and 6 deletions

2
.dockerignore Normal file
View File

@@ -0,0 +1,2 @@
node_modules
npm-debug.log

View File

@@ -1,8 +1,19 @@
import { startServer } from '@modelcontextprotocol/server';
import { getTools } from './tools.js';
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import { z } from 'zod';
startServer({
tools: await getTools(),
name: 'mi-mcp',
const server = new McpServer({
name: 'mi-mcp-server',
version: '1.0.0'
});
server.tool(
'saludar',
{ nombre: z.string() },
async ({ nombre }) => ({
content: [{ type: 'text', text: `Hola, ${nombre}! 👋` }]
})
);
const transport = new StdioServerTransport();
await server.connect(transport);

View File

@@ -3,7 +3,8 @@
"version": "1.0.0",
"type": "module",
"dependencies": {
"@modelcontextprotocol/server": "^0.0.21"
"@modelcontextprotocol/sdk": "^1.11.0",
"zod": "^3.22.4"
}
}