
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
@agent-infra/mcp-client
Advanced tools
An MCP Client to run servers for Electron apps, support same-process approaching
โจ A unified MCP Client implemented in TypeScript, supporting four major transports out of the box: In-memory, Stdio, SSE (Server-Sent Events), and Streamable HTTP.
import { MCPClient } from '@agent-infra/mcp-client';
// type: module project usage
import { createServer as createFileSystemServer } from '@agent-infra/mcp-server-filesystem';
// commonjs project usage
// const { createServer as createFileSystemServer } = await import('@agent-infra/mcp-server-filesystem')
const mcpClient = new MCPClient([
// In-memory
{
type: 'builtin',
name: 'FileSystem',
description: 'filesystem tool',
mcpServer: createFileSystemServer({
allowedDirectories: [omegaDir],
}),
},
// stdio
{
type: 'stdio',
name: 'FileSystem-Stdio',
description: 'filesystem tool',
command: 'npx',
args: [
'-y',
'@agent-infra/mcp-server-filesystem'
]
},
// sse
{
type: 'sse',
name: 'FileSystem-sse',
description: 'filesystem tool',
url: 'http://localhost:8889/sse'
},
// streamable-http
{
type: 'sse',
name: 'FileSystem-http',
description: 'filesystem tool',
url: 'http://localhost:8889/mcp'
}
]);
await mcpClient.listTools();
await mcpClient.listPrompts();
const result = await mcpClient.callTool({
client: 'FileSystem-sse',
name: 'list_directory',
arguments: {
path: '~/your_computer'
},
});
You can filter tools and prompts using glob patterns with allow and block lists:
const mcpClient = new MCPClient([
{
type: 'builtin',
name: 'FileSystem',
description: 'filesystem tool',
mcpServer: createFileSystemServer({
allowedDirectories: [omegaDir],
}),
// Filter configuration
filters: {
tools: {
allow: ['list_*', 'read_*'], // Only allow tools starting with 'list_' or 'read_'
block: ['delete_*'] // Block any tools starting with 'delete_'
},
prompts: {
allow: ['safe_*'], // Only allow prompts starting with 'safe_'
block: ['admin_*'] // Block prompts starting with 'admin_'
}
}
}
]);
// List all tools (filtered)
const tools = await mcpClient.listTools();
// List all prompts (filtered)
const prompts = await mcpClient.listPrompts();
// List tools from specific server
const serverTools = await mcpClient.listTools('FileSystem');
Filter Rules:
*, **, ?, [...], etc.)Thanks to:
FAQs
An MCP Client to run servers for Electron apps, support same-process approaching
The npm package @agent-infra/mcp-client receives a total of 23,960 weekly downloads. As such, @agent-infra/mcp-client popularity was classified as popular.
We found that @agent-infra/mcp-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 6 open source maintainers 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
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: whatโs affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.