artubss/SKILLS-CLAUDE-CODE / claude-skills-main/claude-skills-main/plugins/integrations/skills/mcp-builder
mcp-builder
VerifiedBuild MCP servers in Python with FastMCP. Define tools / resources / prompts, build the server, test locally, deploy to FastMCP Cloud or Docker. Use whenever the user mentions building an MCP server, exposing tools to LLMs, FastMCP, building a Claude integration, or troubleshooting FastMCP module-level server, storage, lifespan, middleware, OAuth, or deployment errors.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 12.0 KB |
| assets/SCRIPTS-TEMPLATE.md | markdown | 1.3 KB |
| assets/api-client-pattern.py | script | 11.4 KB |
| assets/basic-server.py | script | 2.9 KB |
| assets/client-example.py | script | 10.0 KB |
| assets/error-handling.py | script | 11.0 KB |
| assets/openapi-integration.py | script | 7.5 KB |
| assets/prompts-examples.py | script | 8.1 KB |
| assets/pyproject.toml | manifest | 2.0 KB |
| assets/requirements.txt | manifest | 838 B |
| assets/resources-examples.py | script | 6.2 KB |
| assets/script-template.ts | script | 3.7 KB |
| assets/self-contained-server.py | script | 11.6 KB |
| assets/tools-examples.py | script | 6.1 KB |
| references/integration-patterns.md | markdown | 10.9 KB |
assets/script-template.ts
View on GitHub#!/usr/bin/env npx tsx
/**
* {Tool Name} - {Brief description}
*
* Usage:
* npx tsx scripts/{tool-name}.ts <args>
* npx tsx scripts/{tool-name}.ts --help
*
* Examples:
* npx tsx scripts/{tool-name}.ts {example}
*/
import * as fs from 'fs';
import * as path from 'path';
// ============================================================================
// Configuration
// ============================================================================
interface Config {
// Add config options
}
function loadConfig(): Config {
// Load from env, config file, etc.
return {};
}
// ============================================================================
// Argument Parsing
// ============================================================================
interface Args {
// Define expected arguments
input?: string;
output?: string;
format: 'json' | 'csv' | 'table';
verbose: boolean;
help: boolean;
}
function parseArgs(): Args {
const args = process.argv.slice(2);
const parsed: Args = {
format: 'json',
verbose: false,
help: false,
};
for (let i = 0; i < args.length; i++) {
switch (args[i]) {
case '--input':
parsed.input = args[++i];
break;
case '--output':
parsed.output = args[++i];
break;
case '--format':
parsed.format = args[++i] as Args['format'];
break;
case '--verbose':
parsed.verbose = true;
break;
case '--help':
case '-h':
parsed.help = true;
break;
}
}
return parsed;
}
function showHelp(): void {
console.log(`
{Tool Name} - {Description}
Usage:
npx tsx scripts/{tool-name}.ts [options] <args>
Options:
--input <file> Read input from file
--output <file> Write output to file
--format <type> Output format: json, csv, table (default: json)
--verbose Show debug information
--help, -h Show this help
Examples:
npx tsx scripts/{tool-name}.ts example-arg
npx tsx scripts/{tool-name}.ts --input data.csv --output results.json
`);
}
// ============================================================================
// Core Logic
// ============================================================================
interface Result {
success: boolean;
data?: unknown;
error?: string;
}
async function execute(/* params */): Promise<Result> {
// Implement core logic here
// This could also import from a shared module
return { success: true, data: {} };
}
// ============================================================================
// Output Formatting
// ============================================================================
function formatOutput(result: Result, format: Args['format']): string {
switch (format) {
case 'json':
return JSON.stringify(result, null, 2);
case 'csv':
// Implement CSV formatting
return '';
case 'table':
// Implement table formatting
return '';
}
}
// ============================================================================
// Main
// ============================================================================
async function main(): Promise<void> {
const args = parseArgs();
if (args.help) {
showHelp();
process.exit(0);
}
try {
const result = await execute(/* pass args */);
const output = formatOutput(result, args.format);
if (args.output) {
fs.writeFileSync(args.output, output);
if (args.verbose) {
console.error(`Written to ${args.output}`);
}
} else {
console.log(output);
}
process.exit(result.success ? 0 : 1);
} catch (error: any) {
console.error(JSON.stringify({ success: false, error: error.message }));
process.exit(1);
}
}
main();
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |