[Template] MCP Server

by larryhudson

264 downloads
Not rated
GitHub

Description

# [Template] MCP Server ## How to use this template - Add tool definitions in src/index.ts - Update the README below - Update the placeholder info in package.json - Test building the MCP server with `npm run build`, and using the @modelcontextprotocol/inspector library - Publish…

About

# [Template] MCP Server ## How to use this template - Add tool definitions in src/index.ts - Update the README below - Update the placeholder info in package.json - Test building the MCP server with `npm run build`, and using the @modelcontextprotocol/inspector library - Publish to npm: `npm login`, `npm publish…

Details

Author
larryhudson
Downloads
264
Categories
Media

- Template for creating custom MCP servers
- Instructions for setup with VS Code and Claude
- Environment variable configuration for API keys
- Built with TypeScript and the MCP framework
- Tool definitions added in a single file (src/index.ts)
- Supports publishing to npm

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name [Template] MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Developers add tool definitions in src/index.ts, update the placeholder information in package.json, and build the server with npm run build. They can test the server locally using the @modelcontextprotocol/inspector library. After testing, they publish the package to npm with npm login and npm publish --access public. To run the server, users set an API key as an environment variable (API_KEY_ENV_VAR) and add the MCP configuration to their client (e.g., VS Code or Claude).

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "[template] mcp server": {
            "figma-mcp-server-larryhudson": {
                "command": "npx",
                "args": [
                    "@modelcontextprotocol/inspector",
                    "npx",
                    "tsx",
                    "src/index.ts"
                ]
            }
        }
    }
}

McpServers

{
    "figma-mcp-server-larryhudson": {
        "command": "npx",
        "args": [
            "@modelcontextprotocol/inspector",
            "npx",
            "tsx",
            "src/index.ts"
        ]
    }
}

[Template] MCP Server

How to use this template

- Add tool definitions in src/index.ts
- Update the README below
- Update the placeholder info in package.json
- Test building the MCP server with npm run build, and using the @modelcontextprotocol/inspector library
- Publish to npm: npm login, npm publish --access public

Overview

[Insert overview here]

Features

[Insert features here]

Setup

1. Create a API key etc.
2. Set the token as an environment variable:

export API_KEY_ENV_VAR=the_secret_api_key

Usage

Using with VS Code

Add this to your settings JSON file:

{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "some_secret_api_key",
        "description": "Secret API key",
        "password": true
      }
    ],
    "servers": {
      "[library-name]": {
        "command": "npx",
        "args": [
          "-y",
          "@larryhudson/[the-library]"
        ],
        "env": {
          "API_KEY_ENV_VAR": "${input:some_secret_api_key}"
        }
      }
    }
  }
}

Using with Claude or other MCP-compatible applications

Add this to your MCP configuration JSON file:

{
  "mcpServers": {
    "[the-library]": {
      "command": "npx",
      "args": ["-y", "@larryhudson/[the-library]"],
      "env": {
        "API_KEY_ENV_VAR": "<THE_SECRET_API_KEY>"
      }
    }
  }
}

Available Tools

[List the tools here]

How It Works

[Some info about how it works]

Technical Details

Built with:
- Model Context Protocol (MCP): Framework for allowing AI assistants to interact with external tools
- TypeScript: For type safety and better developer experience

Development

You can use the Model Context Protocol inspector to try out the server:

npx @modelcontextprotocol/inspector npx tsx src/index.ts

Limitations and Future Improvements

License

MIT

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.