Skip to content

feat(02): add MCP tool integration pattern with parallel fan-out pipeline#6

Merged
ksopyla merged 2 commits into
mainfrom
dev
Apr 12, 2026
Merged

feat(02): add MCP tool integration pattern with parallel fan-out pipeline#6
ksopyla merged 2 commits into
mainfrom
dev

Conversation

@ksopyla
Copy link
Copy Markdown
Owner

@ksopyla ksopyla commented Mar 31, 2026

Summary

Adds Pattern 02: MCP Tool Integration -- exposes the crypto intelligence pipeline as an MCP tool with parallel fan-out/fan-in execution, alongside substantial infrastructure and documentation improvements.

Pattern 02 highlights

  • 5-agent parallel pipeline: Research Planner → [News Scanner | Project Profiler | Community Analyst] → Intelligence Compiler
  • Dual entry points: REST (POST /run on :8000) and MCP (research_crypto_project tool on :8001) running the same compiled LangGraph
  • Data source ownership: each research node owns one external source (DuckDuckGo or CoinGecko), no duplication
  • CoinGecko retry with exponential backoff, graceful degradation on partial failures
  • Full test suite: unit, API, and e2e tests for the new pattern

Pattern 01 improvements

  • Renamed 01-multi-agent-single-system01-orchestrator-pipeline to match curriculum terminology
  • Added proper test suite (unit, API, e2e) and endpoints.http

Infrastructure & tooling

  • Shared base Docker image (infra/docker/base/Dockerfile.agent) for all examples
  • Per-directory mypy wrapper (scripts/linting/run_mypy.py) to avoid duplicate module errors in the monorepo
  • Test suite runner (scripts/testing/run_test_suite.py) with auto-discovery
  • Updated CI workflows to use the wrapper scripts
  • New .cursor/mcp.json, skills, and rules for development workflow

Documentation

  • New docs/vision.md and expanded docs/curriculum.md with full pattern progression
  • CHANGELOG.md and AGENTS.md with architecture decisions
  • Comprehensive README for both patterns with Mermaid diagrams
  • Research reports on agent server alternatives and distributed agent engineering

Shared library (libs/common)

  • Standardized LangSmith tracing workflow with configure_tracing()
  • Config and LLM factory improvements

Test plan

  • uv run python scripts/testing/run_test_suite.py passes for all examples
  • uv run python scripts/linting/run_mypy.py passes
  • uv run ruff check . and uv run ruff format --check . pass
  • docker compose up --build works for both examples 01 and 02
  • MCP endpoint at :8001/sse is discoverable by Claude Desktop / Cursor
  • REST endpoint POST /run returns full intelligence report with intermediate artifacts

ksopyla added 2 commits March 30, 2026 22:22
Document the architecture redesign of the MCP tool integration in CHANGELOG.md, detailing the addition of a parallel fan-out/fan-in graph, improved agent prompts, and enhanced data source management. Update README.md to reflect the new path for the CHANGELOG and clarify the project structure. Ensure consistency in documentation across all relevant files.
…d query outputs

Revise the research planner to generate structured NEWS_QUERIES and COMMUNITY_QUERIES, improving downstream agent interactions. Update community analyst and news scanner nodes to utilize these structured queries instead of raw user input, enhancing data handling and reducing reliance on regex parsing. Implement timeout handling in the MCP server for better error management during pipeline execution. Ensure all relevant tests are updated to reflect these changes, maintaining robust coverage across the new functionality.
@ksopyla ksopyla merged commit 4753198 into main Apr 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant