Skip to content

akschneider1/MCP_test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCP Server

A Model Context Protocol (MCP) server implementation with utility tools, resources, and prompts.

Features

Tools

Tool Description
echo Echo back a message for testing connectivity
get_current_time Get the current date and time
calculate Perform basic math operations (add, subtract, multiply, divide)
generate_uuid Generate a random UUID v4
base64_encode Encode text to Base64
base64_decode Decode Base64 to text
json_format Format and validate JSON

Resources

URI Description
info://server Server information and metadata
info://capabilities List of supported capabilities
info://tools Detailed information about available tools

Prompts

Prompt Description
greeting Generate a friendly greeting
code_review Code review prompt template
summarize Text summarization prompt

Installation

npm install

Building

npm run build

Usage

Running the Server

npm start

Or for development:

npm run dev

Configuration with Claude Desktop

Add the following to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "mcp-server": {
      "command": "node",
      "args": ["/path/to/mcp-server/dist/index.js"]
    }
  }
}

Configuration with Claude Code

Add to your Claude Code settings:

{
  "mcpServers": {
    "mcp-server": {
      "command": "node",
      "args": ["/path/to/mcp-server/dist/index.js"]
    }
  }
}

Development

Project Structure

mcp-server/
├── src/
│   └── index.ts      # Main server implementation
├── dist/             # Compiled JavaScript (generated)
├── package.json
├── tsconfig.json
└── README.md

Adding New Tools

To add a new tool, update the TOOLS array and add a corresponding case in the CallToolRequestSchema handler:

// Add to TOOLS array
{
  name: "my_tool",
  description: "Description of what the tool does",
  inputSchema: {
    type: "object",
    properties: {
      param1: {
        type: "string",
        description: "Description of param1",
      },
    },
    required: ["param1"],
  },
}

// Add case in handler
case "my_tool": {
  const { param1 } = args as { param1: string };
  // Tool implementation
  return {
    content: [{ type: "text", text: result }],
  };
}

License

MIT

About

Attempt at creating an MCP server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •