feat: MCP HTTP bridge, DevOps knowledge service, calculator, Anthropic client, bug fixes#1
Open
ljluestc wants to merge 13 commits intowdndev:mainfrom
Open
feat: MCP HTTP bridge, DevOps knowledge service, calculator, Anthropic client, bug fixes#1ljluestc wants to merge 13 commits intowdndev:mainfrom
ljluestc wants to merge 13 commits intowdndev:mainfrom
Conversation
- Fix mcp_client.py list_tools(): use tools_response.tools instead of broken tuple iteration (incompatible with mcp>=1.6) - Fix server_config.json: replace hardcoded Windows paths with relative ./services paths, switch to weather_service_us.py (no API key needed) - Fix time_service.py: timezone underscore-to-slash replacement now preserves valid TZ names like America/New_York Tested: time_service (3 timezones), weather_service_us (SF forecast), mcp_chatbot module imports + config loading all pass. Co-Authored-By: Oz <oz-agent@warp.dev>
- anthropic_mcp_client.py: MCP client using Anthropic SDK directly - Supports Claude's native tool_use content blocks (not OpenAI compat) - Same CLI interface as simple_mcp_client.py - Works with any MCP server (time, weather, etc.) Co-Authored-By: Oz <oz-agent@warp.dev>
- Add calculator_service.py: math eval + unit conversions (temp/length/weight) - Add test_services.py: end-to-end test suite for all MCP services - Add calculator to server_config.json (3 services total) - Add anthropic + httpx deps to pyproject.toml - All 4 tests pass: time, calculator, unit_convert, weather_us Co-Authored-By: Oz <oz-agent@warp.dev>
- services/devops_knowledge_service.py: MCP service serving 810 Q&A pairs (405 DevOps + 405 LLM) with search, browse, quiz, and detail tools - anthropic_mcp_client.py: fix API key to check both ANTHROPIC_API_KEY and ANTHROPIC_KEY env vars - Tested end-to-end: Claude discovers 6 tools, searches knowledge base, returns formatted answers Co-Authored-By: Oz <oz-agent@warp.dev>
Made-with: Cursor
Made-with: Cursor
- Fix configuration.py to load .env from project root (not CWD) - Add __init__.py to all mcp_chatbot subpackages - Add config/mcp_config.json for anthropic_mcp_client.py - Add data/ directory for devops_knowledge_service datasets - Clean up stray files, update .gitignore and .env.example Co-Authored-By: Oz <oz-agent@warp.dev>
Made-with: Cursor
…anup - Load .env from project root (Path) for reliable env on Linux - Fix selcect_prompt_template → select_prompt_template - Fix stdio_context → stdio_transport in cleanup - Remove unused dotenv_values import in stream client Made-with: Cursor
- mcp_chatbot/__main__.py: run via python -m mcp_chatbot - mcp_chatbot/__init__.py: lazy-export main for from mcp_chatbot import main Made-with: Cursor
- mcp_chatbot_main.py: remove unused json import - chat_session.py: fix argments → arguments typo - mcp_tool.py: fix docstring typo - res_prompt_services.py: remove unused glob, duplicate Resource, unused TextContent/EmbeddedResource imports Co-Authored-By: Oz <oz-agent@warp.dev>
FastAPI server that spawns MCP services as stdio subprocesses and exposes them as REST endpoints: GET /tools — list all available MCP tools POST /chat — query via LLM + MCP tool loop POST /tool — directly call a specific tool GET /health — server status Reads config/server_config.json, supports all env vars from .env. Default port: 8100 Co-Authored-By: Oz <oz-agent@warp.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds 13 commits on top of upstream main with the following changes:
New features
mcp_http_bridge.py): FastAPI server exposing all MCP tools as REST endpoints (GET /tools,POST /chat,POST /tool) for web UI integrationBug fixes
.envloading from project root (works on Linux/macOS/Windows)selcect→select), unused imports, variable shadowing__init__.pyand__main__.pyforpython -m mcp_chatbotDependencies
fastapi,uvicorn,anthropictopyproject.tomlCo-Authored-By: Oz oz-agent@warp.dev