Back to full roadmap
topiccore
MCP Server Development (Python/TS)
MCP server from scratch: expose tools + resources + prompts. 100 lines with the SDK.
5 hours2 resources1 prereqs
An MCP server exposes 3 primitives:
- Tools — functions the agent can call (like function calling)
- Resources — file/URL-like readable resources (e.g.
postgres://db/table) - Prompts — recommended prompt templates for the user
Python SDK example:
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("weather-server")
@mcp.tool()
def get_weather(city: str) -> str:
"""Get current weather for a city."""
return f"Sunny, 22°C in {city}"
if __name__ == "__main__":
mcp.run()
Add to Claude Desktop config: {"weather": {"command": "python", "args": ["server.py"]}} and start using.
What you'll gain
You can write an MCP server for your own use case and use it with Claude Desktop/Cursor.