agentskills.codes
CR

create-mcp-server

Scaffold a local MCP server with synthetic data for agentic system development. Use when creating a new data source, building tool endpoints, or generating test data for agents to consume.

Install

mkdir -p .claude/skills/create-mcp-server-appliedcognetics && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15949" && unzip -o skill.zip -d .claude/skills/create-mcp-server-appliedcognetics && rm skill.zip

Installs to .claude/skills/create-mcp-server-appliedcognetics

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Scaffold a local MCP server with synthetic data for agentic system development. Use when creating a new data source, building tool endpoints, or generating test data for agents to consume.
188 chars✓ has a “when” trigger

About this skill

Create MCP Server

When to Use

  • Creating a new data source that agents consume via MCP tools
  • Building tool endpoints that serve synthetic data for testing
  • Adding a new MCP server to an existing agentic system
  • Regenerating synthetic data for an existing MCP server

Procedure

  1. Ask the user for the server's name (kebab-case), purpose (one sentence), and list of tools it should expose (name + one-line description each)
  2. Determine the data domain — what kind of data will each tool return. Reference synthetic data patterns for generation strategies per data type.
  3. Create the server project directory:
    mcp-servers/{server-name}/
    ├── src/
    │   ├── index.ts           # MCP server entry point
    │   ├── tools/             # One file per tool handler
    │   └── data/              # Synthetic data JSON files
    ├── package.json
    └── tsconfig.json
    
  4. Scaffold the MCP server entry point using the MCP server template. Register each tool with name, description, and input schema (JSON Schema format).
  5. For each tool, create a handler in src/tools/{tool-name}.ts:
    • Parse input parameters from the MCP CallToolRequest
    • Load synthetic data from src/data/{dataset}.json
    • Filter/transform data based on input parameters
    • Return structured JSON response
  6. Generate synthetic data files in src/data/ following the synthetic data patterns:
    • Match the schema each tool expects to return
    • Include 10-50 records per dataset — enough for realistic testing
    • Use realistic but fictional values (no real PII, real tickers are OK)
  7. Wire the server into VS Code by updating .vscode/mcp.json following the MCP config reference:
    {
      "servers": {
        "{server-name}": {
          "type": "stdio",
          "command": "npx",
          "args": ["tsx", "mcp-servers/{server-name}/src/index.ts"]
        }
      }
    }
    
  8. Update the tool registry with the new server's tools, input shapes, and agent assignments
  9. Verify: server starts without errors, each tool returns valid JSON, .vscode/mcp.json entry exists

Validation Checklist

  • Server directory follows mcp-servers/{name}/ structure
  • src/index.ts imports and registers all tool handlers
  • Each tool has a handler file in src/tools/
  • Each handler has typed input schema matching the tool registry
  • Synthetic data files exist in src/data/ with 10-50 records each
  • Data values are realistic but fictional — no real PII
  • .vscode/mcp.json has a valid entry for this server
  • Tool registry artifact is updated with new tools
  • npx tsx mcp-servers/{name}/src/index.ts starts without errors

Search skills

Search the agent skills registry