Creativity · MCP — integration

MCP for Developers — building your first server

If you've used an MCP server, you're ready to build one. This guide walks through the two reference SDKs (TypeScript and Python), the protocol's three primitives, choosing between stdio and SSE transports, and wiring your server into Claude Desktop or another MCP client.

MCP facts

Kind
integration
Ecosystem
anthropic-mcp
Language
TypeScript / Python
Transports
stdio, sse, http

Capabilities

  • Define typed tools with JSON-schema input contracts
  • Expose resources (read-only data the model can fetch by URI)
  • Offer prompt templates the client can surface to users
  • Handle request/response over stdio or SSE transports

Install

npm i @modelcontextprotocol/sdk
# or
pip install mcp

Configuration

# Minimal TypeScript server
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import { z } from 'zod';

const server = new McpServer({ name: 'hello-mcp', version: '0.1.0' });

server.tool('greet',
  { name: z.string().describe('who to greet') },
  async ({ name }) => ({ content: [{ type: 'text', text: `Hello, ${name}.` }] })
);

await server.connect(new StdioServerTransport());

Frequently asked questions

Which SDK should I use for MCP?

Use the official TypeScript SDK (@modelcontextprotocol/sdk) if you're in Node, or the Python SDK (mcp) otherwise. Both are maintained by the MCP team and keep pace with the spec.

stdio vs SSE — which transport?

Use stdio for local servers that run as child processes of the client (Claude Desktop's default). Use SSE or HTTP for remote servers where network isolation, auth, or multi-tenant scaling matter.

Do I need to implement all three MCP primitives?

No. Most servers start with tools alone. Add resources when there's meaningful read-only data to expose, and prompts when you want to ship reusable templates with your server.

Sources

  1. MCP — TypeScript SDK — accessed 2026-04-20
  2. MCP — Python SDK — accessed 2026-04-20