From Muse to TeGo: Bringing Cloud AI Agents into Real Work
Muse shows what a cloud-based personal agent can do. TeGo brings the same goal-driven approach into enterprise work, with digital employees, tools, and clear human oversight.
Published November 18, 2024. For current capabilities, see the product overview.
Let me start with a disclaimer: The official Model Context Protocol SDK is excellent. It’s well-designed, follows the specification precisely, and gives you complete control over the protocol. The Anthropic team has done an amazing job creating a solid foundation for MCP development.
But here’s the thing: being technically correct doesn’t mean being developer-friendly.
After building dozens of MCP servers for production use at Zhama, I’ve identified six fundamental problems with the current SDK that make it unsuitable for real-world, rapid development. This isn’t criticism for criticism’s sake - it’s an honest analysis of why we built @zhama/mcp-server and why you might need it too.
The official MCP SDK is protocol-first. It’s designed to give you direct access to the Model Context Protocol’s primitives: requests, responses, handlers, transports. This is great if you’re:
But it’s terrible if you’re:
Let me show you exactly what I mean.
Before you can build a simple calculator tool, you need to understand:
Server initialization and configuration
const server = new Server({
name: 'my-server',
version: '1.0.0'
}, {
capabilities: {
tools: {},
resources: {},
prompts: {}
}
});
Request schema types
import {
CallToolRequestSchema,
ListToolsRequestSchema,
ListResourcesRequestSchema,
ReadResourceRequestSchema
} from '@modelcontextprotocol/sdk/types.js';
Request handler registration
server.setRequestHandler(ListToolsRequestSchema, async () => {
// Return tool definitions
});
server.setRequestHandler(CallToolRequestSchema, async (request) => {
// Execute tool logic
});
JSON Schema for input validation
inputSchema: {
type: 'object',
properties: {
param1: { type: 'string' },
param2: { type: 'number' }
},
required: ['param1', 'param2']
}
Response formatting
return {
content: [{
type: 'text',
text: JSON.stringify(result)
}]
};
Transport layer setup
const transport = new StdioServerTransport();
await server.connect(transport);
That’s at least 6 different concepts just to build a “Hello World” tool.
import { createMCPServer, BaseTool, Tool } from '@zhama/mcp-server';
@Tool({
name: 'hello',
description: 'Say hello',
parameters: [
{ name: 'name', type: 'string', required: true }
]
})
class HelloTool extends BaseTool {
protected toolDefinition = {
name: 'hello',
description: 'Say hello',
parameters: []
};
protected async executeInternal(params: Record<string, unknown>): Promise<unknown> {
const { name } = params as { name: string };
return { greeting: `Hello, ${name}!` };
}
}
createMCPServer('hello-server', '1.0.0')
.enableTools()
.addTool(new HelloTool())
.runStdio();
Two concepts: Decorators and execution method. Everything else is handled automatically.
With the official SDK, your first tool takes 2-4 hours including learning time. With @zhama/mcp-server, it takes 5-10 minutes.
That’s not a small difference - it’s a 24x productivity improvement on your first day.
Let’s build the same feature with both approaches and count lines of code.
Official SDK Implementation: 156 lines
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import {
CallToolRequestSchema,
ListToolsRequestSchema,
Tool as MCPTool
} from '@modelcontextprotocol/sdk/types.js';
// Server setup
const server = new Server({
name: 'weather-server',
version: '1.0.0'
}, {
capabilities: {
tools: {}
}
});
// Tool definition
const weatherToolDefinition: MCPTool = {
name: 'get_weather',
description: 'Get current weather for a city',
inputSchema: {
type: 'object',
properties: {
city: {
type: 'string',
description: 'City name'
},
units: {
type: 'string',
description: 'Temperature units',
enum: ['celsius', 'fahrenheit'],
default: 'celsius'
}
},
required: ['city']
}
};
// List tools handler
server.setRequestHandler(ListToolsRequestSchema, async () => {
return {
tools: [weatherToolDefinition]
};
});
// Execute tool handler
server.setRequestHandler(CallToolRequestSchema, async (request) => {
if (request.params.name !== 'get_weather') {
throw new Error(`Unknown tool: ${request.params.name}`);
}
const { city, units = 'celsius' } = request.params.arguments as {
city: string;
units?: string;
};
try {
// Input validation
if (!city || typeof city !== 'string') {
throw new Error('City must be a non-empty string');
}
if (units && !['celsius', 'fahrenheit'].includes(units)) {
throw new Error('Units must be celsius or fahrenheit');
}
// Fetch weather data
const apiKey = process.env.WEATHER_API_KEY;
if (!apiKey) {
throw new Error('WEATHER_API_KEY not configured');
}
const tempUnit = units === 'fahrenheit' ? 'imperial' : 'metric';
const response = await fetch(
`https://api.openweathermap.org/data/2.5/weather?q=${encodeURIComponent(city)}&appid=${apiKey}&units=${tempUnit}`
);
if (!response.ok) {
if (response.status === 404) {
throw new Error(`City not found: ${city}`);
}
throw new Error(`Weather API error: ${response.status}`);
}
const data = await response.json();
// Format result
const result = {
city: data.name,
country: data.sys.country,
temperature: data.main.temp,
feels_like: data.main.feels_like,
condition: data.weather[0].main,
description: data.weather[0].description,
humidity: data.main.humidity,
wind_speed: data.wind.speed,
units: units
};
return {
content: [{
type: 'text',
text: JSON.stringify(result, null, 2)
}]
};
} catch (error) {
// Error handling
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
console.error('Weather tool error:', errorMessage);
return {
content: [{
type: 'text',
text: JSON.stringify({
error: errorMessage
})
}],
isError: true
};
}
});
// Server startup
async function main() {
try {
const transport = new StdioServerTransport();
await server.connect(transport);
console.error('Weather MCP server running on stdio');
} catch (error) {
console.error('Failed to start server:', error);
process.exit(1);
}
}
main();
@zhama/mcp-server Implementation: 47 lines
import { createMCPServer, BaseTool, Tool } from '@zhama/mcp-server';
import fetch from 'node-fetch';
@Tool({
name: 'get_weather',
description: 'Get current weather for a city',
parameters: [
{
name: 'city',
type: 'string',
description: 'City name',
required: true
},
{
name: 'units',
type: 'string',
description: 'celsius or fahrenheit',
required: false
}
]
})
class WeatherTool extends BaseTool {
protected toolDefinition = {
name: 'get_weather',
description: 'Get weather information',
parameters: []
};
protected async executeInternal(params: Record<string, unknown>): Promise<unknown> {
const { city, units = 'celsius' } = params as {
city: string;
units?: string
};
const apiKey = process.env.WEATHER_API_KEY;
if (!apiKey) throw new Error('WEATHER_API_KEY not configured');
const tempUnit = units === 'fahrenheit' ? 'imperial' : 'metric';
const response = await fetch(
`https://api.openweathermap.org/data/2.5/weather?q=${encodeURIComponent(city)}&appid=${apiKey}&units=${tempUnit}`
);
if (!response.ok) {
if (response.status === 404) throw new Error(`City not found: ${city}`);
throw new Error(`Weather API error: ${response.status}`);
}
const data = await response.json();
return {
city: data.name,
country: data.sys.country,
temperature: data.main.temp,
feels_like: data.main.feels_like,
condition: data.weather[0].main,
description: data.weather[0].description,
humidity: data.main.humidity,
wind_speed: data.wind.speed,
units
};
}
}
createMCPServer('weather-server', '1.0.0')
.enableTools()
.enableLogging('info')
.addTool(new WeatherTool())
.runStdio();
Result: 70% less code - and the @zhama/mcp-server version is more readable.
Every tool you build with the official SDK requires:
That’s 55-90 lines of boilerplate per tool.
With @zhama/mcp-server: 0 lines of boilerplate. Just write your business logic.
The official SDK leaves error handling entirely up to you. This means:
Input validation errors
if (!params.email || typeof params.email !== 'string') {
throw new Error('Invalid email parameter');
}
Business logic errors
try {
const result = await performOperation();
} catch (error) {
// What do you return here?
}
Response formatting
return {
content: [{
type: 'text',
text: JSON.stringify({ error: error.message })
}],
isError: true // Don't forget this!
};
Logging
console.error('Tool failed:', error); // Hope this is enough
In production, we found that error handling code often exceeds business logic code when using the official SDK. A typical tool looks like:
Only 25% of your code is actual functionality.
protected async executeInternal(params: Record<string, unknown>): Promise<unknown> {
// Just write your logic
// Errors are caught automatically
// Logging happens automatically
// Response formatting is automatic
const result = await performOperation(params);
return result; // That's it!
}
80-90% of your code is actual functionality.
The official SDK provides zero developer experience optimizations:
Official SDK: 4 places to update
// 1. Update schema
const toolDef = {
inputSchema: {
properties: {
existingParam: { type: 'string' },
newParam: { type: 'number' } // Add here
},
required: ['existingParam', 'newParam'] // And here
}
};
// 2. Update type definition
type ToolParams = {
existingParam: string;
newParam: number; // Add here
};
// 3. Update validation
if (typeof params.newParam !== 'number') { // Add here
throw new Error('newParam must be a number');
}
// 4. Update logic
const { existingParam, newParam } = params; // Use here
@zhama/mcp-server: 1 place to update
@Tool({
parameters: [
{ name: 'existingParam', type: 'string', required: true },
{ name: 'newParam', type: 'number', required: true } // Just add here
]
})
class MyTool extends BaseTool {
protected async executeInternal(params: Record<string, unknown>): Promise<unknown> {
const { existingParam, newParam } = params as {
existingParam: string;
newParam: number
};
// Use immediately - validation is automatic
}
}
As your MCP server grows, the official SDK’s problems compound:
Official SDK Structure
// server.ts - 800+ lines
// Tool definitions (150 lines)
const tool1Def = { /* ... */ };
const tool2Def = { /* ... */ };
// ... 8 more
// List handler (50 lines)
server.setRequestHandler(ListToolsRequestSchema, async () => {
return {
tools: [tool1Def, tool2Def, /* ... */]
};
});
// Execute handler (600+ lines)
server.setRequestHandler(CallToolRequestSchema, async (request) => {
switch (request.params.name) {
case 'tool1':
// 60 lines of logic + error handling
break;
case 'tool2':
// 60 lines of logic + error handling
break;
// ... 8 more cases
}
});
Problems:
@zhama/mcp-server Structure
// tools/tool1.ts (30 lines)
@Tool({ /* ... */ })
export class Tool1 extends BaseTool { /* ... */ }
// tools/tool2.ts (30 lines)
@Tool({ /* ... */ })
export class Tool2 extends BaseTool { /* ... */ }
// ... 8 more tool files
// server.ts (15 lines)
import { Tool1, Tool2, /* ... */ } from './tools';
createMCPServer('my-server', '1.0.0')
.enableTools()
.addTool(new Tool1())
.addTool(new Tool2())
// ... 8 more
.runStdio();
Benefits:
The official SDK is minimal by design. It doesn’t include production necessities:
Structured Logging
Metrics and Monitoring
Configuration Management
Graceful Shutdown
Rate Limiting
Caching
At Zhama, we run MCP servers that handle thousands of requests daily. Here’s what we need:
// What we want
createMCPServer('production-server', '1.0.0')
.enableLogging('info') // Structured logs
.enableMetrics() // Performance tracking
.enableRateLimit({ maxRequests: 100, windowMs: 60000 })
.enableCaching({ ttl: 300 })
.enableHealthCheck('/health')
.onShutdown(async () => {
// Cleanup
})
.addTool(new MyTool())
.runStdio();
Official SDK provides: None of this.
@zhama/mcp-server provides: Built-in logging, extensible for the rest.
Let me share actual numbers from our experience at Zhama:
Goal: Build 15 tools for Claude to help with customer support
This is why we built @zhama/mcp-server.
The fundamental issue is that the MCP SDK is a library (low-level primitives) when most developers need a framework (high-level abstractions).
Library (Official SDK):
Framework (@zhama/mcp-server):
// Library approach: You do everything
const server = createServer();
server.on('request', (req) => {
if (req.type === 'listTools') {
return handleListTools();
} else if (req.type === 'callTool') {
return handleCallTool(req);
}
});
// Framework approach: You provide business logic
@Tool({ name: 'my-tool', /* ... */ })
class MyTool extends BaseTool {
async executeInternal(params) {
// Just your logic
}
}
If you’re already using the official SDK, migration is straightforward:
npm install @zhama/mcp-server
Before:
server.setRequestHandler(CallToolRequestSchema, async (request) => {
if (request.params.name === 'my-tool') {
const result = await doSomething(request.params.arguments);
return {
content: [{ type: 'text', text: JSON.stringify(result) }]
};
}
});
After:
@Tool({ name: 'my-tool', /* ... */ })
class MyTool extends BaseTool {
protected async executeInternal(params: Record<string, unknown>) {
return await doSomething(params);
}
}
Before:
const server = new Server(/* ... */);
server.setRequestHandler(/* ... */);
const transport = new StdioServerTransport();
await server.connect(transport);
After:
createMCPServer('my-server', '1.0.0')
.enableTools()
.addTool(new MyTool())
.runStdio();
Plus: Immediate productivity gains on new tools.
✅ You’re building MCP infrastructure
✅ You need protocol-level control
✅ You’re implementing custom extensions
✅ You have very specific requirements
✅ You’re building your own framework
✅ You’re building business tools (99% of cases)
✅ You want to ship fast
✅ You value developer experience
✅ You’re building production services
✅ You have a team of developers
✅ You want maintainable code
Our goal at Zhama isn’t to replace the official SDK - it’s to build on top of it. @zhama/mcp-server uses the official SDK under the hood, adding the developer experience layer that’s missing.
We’re actively working on:
The Model Context Protocol is revolutionary. The official SDK is solid. But it’s designed for protocol implementers, not application developers.
If you’re building:
Official SDK:
@zhama/mcp-server:
The choice is clear.
Ready to escape boilerplate hell? Get started in 5 minutes:
npm install @zhama/mcp-server
Visit:
Built with ❤️ by Zhama - Because developers deserve better tools.
Have thoughts on this analysis? Join the discussion on GitHub or reach out at team@zhama.com
Muse shows what a cloud-based personal agent can do. TeGo brings the same goal-driven approach into enterprise work, with digital employees, tools, and clear human oversight.
TeGo v3.0.0 ships three things on the desktop: an always-on-top Mini Chat floating window, a unified Downloads center, and a fully rewritten Windows NSIS installer. This post focuses on the experience details and explains how the combination genuinely puts the digital avatar into daily work.
TeGo v3.0.0 ships 16 TeGo template skills covering the two highest-frequency industry chains: IT operations and cross-border e-commerce. Every skill comes with executable bash scripts — not 'prompt templates' but actually runnable. This post walks through every skill, the matching business workflows and how they integrate with per_user, template governance and BusinessMonitor.