Skip to content

Add Tharga.Communication.Mcp package#9

Merged
poxet merged 2 commits into
masterfrom
feature/mcp-provider
May 2, 2026
Merged

Add Tharga.Communication.Mcp package#9
poxet merged 2 commits into
masterfrom
feature/mcp-provider

Conversation

@poxet
Copy link
Copy Markdown
Contributor

@poxet poxet commented May 2, 2026

Summary

New sibling package Tharga.Communication.Mcp exposing Communication runtime data via MCP (Model Context Protocol) — fulfills the pending request from Neurolito and Eplicta Core.

Resources (System scope, read-only)

URI Description
communication://clients Connected SignalR clients with metadata
communication://subscriptions Active server subscriptions and counts
communication://handlers Registered post and send message handlers

Required additive APIs in Tharga.Communication

  • ClientStateServiceBase.GetConnectionInfosAsync() — non-generic enumeration of connected clients
  • IHandlerTypeService.GetAll() — enumeration of registered handlers

Both are additive — no breaking changes.

Skipped from original request

  • send message tool — deferred for safety; LLM-driven sends could trigger unintended handlers
  • list dead letters tool — Communication is SignalR-only with no message persistence

Pipeline

GHA workflow updated to pack both packages on the same version (next: 0.1.5).

Usage

builder.AddThargaMcp(mcp => mcp.AddCommunication());
app.UseThargaMcp();

Test plan

  • Build clean (0 warnings)
  • All 115 tests pass (6 new for the MCP provider, plus tests for the new enumeration APIs)
  • Pack succeeds locally for both packages
  • Verify GHA pipeline runs green on this PR
  • Verify both prerelease NuGet packages get published

poxet added 2 commits May 2, 2026 20:54
New sibling package exposing Communication runtime data via MCP:
- communication://clients — connected clients with metadata
- communication://subscriptions — active subscriptions with counts
- communication://handlers — registered post/send handlers

Required additive APIs in Tharga.Communication:
- ClientStateServiceBase.GetConnectionInfosAsync() returning IAsyncEnumerable<IClientConnectionInfo>
- IHandlerTypeService.GetAll() returning IReadOnlyCollection<HandlerTypeInfo>

GHA pipeline updated to pack both packages. 6 new tests, 115 total pass.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2026

Codecov Report

❌ Patch coverage is 97.84946% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ga.Communication.Mcp/ThargaMcpBuilderExtensions.cs 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@poxet poxet merged commit 8b1dd10 into master May 2, 2026
5 of 6 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

Released as v0.1.5https://github.com/Tharga/Communication/releases/tag/0.1.5

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