leoshimo
MCP Serverleoshimopublic

stdscope

Transparent proxy for stdio transport

Repository Info

2
Stars
0
Forks
2
Watchers
0
Issues
Rust
Language
-
License

About This Server

Transparent proxy for stdio transport

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

stdscope

stdscope is a transparent proxy for inspecting a program over stdio transport. It records and forwards stdin, stdout, and stderr for a child process.

Usage

# Wrap `sed` to capture standard input / output
$ echo "Hello world" | stdscope -- sed "s/Hello/Goodbye/"
--> Hello world
Goodbye world
<-- Goodbye world

# `-e` to write captured output to stderr
$ echo "Hello world" | stdscope -e -- sed "s/Hello/Goodbye/" >/dev/null
--> Hello world
<-- Goodbye world

# `-o FILE` to capture output to a file
$ echo '{"jsonrpc": "2.0", "method": "subtract", "params": {"x": 10, "y": 5}, "id": 3}' | stdscope -o ~/stdscope.log -- jsonrpc_calc
{"jsonrpc": "2.0", "result": 19, "id": 3}
$ cat ~/stdscope.log
--> {"jsonrpc": "2.0", "method": "subtract", "params": {"x": 25, "y": 6}, "id": 3}
<-- {"jsonrpc": "2.0", "result": 19, "id": 3}

# Capture both stdout and stderr
$ echo "test" | stdscope -- sh -c 'echo "to stdout"; echo "to stderr" >&2'
--> test
to stdout
<-- to stdout
to stderr
!-- to stderr

Example: Intercepting Model Context Protocol JSON-RPC

# Intercept MCP messages between MCP client and server
$ npx @modelcontextprotocol/inspector@latest -- stdscope -o $HOME/mcp.log -- npx @modelcontextprotocol/server-everything

# Tail the log in another terminal:
$ tail -f ~/mcp.log
--> {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2024-11-05",...}}
<-- {"result":{"protocolVersion":"2024-11-05","capabilities":{"prompts":{}},...},"id":0}
--> {"jsonrpc":"2.0","method":"notifications/initialized"}
--> {"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}
<-- {"result":{"tools":[{"name":"echo","description":"Echoes back the input"},...]},"id":1}
<-- {"method":"notifications/message","params":{"level":"info","data":"Info-level message"},"jsonrpc":"2.0"}

Example: Recording bash interactions

$ cat | stdscope -o bash.log -- bash
ls
Cargo.lock
Cargo.toml
README.md
bash.log
src
target
which stdscope
/Users/leoshimo/.cargo/bin/stdscope
^C

$ cat bash.log
--> ls
<-- Cargo.lock
<-- Cargo.toml
<-- README.md
<-- bash.log
<-- src
<-- target
--> which stdscope
<-- /Users/leoshimo/.cargo/bin/stdscope

Quick Start

1

Clone the repository

git clone https://github.com/leoshimo/stdscope
2

Install dependencies

cd stdscope
npm install
3

Follow the documentation

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

Repository Details

Ownerleoshimo
Repostdscope
LanguageRust
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