import { AGKitMCPServer } from '@ag-kit/tools/mcp';
import { tool } from '@ag-kit/tools';
import { z } from 'zod';
const weatherTool = tool(
async ({ city }) => {
return { city, temperature: 22, condition: 'sunny' };
},
{
name: 'get_weather',
description: 'Get weather information',
schema: z.object({
city: z.string().describe('City name')
})
}
);
const server = new AGKitMCPServer({
name: 'weather-service',
version: '1.0.0'
});
server.registerTool(weatherTool);
await server.run({ type: 'stdio' });