mcpField
L
ls-mcp

ls-mcp

Local
github.com/lirantalDeveloper Tools84Updated 1d ago

About ls-mcp

ls-mcp is a command line tool that detects MCP servers configured in a local development environment. It is aimed at developers who want to review MCP configurations across multiple AI applications and agentic IDEs. It also flags potentially exposed credentials in server environment variables and API keys.

Key features

  1. 01Automatic discovery across AI apps and agentic IDEs
  2. 02Project-scoped config lookup in nested directories
  3. 03Running status detection for MCP server processes
  4. 04Credential analysis of environment variables
  5. 05JSON output for programmatic use

Use cases

  1. 01Reviewing which MCP servers are configured across local clients
  2. 02Checking MCP config files for plaintext credentials
  3. 03Feeding configuration summaries into scripts via JSON output

MCP support

The project does not connect to MCP servers. It reads the MCP configuration files of supported applications and summarizes the servers and transports they define.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"ls": {
"command": "npx",
"args": [
"-y",
"ls-mcp"
]
}
}
}
Run commandnpx -y ls-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmls-mcp

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

ls-mcp

Detect Configured MCP (Model Context Protocol) in your local dev environment

npm version license downloads build codecov Responsible Disclosure Policy

ls-mcp logo

Features

  • 🔍 MCP Discovery: Automatically detect MCP servers across various AI applications and agentic IDEs
  • 📁 Directory Bubbling: Intelligent discovery of project-scoped MCP configs from nested directories, supporting project-scoped MCP Server configuration and global configurations
  • 🔄 Process Detection: Real-time status of running MCP servers
  • 🔒 Credential Analysis: Security analysis of environment variables and API keys for potentially exposed credentials in MCP Servers

Usage: CLI

npx ls-mcp
Analyze Specific Files

To analyze specific MCP configuration files instead of using automatic discovery, use the --files flag. This flag replaces automatic discovery and only analyzes the files you specify:

# Single file
npx ls-mcp --files ./mcp-config.json

# Multiple files (comma-separated)
npx ls-mcp --files ./config1.json,./config2.json

# Multiple files (space-separated)
npx ls-mcp --files ./config1.json ./config2.json

The --files flag automatically detects the configuration structure in your files, supporting various formats including:

  • servers - Standard MCP configuration key
  • mcpServers - Alternative MCP configuration key
  • mcp.servers - Nested configuration format
  • context_servers - Context-based configuration format
Show All Providers

By default, ls-mcp hides providers that have zero configured servers to reduce clutter. To show all providers including those with empty configurations, use the --all or -a flag:

# Show all providers including empty ones
npx ls-mcp --all

# Short form
npx ls-mcp -a

# Combine with JSON output
npx ls-mcp --all --json

Note: When using --files to analyze specific configuration files, the custom group is always shown even if it contains zero servers, as you explicitly requested to analyze those files.

JSON Output

To output results in JSON format (useful for programmatic consumption):

npx ls-mcp --json

# Combine with --files flag
npx ls-mcp --files ./config.json --json

This will return a structured JSON object containing:

  • mcpFiles: Complete MCP server configurations organized by provider (only includes providers with configured servers unless --all is specified)
  • summary: Statistics including total servers, running servers, credential warnings, and transport breakdown
Debug Mode

To enable verbose debugging output, set the NODE_DEBUG environment variable:

# Enable debug logging for ls-mcp
NODE_DEBUG=ls-mcp npx ls-mcp

# Enable all debug logging
NODE_DEBUG=* npx ls-mcp

Documentation

For detailed information about the project architecture and features:

Documentation

Contributing

Please consult CONTRIBUTING for guidelines on contributing to this project.

Author

ls-mcp © Liran Tal, Released under the Apache-2.0 License.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.