Skip to content

feat: MCP HTTP bridge, DevOps knowledge service, calculator, Anthropic client, bug fixes#1

Open
ljluestc wants to merge 13 commits intowdndev:mainfrom
ljluestc:main
Open

feat: MCP HTTP bridge, DevOps knowledge service, calculator, Anthropic client, bug fixes#1
ljluestc wants to merge 13 commits intowdndev:mainfrom
ljluestc:main

Conversation

@ljluestc
Copy link

@ljluestc ljluestc commented Mar 8, 2026

Summary

Adds 13 commits on top of upstream main with the following changes:

New features

  • MCP HTTP Bridge (mcp_http_bridge.py): FastAPI server exposing all MCP tools as REST endpoints (GET /tools, POST /chat, POST /tool) for web UI integration
  • DevOps Knowledge Service: MCP tool serving 800+ DevOps/LLM interview Q&A with search, browse, quiz capabilities
  • Calculator Service: Math expression evaluation and unit conversion MCP tools
  • Anthropic Claude Client: Native Claude tool-calling MCP client alongside the existing OpenAI-compatible one
  • Test Suite: End-to-end test script for all services

Bug fixes

  • Robust .env loading from project root (works on Linux/macOS/Windows)
  • Fix typos (selcectselect), unused imports, variable shadowing
  • Add JSONL fallback for dataset loading
  • Add __init__.py and __main__.py for python -m mcp_chatbot
  • Updated server configs to use relative paths

Dependencies

  • Added fastapi, uvicorn, anthropic to pyproject.toml

Co-Authored-By: Oz oz-agent@warp.dev

ljluestc and others added 13 commits March 7, 2026 17:10
- 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
- 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>
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant