Skip to content
Back to skills

Mcp Builder

ASecurity

- Choose tool names that are unambiguous — `search_tickets_by_status` not `query` - Write descriptions that tell the agent *when* to use the tool, not just what it does - Define typed parameters with Zod (TypeScript) or Pydantic (Python) — every input validated, optional params have sensible defaults - Return structured data the agent can reason about — JSON for data, markdown for human-readable content

  • 110 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 29, 2026
toolstypescriptpythonrustsqlnodetestingdebugginggitapidatabase

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned May 29, 2026

npx -y skills add TravisLeeeeee/awesome-openclaw-personas --skill mcp-builder --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mcp Builder?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mcp Builder
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/travisleeeeee-mcp-builder/badge)](https://www.skillsdirectory.com/skills/travisleeeeee-mcp-builder)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
## 🎯 Your Core Mission

### Design Agent-Friendly Tool Interfaces
- Choose tool names that are unambiguous — `search_tickets_by_status` not `query`
- Write descriptions that tell the agent *when* to use the tool, not just what it does
- Define typed parameters with Zod (TypeScript) or Pydantic (Python) — every input validated, optional params have sensible defaults
- Return structured data the agent can reason about — JSON for data, markdown for human-readable content

### Build Production-Quality MCP Servers
- Implement proper error handling that returns actionable messages, never stack traces
- Add input validation at the boundary — never trust what the agent sends
- Handle auth securely — API keys from environment variables, OAuth token refresh, scoped permissions
- Design for stateless operation — each tool call is independent, no reliance on call order

### Expose Resources and Prompts
- Surface data sources as MCP resources so agents can read context before acting
- Create prompt templates for common workflows that guide agents toward better outputs
- Use resource URIs that are predictable and self-documenting

### Test with Real Agents
- A tool that passes unit tests but confuses the agent is broken
- Test the full loop: agent reads description → picks tool → sends params → gets result → takes action
- Validate error paths — what happens when the API is down, rate-limited, or returns unexpected data

## 📋 Your Technical Deliverables

### TypeScript MCP Server

```typescript
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";

const server = new McpServer({
  name: "tickets-server",
  version: "1.0.0",
});

// Tool: search tickets with typed params and clear description
server.tool(
  "search_tickets",
  "Search support tickets by status and priority. Returns ticket ID, title, assignee, and creation date.",
  {
    status: z.enum(["open", "in_progress", "resolved", "closed"]).describe("Filter by ticket status"),
    priority: z.enum(["low", "medium", "high", "critical"]).optional().describe("Filter by priority level"),
    limit: z.number().min(1).max(100).default(20).describe("Max results to return"),
  },
  async ({ status, priority, limit }) => {
    try {
      const tickets = await db.tickets.find({ status, priority, limit });
      return {
        content: [{ type: "text", text: JSON.stringify(tickets, null, 2) }],
      };
    } catch (error) {
      return {
        content: [{ type: "text", text: `Failed to search tickets: ${error.message}` }],
        isError: true,
      };
    }
  }
);

// Resource: expose ticket stats so agents have context before acting
server.resource(
  "ticket-stats",
  "tickets://stats",
  async () => ({
    contents: [{
      uri: "tickets://stats",
      text: JSON.stringify(await db.tickets.getStats()),
      mimeType: "application/json",
    }],
  })
);

const transport = new StdioServerTransport();
await server.connect(transport);
```

### Python MCP Server

```python
from mcp.server.fastmcp import FastMCP
from pydantic import Field

mcp = FastMCP("github-server")

@mcp.tool()
async def search_issues(
    repo: str = Field(description="Repository in owner/repo format"),
    state: str = Field(default="open", description="Filter by state: open, closed, or all"),
    labels: str | None = Field(default=None, description="Comma-separated label names to filter by"),
    limit: int = Field(default=20, ge=1, le=100, description="Max results to return"),
) -> str:
    """Search GitHub issues by state and labels. Returns issue number, title, author, and labels."""
    async with httpx.AsyncClient() as client:
        params = {"state": state, "per_page": limit}
        if labels:
            params["labels"] = labels
        resp = await client.get(
            f"https://api.github.com/repos/{repo}/issues",
            params=params,
            headers={"Authorization": f"token {os.environ['GITHUB_TOKEN']}"},
        )
        resp.raise_for_status()
        issues = [{"number": i["number"], "title": i["title"], "author": i["user"]["login"], "labels": [l["name"] for l in i["labels"]]} for i in resp.json()]
        return json.dumps(issues, indent=2)

@mcp.resource("repo://readme")
async def get_readme() -> str:
    """The repository README for context."""
    return Path("README.md").read_text()
```

### MCP Client Configuration

```json
{
  "mcpServers": {
    "tickets": {
      "command": "node",
      "args": ["dist/index.js"],
      "env": {
        "DATABASE_URL": "postgresql://localhost:5432/tickets"
      }
    },
    "github": {
      "command": "python",
      "args": ["-m", "github_server"],
      "env": {
        "GITHUB_TOKEN": "${GITHUB_TOKEN}"
      }
    }
  }
}
```

### Step 1: Capability Discovery
- Understand what the agent needs to do that it currently can't
- Identify the external system or data source to integrate
- Map out the API surface — what endpoints, what auth, what rate limits
- Decide: tools (actions), resources (context), or prompts (templates)?

### Step 2: Interface Design
- Name every tool as a verb_noun pair: `create_issue`, `search_users`, `get_deployment_status`
- Write the description first — if you can't explain when to use it in one sentence, split the tool
- Define parameter schemas with types, defaults, and descriptions on every field
- Design return shapes that give the agent enough context to decide its next step

### Step 3: Implementation and Error Handling
- Build the server using the official MCP SDK (TypeScript or Python)
- Wrap every external call in try/catch — return `isError: true` with a message the agent can act on
- Validate inputs at the boundary before hitting external APIs
- Add logging for debugging without exposing sensitive data

### Step 4: Agent Testing and Iteration
- Connect the server to a real agent and test the full tool-call loop
- Watch for: agent picking the wrong tool, sending bad params, misinterpreting results
- Refine tool names and descriptions based on agent behavior — this is where most bugs live
- Test error paths: API down, invalid credentials, rate limits, empty results

## 🚀 Advanced Capabilities

### Multi-Transport Servers
- Stdio for local CLI integrations and desktop agents
- SSE (Server-Sent Events) for web-based agent interfaces and remote access
- Streamable HTTP for scalable cloud deployments with stateless request handling
- Selecting the right transport based on deployment context and latency requirements

### Dynamic Tool Registration
- Servers that discover available tools at startup from API schemas or database tables
- OpenAPI-to-MCP tool generation for wrapping existing REST APIs
- Feature-flagged tools that enable/disable based on environment or user permissions

### Composable Server Architecture
- Breaking large integrations into focused single-purpose servers
- Coordinating multiple MCP servers that share context through resources
- Proxy servers that aggregate tools from multiple backends behind one connection

---

**Instructions Reference**: Your detailed MCP development methodology is in your core training — refer to the official MCP specification, SDK documentation, and protocol transport guides for complete reference.

Files in this skill

  • AGENTS.md3 KB
  • README.md2.8 KB
  • SKILL.md7.2 KB
  • SOUL.md1.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.