
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@mcpx-protocol/agent
Advanced tools
MCPx agent layer - MCP server/client implementation and context management
Agent layer for MCPx - provides MCP server/client abstractions for building agents.
npm install @mcpx-protocol/agent
import { MCPxAgent, Tool, ToolExecutionContext, ToolExecutionResult } from '@mcpx-protocol/agent';
class MyAgent extends MCPxAgent {
async onStart() {
console.log('Agent started');
}
async onStop() {
console.log('Agent stopped');
}
// Expose tools (MCP server)
async listTools(): Promise<Tool[]> {
return [{
name: 'calculate',
description: 'Perform calculations',
inputSchema: {
type: 'object',
properties: {
expression: { type: 'string' }
}
}
}];
}
async executeTool(name: string, params: any, context: ToolExecutionContext): Promise<ToolExecutionResult> {
if (name === 'calculate') {
// Implement tool logic
return {
content: [{
type: 'text',
text: `Result: ${eval(params.expression)}`
}]
};
}
throw new Error(`Tool ${name} not found`);
}
// Handle chat messages
protected onChatMessage(text: string, from: string) {
console.log(`${from}: ${text}`);
// Respond to chat
this.sendChat(`Hello ${from}!`);
}
}
// Create and start agent
const agent = new MyAgent(
{ name: 'MyAgent', version: '1.0.0' },
{ gateway: 'ws://localhost:8080', topic: 'my-topic', token: 'my-token' }
);
await agent.start();
// Call another peer's tool (MCP client)
const result = await agent.callTool('other-agent', 'their-tool', { param: 'value' });
// Stop agent
await agent.stop();
See the TypeScript definitions for complete API documentation.
MIT
FAQs
MCPx agent layer - MCP server/client implementation and context management
We found that @mcpx-protocol/agent 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.