kenshinlin
MCP Serverkenshinlinpublic

memory stream client transport

一个自定义的 MCP 客户端传输库,用于简化与本地 MCP 服务器的连接,避免使用子进程。

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
JavaScript
Language
-
License

About This Server

一个自定义的 MCP 客户端传输库,用于简化与本地 MCP 服务器的连接,避免使用子进程。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

A custom MCP client transport - an alternative for connecting to local MCP servers without subprocesses, simplifying shared memory usage.

Usage

client code

import { MemoryStreamClientTransport } from 'memory-stream-client-transport'
import {createMcpServer} from './server'

const client = new Client({
    name: "example-client",
    version: "1.0.0"
}, {
    capabilities: {}
});

const customTransport = new MemoryStreamClientTransport()

createMcpServer(customTransport)

await client.connect(customTransport);

console.log('connected')

const tools = await client.listTools()
console.log('tools', tools)
const result = await client.callTool({
    name: tools.tools[0].name, 
    arguments: {}
})
console.log('result', result)

server code

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

export default async function createMcpServer(clientTransport){
    const server = new McpServer({
        name: "example-server",
        version: "1.0.0"
    }, {
        capabilities: {}
    });


    server.tool('get_current_time', 'get current time', {}, async () => {
        console.log('get_current_time called', Date.now())
        return {
        content: [
            {
            type: 'text',
            text: new Date().toString()
            }
        ]
        }
    })

    const transport = new StdioServerTransport(clientTransport.process.stdin, clientTransport.process.stdout);
    await server.connect(transport);

    return server
}

Quick Start

1

Clone the repository

git clone https://github.com/kenshinlin/memory-stream-client-transport
2

Install dependencies

cd memory-stream-client-transport
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerkenshinlin
Repomemory-stream-client-transport
LanguageJavaScript
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation