| 1 | --- |
| 2 | name: mcp-builder |
| 3 | description: Design, build, configure, or debug Model Context Protocol servers for codewhale, including stdio and HTTP/SSE transports. |
| 4 | --- |
| 5 | |
| 6 | # MCP Builder |
| 7 | |
| 8 | Use this skill when the user asks to create, configure, or debug an MCP server |
| 9 | or tool integration. |
| 10 | |
| 11 | ## Design Rules |
| 12 | |
| 13 | - Prefer stdio MCP servers for local tools and HTTP/SSE for remote services. |
| 14 | - Keep tool schemas small, typed, and explicit. Return structured JSON where |
| 15 | possible. |
| 16 | - Put secrets in environment variables, never in committed config. |
| 17 | - For HTTP/SSE clients, send `Accept: application/json, text/event-stream` by |
| 18 | default unless the server explicitly requires something else. |
| 19 | - Add timeouts and clear error messages around external APIs. |
| 20 | |
| 21 | ## Codewhale Setup |
| 22 | |
| 23 | Common commands: |
| 24 | |
| 25 | ```bash |
| 26 | codewhale mcp init |
| 27 | codewhale mcp add my-server --command node --arg server.js |
| 28 | codewhale mcp add remote-server --url http://127.0.0.1:3000/mcp |
| 29 | codewhale mcp list |
| 30 | codewhale mcp validate |
| 31 | codewhale mcp tools |
| 32 | ``` |
| 33 | |
| 34 | HTTP/SSE entries can include per-server headers in `~/.codewhale/mcp.json` when |
| 35 | credentials or custom routing headers are required. |
| 36 | |
| 37 | ## Workflow |
| 38 | |
| 39 | 1. Define the service boundary and the minimum useful tools. |
| 40 | 2. Choose transport and credential handling. |
| 41 | 3. Implement the server using a maintained MCP SDK when available. |
| 42 | 4. Add the server with `codewhale mcp add` or edit `~/.codewhale/mcp.json`. |
| 43 | 5. Run `codewhale mcp validate`, then `codewhale mcp tools`. |
| 44 | 6. Test one happy path and one failure path before calling it done. |
| 45 |