Neura Market
    Neura Market
    /Claude
    Marketplace
    Directories
    Resources
    Claude
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeekCoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    OverviewRulesPromptsMCPsAgentsGamesBlogVideosGuidesCoursesCommunityTrendingMCP TutorialMCP Resources
    All StepsStep 3 of 6
    3

    Building Your First MCP Server

    Let's create a basic MCP server that exposes a simple tool to Claude.

    Server Setup Create a new file and set up the basic server structure:

    index.ts
    import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
    import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
    
    const server = new McpServer({
      name: "my-first-mcp",
      version: "1.0.0",
    });
    
    // Define a tool
    server.tool(
      "get_weather",
      "Get current weather for a location",
      {
        location: {
          type: "string",
          description: "City name or coordinates",
        },
      },
      async ({ location }) => {
        // Your implementation here
        return {
          content: [
            {
              type: "text",
              text: `Weather for ${location}: 72°F, Sunny`,
            },
          ],
        };
      }
    );
    
    // Start the server
    const transport = new StdioServerTransport();
    await server.connect(transport);
    PreviousNext Step

    Stay up to date

    Get the latest Claude prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for Claude and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Step 3: Building Your First MCP Server - MCP Tutorial