eMCP
A framework for building simple MCP servers with custom middleware
Overview
eMCP is a framework designed for building simple Model Context Protocol (MCP) servers with custom middleware and built-in authentication handling. It serves as a fork of the LiteMCP TypeScript library, offering extended features while maintaining compatibility with existing LiteMCP tools.
To use eMCP, install it via Bun or NPM with the command npm i emcp or bun add emcp. You can then create a server instance and define your authentication logic and middleware as needed.
- Near drop-in replacement for LiteMCP with all its features. - Built-in authentication handler for secure requests. - Support for custom layered middleware to enhance request processing.
- Building secure MCP servers with custom authentication.
- Implementing middleware for logging, error handling, or request modification.
- Creating advanced server functionalities with layered processing.
Add to your AI client
Use these steps to connect eMCP in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"emcp-joeymeere": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-emcp-joeymeere"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"emcp-joeymeere": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-emcp-joeymeere"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"emcp-joeymeere": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-emcp-joeymeere"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"emcp-joeymeere": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-emcp-joeymeere"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"emcp-joeymeere": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-emcp-joeymeere"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"emcp-joeymeere": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-emcp-joeymeere"
]
}
}
}