Skip to content

Running Duckduckgo Server #32

@ionflow

Description

@ionflow

Description

Ran through the Readme to test out the mc bot with duckduckgo and getting this error:

I didn't set my ANTHROPIC_API_KEY environment variable correctly.

(.venv) ionflow@MacBook-Pro python % mc bot --servers duckduckgo --port 8052
Starting duckduckgo MCP server on localhost:8052...
Waiting for duckduckgo server to start...
INFO:     Started server process [63849]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://localhost:8052 (Press CTRL+C to quit)
INFO:     ::1:60577 - "GET /sse HTTP/1.1" 200 OK
INFO:     ::1:60578 - "POST /messages/?session_id=625856838bb8472cb40833ee0e828490 HTTP/1.1" 202 Accepted
INFO:     ::1:60578 - "POST /messages/?session_id=625856838bb8472cb40833ee0e828490 HTTP/1.1" 202 Accepted
INFO:     ::1:60578 - "POST /messages/?session_id=625856838bb8472cb40833ee0e828490 HTTP/1.1" 202 Accepted

Enter your query (or 'exit'/'quit' to end): famous french artists
Processing query...
Error: unhandled errors in a TaskGroup (1 sub-exception)

Shutting down servers...
INFO:     Shutting down
INFO:     Waiting for background tasks to complete. (CTRL+C to force quit)
Server process still running, killing...
All servers shutdown complete
╭──────────────────────────────────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────────────────────────────────╮
│ /Users/ionflow/Sites/mcp-community/python/mcp_community/run.py:116 in mcp_client                                                                                          │
│                                                                                                                                                                            │
│   113 │   ):                                                                                                                                                               │
│   114 │   │   # Initialize the connection                                                                                                                                  │
│   115 │   │   await session.initialize()                                                                                                                                   │
│ ❱ 116 │   │   yield session                                                                                                                                                │
│   117                                                                                                                                                                      │
│                                                                                                                                                                            │
│ ╭─────────────────────────────────── locals ───────────────────────────────────╮                                                                                           │
│ │              read = MemoryObjectReceiveStream(                               │                                                                                           │
│ │                     │   _state=MemoryObjectStreamState(                      │                                                                                           │
│ │                     │   │   max_buffer_size=0,                               │                                                                                           │
│ │                     │   │   buffer=deque(),                                  │                                                                                           │
│ │                     │   │   open_send_channels=0,                            │                                                                                           │
│ │                     │   │   open_receive_channels=0,                         │                                                                                           │
│ │                     │   │   waiting_receivers=OrderedDict(),                 │                                                                                           │
│ │                     │   │   waiting_senders=OrderedDict()                    │                                                                                           │
│ │                     │   ),                                                   │                                                                                           │
│ │                     │   _closed=True                                         │                                                                                           │
│ │                     )                                                        │                                                                                           │
│ │ sampling_callback = None                                                     │                                                                                           │
│ │           session = <mcp.client.session.ClientSession object at 0x1065beb30> │                                                                                           │
│ │               url = 'http://localhost:8052/sse'                              │                                                                                           │
│ │             write = MemoryObjectSendStream(                                  │                                                                                           │
│ │                     │   _state=MemoryObjectStreamState(                      │                                                                                           │
│ │                     │   │   max_buffer_size=0,                               │                                                                                           │
│ │                     │   │   buffer=deque(),                                  │                                                                                           │
│ │                     │   │   open_send_channels=0,                            │                                                                                           │
│ │                     │   │   open_receive_channels=0,                         │                                                                                           │
│ │                     │   │   waiting_receivers=OrderedDict(),                 │                                                                                           │
│ │                     │   │   waiting_senders=OrderedDict()                    │                                                                                           │
│ │                     │   ),                                                   │                                                                                           │
│ │                     │   _closed=True                                         │                                                                                           │
│ │                     )                                                        │                                                                                           │
│ ╰──────────────────────────────────────────────────────────────────────────────╯                                                                                           │
│                                                                                                                                                                            │
│ /Users/ionflow/Sites/mcp-community/python/mcp_community/cli/commands/bot.py:216 in run_bot                                                                                │
│                                                                                                                                                                            │
│   213 │   │   │   │   │   if not query:                                                                                                                                    │
│   214 │   │   │   │   │   │   continue                                                                                                                                     │
│   215 │   │   │   │   │   print("[bold cyan]Processing query...[/bold cyan]")                                                                                              │
│ ❱ 216 │   │   │   │   │   response = await loop(combined_session, query, converted_tools)                                                                                  │
│   217 │   │   │   │   │   print("\n[bold green](Bot):[/bold green]")                                                                                                       │
│   218 │   │   │   │   │   print(response)               

Python, MCP Community & OS Versions, related packages (not required)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmcp-communityLinear filter label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions