Skip to content

Conversation

@AnandVishesh1301
Copy link

Related: #70

This is a DRAFT PR to introduce the initial addition of 3 network diagnostics tools in the MCP server.

What this draft includes

  • Skeleton tools in src/app/[transport]/route.ts (not the full logic yet):
    • capture_network_traffic
    • block_resources
    • analyze_network_performance
  • New helper types/stubs in src/lib/network.ts
  • (No docs committed yet)

Why

Questions for reviewers

  1. Defaults: filter=all, include_body=false, max_body_size=100_000, and Redis‑only persistence ; acceptable?
  2. Can also add get_network_traffic / clear_network_traffic in the future to support this?
  3. Any other Recommendations/Advice?

Implementation plan

  • Step 1: Hook up Kernel/CDP; minimal capture (headers only), Redis persistence with size/TTL safeguards.
  • Step 2: Body snippet (size‑limited), blocking profiles, first pass at analysis heuristics (e.g., common trackers/endpoints).
  • Step 3: Turn on real logic behind these skeletons; add example prompts and update docs; consider optional HAR export + quick‑actions.

Plan after

Once capture/block/analyze are implemented and stable, I can maybe refactor helper logic into a structured module layout, consistent with src/lib/resolvers/*:

  • src/lib/network/capture.ts
  • src/lib/network/block.ts
  • src/lib/network/analyze.ts
  • src/lib/network/types.ts

Testing plan

  • Manual testing MCP Hosts (e.g., Cursor)
  • Validate tool schemas and responses using MCP Inspector.
  • Cover scenarios of: simple navigation capture, multi tab capture, applying block rules, re‑running tasks, error handling.

Future Docs plan

  • Update README “Tools” to include capture_network, block_resources, and analyze_network once functionality is wired.
  • Update public MCP Server docs: https://www.onkernel.com/docs/reference/mcp-server with new tool descriptions and parameters

Status: Draft/WIP — seeking feedback on API shape, defaults, and the staged implementation before wiring up the backing logic.

feat(network): add network diagnostics tool skeletons   - Add capture_network_traffic skeleton  - Add block_resources skeleton  - Add analyze_network_performance skeleton  - Introduce src/lib/network.ts with types + no-op stubs  - Note: Not functional right now; implementation to follow
@vercel
Copy link

vercel bot commented Nov 4, 2025

@AnandVishesh1301 is attempting to deploy a commit to the kernel Team on Vercel.

A member of the Team first needs to authorize it.

@mesa-dot-dev
Copy link

mesa-dot-dev bot commented Nov 4, 2025

Mesa Description

Related: #70

This is a DRAFT PR to introduce the initial addition of 3 network diagnostics tools in the MCP server.

What this draft includes

  • Skeleton tools in src/app/[transport]/route.ts (not the full logic yet):
    • capture_network_traffic
    • block_resources
    • analyze_network_performance
  • New helper types/stubs in src/lib/network.ts
  • (No docs committed yet)

Why

Questions for reviewers

  1. Defaults: filter=all, include_body=false, max_body_size=100_000, and Redis‑only persistence ; acceptable?
  2. Can also add get_network_traffic / clear_network_traffic in the future to support this?
  3. Any other Recommendations/Advice?

Implementation plan

  • Step 1: Hook up Kernel/CDP; minimal capture (headers only), Redis persistence with size/TTL safeguards.
  • Step 2: Body snippet (size‑limited), blocking profiles, first pass at analysis heuristics (e.g., common trackers/endpoints).
  • Step 3: Turn on real logic behind these skeletons; add example prompts and update docs; consider optional HAR export + quick‑actions.

Plan after

Once capture/block/analyze are implemented and stable, I can maybe refactor helper logic into a structured module layout, consistent with src/lib/resolvers/*:

  • src/lib/network/capture.ts
  • src/lib/network/block.ts
  • src/lib/network/analyze.ts
  • src/lib/network/types.ts

Testing plan

  • Manual testing MCP Hosts (e.g., Cursor)
  • Validate tool schemas and responses using MCP Inspector.
  • Cover scenarios of: simple navigation capture, multi tab capture, applying block rules, re‑running tasks, error handling.

Future Docs plan

  • Update README “Tools” to include capture_network, block_resources, and analyze_network once functionality is wired.
  • Update public MCP Server docs: https://www.onkernel.com/docs/reference/mcp-server with new tool descriptions and parameters

Status: Draft/WIP — seeking feedback on API shape, defaults, and the staged implementation before wiring up the backing logic.

Description generated by Mesa. Update settings

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