INNER CODE UNIT · TypeScript

getAuthServer

Kong/volcano-agent-sdk · mcp/auth-server/server.ts:38

function getAuthServer() {
  const server = new McpServer({ name: 'auth-mcp', version: '1.0.0' });
  
  server.tool(
    'get_weather',
    'Get current weather for a city',
    { city: z.string().describe('City name') },
    async ({ city }) => {
      const weather = {
        'San Francisco': { temp: 65, condition: 'Foggy' },
        'New York': { temp: 72, condition: 'Sunny' },
        'London': { temp: 58, condition: 'Rainy' },
      }[city] || { temp: 70, condition: 'Clear' };
      
      return { 
        content: [{ 
          type: 'text', 
          text: JSON.stringify(weather) 

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…