
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@mcp-decorator/core
Advanced tools
Core framework for building MCP servers with TypeScript decorators
Core framework for building Model Context Protocol (MCP) servers using TypeScript decorators.
@Command and @Param decoratorsnpm install @mcp-decorator/core reflect-metadata zod
# or
pnpm add @mcp-decorator/core reflect-metadata zod
# or
bun add @mcp-decorator/core reflect-metadata zod
Add to your tsconfig.json:
{
"compilerOptions": {
"experimentalDecorators": true,
"emitDecoratorMetadata": true
}
}
import "reflect-metadata";
import { Command, Param, createStdioServer } from "@mcp-decorator/core";
import { z } from "zod";
@Command("greet", "Greet a person by name")
class GreetCommand {
@Param(z.string().describe("Name of the person to greet"))
name!: string;
async execute(params: { name: string }) {
return {
content: [
{
type: "text",
text: `Hello, ${params.name}!`,
},
],
};
}
}
// Start stdio server
createStdioServer({
name: "my-mcp-server",
version: "1.0.0",
});
bun run server.ts
Registers a class as an MCP command. Note: This decorator only stores metadata. The actual registration happens when registerCommand() is called (automatically by the plugin system).
@Command("math.add", "Add two numbers")
class AddCommand {
async execute(params: any) {
// Implementation
}
}
Defines a parameter with Zod schema validation.
@Param(z.number().describe("First number"))
a!: number;
Creates an MCP server using stdio transport.
await createStdioServer({
name: "my-server",
version: "1.0.0",
plugins: [],
logLevel: "info",
});
Creates an MCP server using HTTP transport.
await createHttpServer({
name: "my-server",
version: "1.0.0",
port: 3000,
host: "localhost",
basePath: "",
plugins: [],
logLevel: "info",
});
import { Plugin } from "@mcp-decorator/core";
export class MyPlugin implements Plugin {
name = "my-plugin";
version = "1.0.0";
async init() {
// Optional: Initialize resources
}
register() {
// Return command classes
return [MyCommand1, MyCommand2];
}
async destroy() {
// Optional: Cleanup resources
}
}
import { MathPlugin } from "@mcp-decorator/plugin-math";
createStdioServer({
name: "my-server",
plugins: [new MathPlugin()],
});
See the examples directory for:
Required tsconfig.json settings:
{
"compilerOptions": {
"target": "ES2020",
"module": "ESNext",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"strict": true
}
}
MIT
FAQs
Core framework for building MCP servers with TypeScript decorators
We found that @mcp-decorator/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.