# Build your own MCP server

> Give AI assistants access to your app or data through MCP.

- Category: Build agents · Difficulty: Advanced
- Estimated monthly cost: $0–$20/mo. Open-source SDK and Inspector are free; cost is your agent plan.
- Model: Claude Sonnet 5.5
- MCP servers: none
- Last checked: 2026-10-21 · Hands-on tested: no (built from official docs)
- Canonical: https://getagentloadout.com/loadouts/build-mcp-server/ · JSON: https://getagentloadout.com/data/loadouts/build-mcp-server.json

## Tools
- [Claude Code](https://claude.com/product/claude-code): Anthropic's agentic coding tool for the terminal and IDEs. Included in paid Claude plans. Pricing: Pro $20/mo ($17/mo billed yearly; 5-hour and weekly usage limits); Max 5x $100/mo (5x Pro usage per session); Max 20x $200/mo (20x Pro usage per session). Source: https://claude.com/pricing
- [MCP Inspector](https://github.com/modelcontextprotocol/inspector): Official visual tester for MCP servers. Pricing: Open source $0/mo (Run with npx). Source: https://github.com/modelcontextprotocol/inspector

## Starter prompt

```
Create a TypeScript MCP server with the official SDK that exposes these tools: <tools>. Validate inputs, return clear errors, add a README with a config snippet for Claude Code and Cursor, and test it with the MCP Inspector.
```

## Config (terminal)

```bash
# test any MCP server visually
npx @modelcontextprotocol/inspector
```

## Setup steps
1. Define 2-3 tools with clear names.
2. Build with the agent.
3. Test in the Inspector, then in a real client.

## Why this works
MCP lets one integration work across Claude, Cursor, Codex and more.

## Watch out
Treat every tool as an API: authenticate it and limit what it can do.

## Unverified
- Inspector command and SDK details not re-checked this cycle.

## Related loadouts
- [Discord bot in an afternoon](https://getagentloadout.com/loadouts/discord-bot/)
- [Personal research agent](https://getagentloadout.com/loadouts/research-agent/)
- [Production agent in TypeScript](https://getagentloadout.com/loadouts/ts-production-agent/)

Some links may be affiliate links; it never affects rankings. Rankings are never for sale.
