AI Assistant With MCP Server And Tools Using Langchain And Groq.
No description available
Ask AI about AI Assistant With MCP Server And Tools Using Langchain And Groq.
Powered by Claude Β· Grounded in docs
I know everything about AI Assistant With MCP Server And Tools Using Langchain And Groq.. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
AI Assistant with MCP, LangChain, and Groq
A small terminal chat app that connects a Groq LLM to multiple MCP (Model Context Protocol) servers through mcp-use and LangChain. You type natural language; the agent picks tools (browser automation, search, etc.) and runs them for you.
Features
- Multi-server MCP β Configured via
browser_mcp.json(Playwright browser, Airbnb, DuckDuckGo search). - Groq β Fast inference via
langchain-groq(ChatGroq). - Conversation memory β
MCPAgentkeeps context across turns until you clear it. - Robust tool calls β Custom middleware strips
nulloptional arguments so strict MCP servers (e.g. Playwright) do not reject JSONnullfor optional string fields. - Browser search hints β System instructions steer the model toward reliable patterns (e.g. Google: navigate to
https://www.google.com/search?q=...instead of typing into ambiguous homepage refs).
Requirements
| Requirement | Notes |
|---|---|
| Python | 3.13+ (see pyproject.toml) |
| uv | Used to create the venv and run the app |
| Node.js | npx must work; MCP servers in this project start via npx |
| Groq API key | Groq Console |
Quick start
-
Clone the repository (use the exact URL from your GitHub repo page).
-
Install dependencies
cd mcpdemos uv sync -
Create a
.envfile in the project root (this file is gitignored):GROQ_API_KEY=your_groq_api_key_here -
Run the chat loop
uv run app.pyFirst run may download MCP packages through
npx; allow network access.
Usage
- Type your request at the
You:prompt (e.g. open a site, search, or combine steps). exit,quit, orbyeβ Leave the app.clear,clear history, orresetβ Clear the agentβs conversation memory.
Configuration
browser_mcp.json
Defines MCP servers in the standard mcpServers shape. This project includes:
| Server | Purpose |
|---|---|
| playwright | @playwright/mcp β browser navigate, click, type, snapshot, etc. |
| airbnb | @openbnb/mcp-server-airbnb |
| duckduckgo-search | duckduckgo-mcp-server |
You can add/remove servers or change args; restart the app after edits.
app.py (knobs you might change)
config_fileβ Path to the MCP JSON config (default:browser_mcp.json).ChatGroqβmodel,max_tokens,temperature.MCPAgentβmax_steps,memory_enabled,additional_instructions(browser/search behavior).
Project layout
| Path | Role |
|---|---|
app.py | Async chat loop, MCP client, middleware, agent setup |
browser_mcp.json | MCP server definitions |
main.py | Minimal entry stub (primary demo is app.py) |
pyproject.toml / uv.lock | Dependencies and lockfile |
Troubleshooting
Repository not found(git) β Confirm the remote URL matches your GitHub repo slug exactly (including any trailing.in the repo name if you created it that way).429from Groq β Rate limit; wait and retry or check Groq rate limits.- Playwright / browser errors β Ensure Node and
npxwork; first run may install@playwright/mcp. For Google searches, the app is tuned to prefer directsearch?q=URLs to avoid filling non-input elements. - Telemetry β mcp-use may log anonymized telemetry; set
MCP_USE_ANONYMIZED_TELEMETRY=falsein the environment if you want it off.
License
Specify your license here (e.g. MIT) or add a LICENSE file.
