New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@metorial/mcp-session

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metorial/mcp-session

MCP session management for Metorial. Provides session handling and tool lifecycle management for Model Context Protocol.

latest
Source
npmnpm
Version
2.1.1
Version published
Weekly downloads
92K
1.21%
Maintainers
2
Weekly downloads
 
Created
Source

@metorial/mcp-session

MCP session management for Metorial. Provides session handling and tool lifecycle management for Model Context Protocol.

Installation

npm install @metorial/mcp-session
# or
yarn add @metorial/mcp-session
# or
pnpm add @metorial/mcp-session
# or
bun add @metorial/mcp-session

Usage

This package provides direct MCP session management for advanced use cases.

import { MetorialMcpSession } from '@metorial/mcp-session';
import { Metorial } from 'metorial';

let metorial = new Metorial({
  apiKey: 'your-metorial-api-key'
});

// Create an MCP session instance
let mcpSession = new MetorialMcpSession(metorial, {
  serverDeployments: ['your-server-deployment-id']
});

// Get the session metadata
let session = await mcpSession.getSession();

// Get the tool manager
let toolManager = await mcpSession.getToolManager();

// Get available tools
let tools = toolManager.getTools();

// Call a tool directly
let searchContextTool = tools.find(t => t.name === 'searchContext');
if (searchContextTool) {
  let toolResponse = await searchContextTool.call({
    query: 'metorial websocket explorer',
    maxResults: 3
  });
  console.log('Tool response:', toolResponse);
}

// Clean up the session
await mcpSession.close();

License

MIT License - see LICENSE file for details.

FAQs

Package last updated on 20 Mar 2026

Did you know?

Socket

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.

Install

Related posts