Sherlog MCP Serverのロゴ

Sherlog MCP Server

組織
GetSherlog

MCP that combats tools overload

公開者GetSherlog
リポジトリSherlog-MCP
言語Python
フォーク
3
スター
23
利用可能なツール
0
通信方式stdio
カテゴリ
ライセンスApache-2.0
リンク
  • ツールをAIワークフローに接続

    Sherlog MCP Serverは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには23件のスターと3件のフォークがあります。

Sherlog Logo

Sherlog Log AI MCP

A powerful Model Context Protocol (MCP) server that provides a persistent IPython shell per session. The server only exposes a limited number of tools and at the core of it just exposes the following 2 -

  1. call_cli
  2. execute_python_code

And the rest of the tools are more for supporting the LLM to write the code or call the appropriate cli to complete the task. There are some tools for code retrieval based on tree sitter but thats pretty much it.

For example, installing packages or installing cli. Or doing introspection of variables in the ipython shell.

The server also supports adding external mcp servers. The idea here is you can run mcp servers inside the shell that allows you to persist results in the shell with variables and results etc.

One of the primary things I have noticed is that LLMs mess up when provided with a lot of tools and also as is quite evident by now. There are multiple articles and videos (written and shared by people way more qualified than me) and they main theme across them is the problems with tools overload and context limitation.

This server is my attempt at "solving" that problem.

How you ask ?

Note: The core of this approach is:

  1. All tool calls are persisted to a variable in the shell and the LLM would then write code to inspect the variable, slice/dice and get the required part out of a "gigantic" payload. My idea was similar to when us engineers work with large data we get them into dataframes and then slice/dice to get the required part out.
  2. CLI calls are composable and that helps the LLM to get only the required content

Both are ways of not polluting the context with useless info.

Overview

Sherlog MCP Server transforms Claude Desktop into a stateful data analysis powerhouse by providing:

  • Session-Aware IPython Shells: Isolated workspaces per session with automatic persistence
  • DataFrame-Centric Architecture: Every operation returns DataFrames, creating a unified data model
  • Multi-Session Support: Handle up to 4 concurrent sessions with automatic lifecycle management
  • MCP Proxy: Seamlessly integrates any external MCP server, executing all operations within the same IPython context

Think of it as giving Claude a persistent Python notebook that maintains separate workspaces for different conversations, where every piece of data is immediately available for the next operation.

Architecture & Design

Sherlog MCP Server supports different deployment scenarios through specialized Docker containers:

Container Variants

Vanilla Container

A lightweight, general-purpose environment optimized for data analysis and development workflows.

Pre-installed Tools:

  • GitHub CLI (gh) - Complete GitHub integration for repository management, issues, PRs, and workflows
  • Python Ecosystem - Full scientific computing stack (pandas, numpy, matplotlib, etc.)
  • System Utilities - Essential command-line tools for file operations and system management

Best For: Data analysis, web scraping, API integrations, general development tasks

Android Development Container

A specialized environment for Android development and testing workflows.

Pre-installed Tools:

  • Android SDK & Build Tools - Complete Android development environment
  • Java Development Kit (JDK) - Required Java runtime and development tools
  • GitHub CLI (gh) - Version control and repository management
  • BrowserStack CLI - Real device testing and debugging capabilities
  • ADB & Fastboot - Android device communication tools

Best For: Android app development, device testing, mobile automation, CI/CD pipelines

Google OAuth Integration

Sherlog MCP Server includes built-in Google OAuth 2.0 support for accessing Google Workspace services (Gmail, Drive, Calendar) directly within IPython sessions. OAuth tokens are securely stored with encryption and automatically refreshed as needed.

Configure with GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET environment variables. When running with HTTP transport, OAuth endpoints are available at /auth/google/* for authentication flow.

Design Principles

  • Environment Isolation: Each container provides a complete, reproducible environment
  • Tool Integration: All CLI tools are accessible through the unified call_cli interface
  • Persistent State: Session data persists across container restarts
  • Extensibility: Easy to add new tools or create custom container variants

Installation

Prerequisites

  • Docker Desktop

Remote Connection Support

Sherlog MCP supports connecting from remote Claude instances via HTTP transport. See Remote Connection Guide for detailed setup instructions.

Configuration

Core Settings

bash
# Session Management
export MCP_AUTO_RESET_THRESHOLD=200     # Operations before auto-cleanup (default: 200)
export MCP_AUTO_RESET_ENABLED=true      # Enable automatic memory management
export MCP_MAX_OUTPUT_SIZE=50000        # Max output size per buffer (default: 50KB)
export MCP_MAX_SESSIONS=4               # Maximum concurrent sessions (default: 4)

# Logging
export LOG_LEVEL=INFO

External MCP Servers

Connect any MCP server to execute within the IPython workspace:

bash
export EXTERNAL_MCPS_JSON='{
  "filesystem": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
  },
  "postgres": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-postgres"],
    "env": {
      "DATABASE_URL": "$DATABASE_URL"
    }
  }
}'

External MCP Integration

While Sherlog MCP includes many tools natively, you can connect any MCP server to extend functionality. External tools are automatically integrated into the IPython workspace:

How It Works

  1. External tools are prefixed: external_[server]_[tool]
  2. Results automatically convert to DataFrames
  3. Full access to the same IPython namespace

Adding External MCPs

json
"-e", "EXTERNAL_MCPS_JSON={\"postgres\":{\"command\":\"npx\",\"args\":[\"-y\",\"@modelcontextprotocol/server-postgres\"],\"env\":{\"DATABASE_URL\":\"$DATABASE_URL\"}}}"

Railway Deployment

This MCP server is designed to be deployed on Railway with persistent session storage.

Persistent Sessions

The server automatically persists IPython shell sessions across container restarts using:

  • Session State: Individual session files stored in /app/data/sessions/
  • Session Metadata: Tracked in session_metadata.json for session timing and state
  • Active Session Registry: Maintained in session_registry.json to restore shells on startup

Railway Volume Configuration

When deploying to Railway, the /app/data directory is automatically persisted through Railway's persistent storage. This ensures that:

  • User sessions survive container restarts
  • IPython shell state (variables, imports, etc.) is maintained
  • Session metadata persists for proper session management

No additional configuration is needed for Railway deployment - the persistent volume is automatically mounted.

Architecture

Claude Desktop
     ↓
Sherlog MCP Server (http)
     ↓
Session Middleware (manages shells)
     ↓
IPython Shells (one per session)
     ├── Built-in Tools (return DataFrames)
     ├── External MCP Tools (via proxy)
     └── User Code (execute_python_code)
     └── User CLI (call_cli)

Advanced Usage

Working with External MCPs

External MCP tools integrate seamlessly:

  1. Results automatically convert to DataFrames
  2. Stored in IPython namespace with tool name
  3. Available for subsequent operations

Example flow:

  • PostgreSQL MCP queries database → result stored as DataFrame
  • LogAI tools analyze the data → create new DataFrames
  • Custom Python code combines results → final analysis

License

Apache License 2.0 - see LICENSE file for details.

Talks and articles that inspired me

Armin's article How to fix your context MCPs are Boring - Recommended using eval as the only tool Alita paper - This paper kind of influenced me as well

インストール

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "getsherlog-sherlog-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sherlog-mcp-server"
      ]
    }
  }
}

Sherlog MCP ServerのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Sherlog MCP Serverに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Sherlog MCP Serverをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Sherlog MCP ServerのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "getsherlog-sherlog-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sherlog-mcp-server"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてSherlog MCP ServerのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Sherlog MCP ServerのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Sherlog MCP Serverを使ってこのタスクを手伝ってもらえますか?
Sherlog MCP Server
はい、読みました。
Sherlog MCP Serverで調べた結果をお伝えします。

よくある質問

Sherlog MCP Server MCPサーバーは何に使いますか?

Sherlog MCP Serverは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでSherlog MCP Server MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでSherlog MCP Serverを利用できます。

TypingMindでSherlog MCP Server MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Sherlog MCP Serverを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Sherlog MCP Server MCPをTypingMindに接続するにはどうすればよいですか?

Sherlog MCP ServerはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでSherlog MCP Server MCPのどのようなツールを利用できますか?

Sherlog MCP ServerはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Sherlog MCP Server MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Sherlog MCP Serverで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇