MCP Servers Comprehensive Guide

SkillCloud & infra

Comprehensive guide to MCP (Model Context Protocol) servers — the standard for connecting AI agents to tools. Covers architecture, transport types, tool/resource/prompt primitives, security, and how to build, deploy, and discover MCP servers for any use case.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the MCP Servers Comprehensive Guide skill

What this skill tells your AI

The instructions your AI receives, as published by nirholas/three.ws in data/skills/development/mcp-servers-guide/SKILL.md and read by ahel’s review.

MCP (Model Context Protocol) is the open standard for connecting AI agents to tools. This guide covers everything from architecture to deployment.

What Is MCP?

AI Agent (Claude, GPT, etc.)
    │
    ▼
MCP Client (built into host app)
    │
    ▼
MCP Server (your tool/service)
    │
    ├── Tools (functions the agent can call)
    ├── Resources (data the agent can read)
    └── Prompts (templates for the agent)

Core Primitives

Tools

Functions the agent can execute:

server.tool('getTokenPrice', {
  description: 'Get the current price of a cryptocurrency',
  parameters: z.object({
    symbol: z.string().describe('Token symbol (e.g., SPA, ETH)'),
    currency: z.string().default('usd').describe('Target currency')
  }),
  handler: async ({ symbol, currency }) => {
    const price = await fetchPrice(symbol, currency);
    return { content: [{ type: 'text', text: `${symbol}: $${price}` }] };
  }
});

Resources

Data the agent can read:

server.resource('portfolio', {
  description: 'User DeFi portfolio',
  uri: 'portfolio://current',
  handler: async () => {
    const portfolio = await getPortfolio();
    return { content: [{ type: 'text', text: JSON.stringify(portfolio) }] };
  }
});

Prompts

Templates for the agent:

server.prompt('defi-analysis', {
  description: 'Analyze a DeFi protocol',
  arguments: [{ name: 'protocol', description: 'Protocol name' }],
  handler: ({ protocol }) => ({
    messages: [{
      role: 'user',
      content: `Analyze the DeFi protocol "${protocol}" covering TVL, APY, risks, and team.`
    }]
  })
});

Transport Types

TransportHow It WorksBest For
stdioCommand-line process (stdin/stdout)Local tools, CLI
SSEServer-Sent Events over HTTPRemote servers
Streamable HTTPHTTP with streamingWeb services

stdio Setup

{
  "mcpServers": {
    "my-tool": {
      "command": "npx",
      "args": ["@my/mcp-server"]
    }
  }
}

SSE Setup

{
  "mcpServers": {
    "my-tool": {
      "url": "https://mcp.example.com/sse"
    }
  }
}

Building an MCP Server

TypeScript (Recommended)

import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';

const server = new McpServer({
  name: 'sperax-defi',
  version: '1.0.0',
  description: 'Sperax DeFi tools'
});

// Add tools
server.tool('getUSdsAPY', {
  description: 'Get current USDs auto-yield APY',
  handler: async () => ({
    content: [{ type: 'text', text: 'USDs APY: 7.2%' }]
  })
});

// Start server
const transport = new StdioServerTransport();
await server.connect(transport);

Python

from mcp.server import Server
from mcp.server.stdio import stdio_server

server = Server("sperax-defi")

@server.tool("getUSdsAPY")
async def get_usds_apy():
    """Get current USDs auto-yield APY"""
    return "USDs APY: 7.2%"

async def main():
    async with stdio_server() as (read, write):
        await server.run(read, write)

Security Best Practices

PracticeDescription
Input ValidationValidate all tool parameters with Zod/schemas
Rate LimitingPrevent abuse with per-tool rate limits
API Key IsolationUse env vars, never hardcode secrets
Least PrivilegeEach tool gets minimum necessary permissions
Audit LoggingLog all tool invocations
Output SanitizationNever leak internal data in responses

Popular MCP Servers

ServerToolsStars
@nirholas/agenti-mcp380+ DeFi tools1.1K+
@nirholas/sperax-crypto-mcpSperax protocol200+
@nirholas/binance-mcpExchange trading400+
filesystemLocal file accessBuilt-in
brave-searchWeb searchBuilt-in

Links

Signals

GitHub stars
114
Forks
29
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
mcp-servers-guide
Source
github.com/nirholas/three.ws