MCP Server

by la-rebelion

3 stars
Not rated
GitHub

About

MCP Server simplifies the implementation of the Model Context Protocol by providing a user-friendly API to create custom tools and manage server workflows efficiently.

Details

Author
la-rebelion
Repository
la-rebelion/mcp-server
GitHub stars
3
License
MIT License
Categories
Developer Tools, Productivity

Setting up with Highlight

Follow these steps to add this server as a custom Highlight plugin:

  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 MCP Server
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 @highlight/mcp-server

    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

Implement your tools with your custom logic, and register them in the MCPServer. Here is an example of a simple echo tool:

import { Tool, ToolSchema } from "@la-rebelion/mcp-server";

export class EchoTool extends Tool {
toolSchema: ToolSchema = {
name: "echo",
description: "Echoes the input message",
schema: { // the schema for the parameters needed by the tool
type: "object",
properties: {
message: { type: "string" },
},
required: ["message"],
},
};

/*
Your logic here, implement the execute method to define the tool behavior
@param input The input message - use the schema to define the input type
@returns In the example, we are echoing the message
*/
async execute(input: any): Promise<any> {
// This is a simple echo tool demo, nothing fancy, just echoing the message
return Promise.resolve({
content: [
{
type: "text",
text: ${input.message}
}
]
});
}
}

Create an index.ts file with the following content:

#!/usr/bin/env node
import { MCPServer } from '@la-rebelion/mcp-server'
import { EchoTool } from "./tools/EchoTool.js";

const myServer = new MCPServer('My MCP Server', '1.0.0');

async function main() {
// Register tools
myServer.registerTool("echo", EchoTool);
await myServer.run();
}

main().catch((error) => {
console.error("Server error:", error);
process.exit(1);
});

That's it! You have created a simple server that implements the Model Context Protocol. Test it with Claude Desktop or any other client that supports MCP.

Build the project with the following command:

yarn build

You can start the server, but has no logic yet, you can test it with the following command:

```bash
yarn start

echo

Echoes the input message. Parameters: message (string) - the message to be echoed.

Claude Desktop / Cursor

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

{
    "mcpServers": {
        "mcp server": {
            "env": {},
            "args": [
                "-y",
                "@highlight/mcp-server"
            ],
            "command": "npx"
        }
    }
}

Linux

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Macos

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Windows

{
    "env": [],
    "args": [
        "/c",
        "npx",
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "cmd"
}

mcp-server

> [!IMPORTANT]
> We moved the project to Agentico to better organize the tools and services for AI developers. We encourage you to use the new package and follow the updates on the Agentico's GitHub repository.

MCP Server is a simple server that implements the Model Context Protocol (MCP) to provide a simpler API to interact with the Model Context Protocol.

Why Use This Server?

In "La Rebelion" we are working on a set of tools and services to simplify processes and workflows for a better and more efficient developer experience. This server is part of a set of tools.

MCP is amazing, but it can be a bit confusing to get started. We have create a facade to simplify the process of creating a server that implements the Model Context Protocol. The pattern is simple, you just need to create the tools with your own logic, register the tools and start the server.

Steps to Create a New Server

In the future we will provide a CLI to create a new server similar to MCP create server, but for now you can follow the steps below based on the official documentation to create a server.

```bash
mkdir -p my-server/src
cd my-server/
yarn init -y
yarn add @modelcontextprotocol/sdk zod zod-to-json-schema
yarn add -D @types/node typescript

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.