Lion Cipher Lab
Build your first MCP server: expose a security tool to an LLM (and test it with the MCP Inspector — no API key needed)
- AI Security
- Intermediate
- ~45 min
- Free · no account required
Why it matters
AI hosts are only as useful as the tools you let them reach. MCP (Model Context Protocol) is the emerging standard for that wiring — build the integration once as a server and any MCP-aware host can use it, instead of re-coding it for every app. For security work that's huge: it's how you safely hand an LLM a lookup, an enrichment, or a check without pasting data around by hand. Learning to build one small server — and to judge when you should — is the core skill behind every 'AI that can actually do things' workflow.
What you'll learn
- Model Context Protocol (MCP) basics
- building an MCP server with the Python SDK
- the @mcp.tool() / FastMCP pattern
- stdio transport
- testing tools with the MCP Inspector
- judging when a tool should be an MCP server vs a plain script
- least-privilege thinking when handing an LLM a tool
Steps in this lab
- What MCP is, in plain terms
- Tools vs resources vs prompts, and the two transports
- When an MCP server is the right shape — and when a script is enough
- Set up an isolated environment and install the SDK
- Write the server: one small, SAFE security tool
- Test it with the MCP Inspector — no API key needed
- The security stakes — before you hand an LLM anything real
- Do it better: connect a real AI host (optional, still free)