eMCP
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:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
eMCPCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- 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:
bashbun run example:basic
bun run example:auth
bun run example:middleware
bun run example:advanced
tsconst 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
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



