mcp-server-devlisted
Install: claude install-skill arthjean/skills
# MCP Server Development — TypeScript SDK
## What is MCP
The **Model Context Protocol** is an open standard for connecting AI assistants (Claude, Cursor, etc.) to external tools and data. An MCP server exposes **tools**, **resources**, and **prompts** that clients can discover and invoke.
## Quick Setup
```bash
bun init
bun add @modelcontextprotocol/sdk zod
```
```typescript
// src/index.ts
import { McpServer } from '@modelcontextprotocol/server'
import { StdioServerTransport } from '@modelcontextprotocol/node'
import * as z from 'zod/v4'
const server = new McpServer({
name: 'my-mcp-server',
version: '1.0.0',
})
// Register a tool
server.registerTool(
'greet',
{
description: 'Greet a user by name',
inputSchema: z.object({
name: z.string().describe('Name of the person to greet'),
}),
},
async ({ name }) => ({
content: [{ type: 'text', text: `Hello, ${name}!` }],
})
)
// Start server with stdio transport
const transport = new StdioServerTransport()
await server.connect(transport)
```
```json
// package.json essentials
{
"type": "module",
"bin": { "my-mcp-server": "./dist/index.js" },
"scripts": {
"build": "tsc",
"start": "node dist/index.js"
}
}
```
## Three Primitives
| Primitive | Purpose | Client Action | Example |
|-----------|---------|---------------|---------|
| **Tools** | Execute actions, return results | LLM decides when to call | API calls, calculations, file ops |
| **Resources** | Expose read-only data