Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*~
4 changes: 2 additions & 2 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ RUN pip install --no-cache-dir \
beautifulsoup4

# Copy the MCP server script
COPY ddg-mcp-server.py /app/
COPY ddg_mcp_server.py /app/

# Expose the MCP server port
EXPOSE 9870

# Run the MCP server
CMD ["python", "ddg-mcp-server.py"]
CMD ["python", "ddg_mcp_server.py"]

6 changes: 5 additions & 1 deletion ddg-mcp-server.py → ddg_mcp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,4 +237,8 @@ async def fetch_content(url: str, ctx: Context) -> str:
"""
return await fetcher.fetch_and_parse(url, ctx)

mcp.run(transport="streamable-http")
def main():
mcp.run(transport="streamable-http")

if __name__ == "__main__":
main()
31 changes: 31 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "ddg-mcp-server"
version = "0.1.0"
authors = [{name = "Nick Clyde"}]
description = "DuckDuckGo MCP server for search and web content fetching"
readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"mcp",
"httpx",
"beautifulsoup4",
]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]

[project.urls]
Homepage = "https://github.com/trustgraph-ai/ddg"
Original = "https://github.com/nickclyde/duckduckgo-mcp-server"

[project.scripts]
ddg-mcp-server = "ddg_mcp_server:main"

[tool.setuptools]
py-modules = ["ddg_mcp_server"]