eMCP

by joeymeere

11 273 downloads Not rated yet MIT
GitHub

About

A framework for building simple MCP servers with custom middleware

Details

License
MIT

Explore

This is designed to be a near drop-in replacement for tools like LiteMCP. Because of this, all added features are currently optional.

- All current LiteMCP features
- Built-in authentication handler
- Custom layered middleware support

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 eMCP
    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

Install via Bun or NPM:

npm i emcp

(Optional) Run the examples:

bash
bun run example:basic
bun run example:auth
bun run example:middleware
bun run example:advanced

ts
const server = new eMCP("mcp-server-with-auth", "1.0.0", {
authenticationHandler: async (request) => {
// implement your custom auth logic here
return true;
},
});

// Request to this tool, or any other resource or prompt will
// require authentication governed by the handler
server.addTool({
name: "add",
description: "Add two numbers",
parameters: z.object({
a: z.number(),
b: z.number(),
}),
execute: async (args) => {
server.logger.debug("Adding two numbers", args);
return args.a + args.b;
},
});
```

Claude Desktop / Cursor

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

{
    "mcpServers": {
        "emcp": {
            "emcp": {
                "command": "bun",
                "args": [
                    "run",
                    "example:basic"
                ]
            }
        }
    }
}

McpServers

{
    "emcp": {
        "command": "bun",
        "args": [
            "run",
            "example:basic"
        ]
    }
}

<div>

<a href="https://www.npmjs.com/package/emcp" target="_blank">

</a>
</div>
<br>

A fork of the LiteMCP TS library with extended features like built-in authentication handling, and custom middleware.

Features

This is designed to be a near drop-in replacement for tools like LiteMCP. Because of this, all added features are currently optional.

- All current LiteMCP features
- Built-in authentication handler
- Custom layered middleware support

Quickstart

Install via Bun or NPM:

```bash
npm i emcp

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.