How we built an MCP server from scratch