{"id":29173360,"url":"https://github.com/mcp-use/mcp-use-cli","last_synced_at":"2025-07-01T14:13:11.749Z","repository":{"id":302130175,"uuid":"1006354677","full_name":"mcp-use/mcp-use-cli","owner":"mcp-use","description":"mcp-use powered CLI to connect to any MCP server with any LLM, from your terminal","archived":false,"fork":false,"pushed_at":"2025-06-30T17:58:53.000Z","size":2252,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-30T18:49:28.513Z","etag":null,"topics":["agent","ai","cli","client","llm","mcp"],"latest_commit_sha":null,"homepage":"https://mcp-use.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcp-use.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-22T04:33:48.000Z","updated_at":"2025-06-30T17:58:56.000Z","dependencies_parsed_at":"2025-06-30T18:59:50.859Z","dependency_job_id":null,"html_url":"https://github.com/mcp-use/mcp-use-cli","commit_stats":null,"previous_names":["mcp-use/mcp-use-cli"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/mcp-use/mcp-use-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcp-use%2Fmcp-use-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcp-use%2Fmcp-use-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcp-use%2Fmcp-use-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcp-use%2Fmcp-use-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcp-use","download_url":"https://codeload.github.com/mcp-use/mcp-use-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcp-use%2Fmcp-use-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262899649,"owners_count":23381632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","ai","cli","client","llm","mcp"],"created_at":"2025-07-01T14:13:10.281Z","updated_at":"2025-07-01T14:13:11.739Z","avatar_url":"https://github.com/mcp-use.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"static/readme.png\" alt=\"Terminal\" /\u003e\n\u003c/div\u003e\n\n# Open Source and Open Model CLI for MCP\n\nA CLI tool for interacting with Model Context Protocol (MCP) servers using natural language.\n\n## Built with [mcp-use](https://mcp-use.com), build your own MCP application with our SDKs:\n\n\u003ch4\u003e\u003cstrong\u003ePython\u003c/strong\u003e \u003ca href=\"https://github.com/mcp-use/mcp-use\"\u003e\u003cimg src=\"static/python.png\" alt=\"Python\" height=\"24\" style=\"vertical-align: middle; margin-right: 4px;\"/\u003emcp-use/mcp-use\u003c/a\u003e\u003c/h4\u003e\n\u003ch4\u003e\u003cstrong\u003eTypescript\u003c/strong\u003e \u003ca href=\"https://github.com/mcp-use/mcp-use-ts\"\u003e\u003cimg src=\"static/typescript.png\" alt=\"TypeScript\" height=\"20\" style=\"vertical-align: middle; margin-right: 4px;\"/\u003emcp-use/mcp-use-ts\u003c/a\u003e\u003c/h4\u003e\n\n## Features\n\n- 🤖 Natural language interface for MCP servers\n- 💬 Interactive chat interface with tool call visualization\n- ⚡ Direct integration with mcp-use (no API layer needed)\n- 🚀 Single command installation\n- 🔄 **Over a dozen LLM providers** (OpenAI, Anthropic, Google, Mistral, Groq, Cohere, and more)\n- ⚙️ **Slash commands** for configuration (like Claude Code)\n- 🔑 **Smart API key prompting** - automatically asks for keys when needed\n- 💾 **Persistent secure storage** - encrypted keys and settings saved across sessions\n\n## Install\n\n```bash\n$ npm install --global @mcp-use/cli\n```\n\n## Quick Start\n\n1. **Install and run**:\n\n   ```bash\n   $ npm install --global @mcp-use/cli\n   $ mcp-use\n   ```\n\n2. **Choose your model** (CLI handles API key setup automatically):\n\n   ```bash\n   # Just pick a model - that's it!\n   /model openai gpt-4o\n   /model anthropic claude-3-5-sonnet-20240620\n   /model google gemini-1.5-pro\n   /model groq llama-3.1-70b-versatile\n   /model ollama llama3\n\n   # CLI will prompt: \"Please enter your OPENAI API key:\"\n   # Paste your key and start chatting immediately!\n   ```\n\n3. **Get API keys** when prompted from providers like:\n   - [OpenAI](https://platform.openai.com/api-keys)\n   - [Anthropic](https://console.anthropic.com/)\n   - [Google AI](https://aistudio.google.com/app/apikey)\n   - [Mistral](https://console.mistral.ai/)\n   - [Groq](https://console.groq.com/keys)\n   - [Cohere](https://dashboard.cohere.com/api-keys)\n\n\u003e **Keys are stored securely encrypted** in `~/.mcp-use-cli/config.json` and persist across sessions.\n\n## Alternative Setup\n\nIf you prefer environment variables:\n\n```bash\nexport OPENAI_API_KEY=your_key_here\nexport ANTHROPIC_API_KEY=your_key_here\n# Then just run: mcp-use\n```\n\n## Usage\n\n```\n$ mcp-use --help\n\n  Usage\n    $ mcp-use\n\n  Options\n    --name        Your name (optional)\n    --config      Path to MCP configuration file (optional)\n\n  Examples\n    $ mcp-use\n    $ mcp-use --name=Jane\n\n  Environment Variables\n    \u003cPROVIDER\u003e_API_KEY    Set API keys (e.g., OPENAI_API_KEY, ANTHROPIC_API_KEY)\n\n  Setup\n    1. Run: mcp-use\n    2. Use /model or /setkey to configure an LLM.\n    3. Use /server commands to connect to your tools.\n    4. Start chatting!\n```\n\n## Connecting to Tools (MCP Servers)\n\nThis CLI is a client for [Model Context Protocol (MCP)](https://github.com/mcp-use/mcp-spec) servers. MCP servers act as tools that the AI can use. You need to connect the CLI to one or more servers to give it capabilities.\n\nYou can manage servers with the `/server` commands:\n\n```bash\n# Add a new server configuration by pasting its JSON definition\n/server add\n\n# List configured servers\n/servers\n\n# Connect to a configured server\n/server connect \u003cserver-name\u003e\n\n# Disconnect from a server\n/server disconnect \u003cserver-name\u003e\n```\n\nWhen you add a server, you'll be prompted for its JSON configuration. Here are examples for local and remote servers:\n\n**Local Server Example (e.g., a filesystem tool):**\n\n```json\n{\n\t\"mcpServers\": {\n\t\t\"filesystem-tool\": {\n\t\t\t\"command\": \"npx\",\n\t\t\t\"args\": [\n\t\t\t\t\"-y\",\n\t\t\t\t\"@modelcontextprotocol/server-filesystem\",\n\t\t\t\t\"/path/to/your/project\"\n\t\t\t],\n\t\t\t\"env\": {}\n\t\t}\n\t}\n}\n```\n\n**Remote Server Example (e.g., an SSE endpoint):**\n\n```json\n{\n\t\"mcpServers\": {\n\t\t\"remote-tool\": {\n\t\t\t\"url\": \"http://127.0.0.1:8000/sse\"\n\t\t}\n\t}\n}\n```\n\nThis configuration would be pasted directly into the CLI after running `/server add`.\n\n## Slash Commands\n\nSwitch LLM providers and configure settings using slash commands:\n\n```bash\n# Set API keys (stored securely)\n/setkey openai sk-1234567890abcdef...\n/setkey anthropic ant_1234567890abcdef...\n/clearkeys  # Clear all stored keys\n\n# Switch models\n/model openai gpt-4o\n/model anthropic claude-3-5-sonnet-20240620\n/model google gemini-1.5-pro\n/model mistral mistral-large-latest\n/model groq llama-3.1-70b-versatile\n\n# List available models\n/models\n\n# Server Management\n/server add\n/servers\n/server connect \u003cname\u003e\n/server disconnect \u003cname\u003e\n\n# Configuration\n/config temp 0.5\n/config tokens 4000\n\n# Status and help\n/status\n/help\n```\n\n## Chat Examples\n\n- \"List files in the current directory\"\n- \"Create a new file called hello.txt with the content 'Hello, World!'\"\n- \"Search for files containing 'TODO'\"\n- \"What's the structure of this project?\"\n\n## Architecture\n\nThis CLI uses:\n\n- **Frontend**: React + Ink for the terminal UI\n- **Agent**: mcp-use MCPAgent for LLM + MCP integration\n- **LLM**: Your choice of 12+ providers\n- **Transport**: Direct TypeScript integration (no API layer)\n\n## Privacy \u0026 Telemetry\n\nThis package uses [Scarf](https://scarf.sh) to collect basic installation analytics to help us understand how the package is being used. This data helps us improve the tool and prioritize features.\n\n### What data is collected?\n\nScarf collects:\n\n- Operating system information\n- IP address (used only for company lookup, not stored)\n- Limited dependency tree information (hashed for privacy)\n\n**No personally identifying information is stored.**\n\n### How to disable telemetry\n\nYou can opt out of analytics in several ways:\n\n**Option 1: Environment variable**\n\n```bash\nexport SCARF_ANALYTICS=false\n```\n\n**Option 2: Standard Do Not Track**\n\n```bash\nexport DO_NOT_TRACK=1\n```\n\n**Option 3: For package maintainers**\nIf you distribute a package that depends on this CLI, you can disable analytics for all your downstream users by adding this to your `package.json`:\n\n```json\n{\n\t\"scarfSettings\": {\n\t\t\"enabled\": false\n\t}\n}\n```\n\nFor more information about Scarf and privacy, visit [scarf.sh](https://scarf.sh).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcp-use%2Fmcp-use-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcp-use%2Fmcp-use-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcp-use%2Fmcp-use-cli/lists"}