Model Context Protocol SDK for building MCP servers and clients in Python
—
Command-line interface for MCP development, testing, and debugging. The MCP CLI provides tools for server inspection, client testing, and protocol validation to streamline MCP development workflows.
Main command-line interface built with Typer for MCP operations.
app: typer.TyperCore CLI commands for MCP development and server management.
# Display help information
mcp --help
# Show MCP version
mcp version
# Development mode - run server with MCP Inspector
mcp dev <file-spec> [--with-editable DIR] [--with PACKAGES]
# Run MCP server directly
mcp run <file-spec> [--transport stdio|sse]
# Install MCP server in Claude desktop app
mcp install <file-spec> [--name NAME] [--with-editable DIR] [--with PACKAGES] [--env-var KEY=VALUE] [--env-file FILE]Display MCP version and help information.
# Show MCP version
mcp version
# Show help for all commands
mcp --helpRun MCP servers with the MCP Inspector for development and testing.
# Run server in development mode with Inspector
mcp dev server.py
# Run server with additional dependencies
mcp dev server.py --with requests --with pandas
# Run server with editable project installation
mcp dev server.py:app --with-editable /path/to/projectRun MCP servers directly without additional tooling.
# Run server using stdio transport (default)
mcp run server.py
# Run server with specific transport
mcp run server.py --transport sse
# Run specific server object from module
mcp run server.py:app --transport stdioInstall MCP servers for use with Claude Desktop application.
# Install basic server
mcp install server.py
# Install server with custom name
mcp install server.py --name "My MCP Server"
# Install with environment variables
mcp install server.py --env-var "API_KEY=your-key" --env-var "DEBUG=true"
# Install with .env file
mcp install server.py --env-file .env
# Install with additional packages and editable mode
mcp install server.py --with requests --with-editable /path/to/projectEach CLI command accepts a file specification in the format file.py or file.py:object where:
file.py - Runs the module directly (expects server.run() call)file.py:object - Imports and runs the specified server objectCommon options:
--with PACKAGE - Install additional Python packages--with-editable DIR - Install directory in editable mode--env-var KEY=VALUE - Set environment variables--env-file FILE - Load environment variables from fileInstall with Tessl CLI
npx tessl i tessl/pypi-mcp