Skip to content

Mcp#47

Draft
Dawe000 wants to merge 14 commits intoagent0lab:mainfrom
Dawe000:mcp
Draft

Mcp#47
Dawe000 wants to merge 14 commits intoagent0lab:mainfrom
Dawe000:mcp

Conversation

@Dawe000
Copy link
Copy Markdown
Contributor

@Dawe000 Dawe000 commented Mar 26, 2026

MCP client integration

Adds an MCP client for Streamable HTTP (initialize, session header, tools/list, tools/call, prompts/resources where applicable), wiring on Agent / SDK, plus tests and a small live example.

Tests

From the repo root:

npm install
npm run build   # optional; tests use ts-jest against sources

All MCP-related Jest tests (unit + integration + Anvil):

RUN_MCP_INTEGRATION=1 RUN_MCP_ANVIL=1 npm test -- --testPathPattern=mcp

Convenience scripts (same suites, env flags baked in):

npm run test:mcp-integration   # spawns local MCP test server
npm run test:mcp-anvil         # needs Foundry/anvil + MCP

Unit tests only (no integration env):

npm test -- --testPathPattern=mcp-client

Integration and Anvil suites are skipped unless RUN_MCP_INTEGRATION=1 / RUN_MCP_ANVIL=1 is set.

Examples

MCP demo (loads an agent and calls a tool; uses examples/_env):

npx tsx examples/mcp-demo.ts

Set RPC_URL and any vars your examples/_env.ts expects.

Local MCP server (manual testing / debugging):

npm run mcp-server

@Dawe000 Dawe000 marked this pull request as ready for review March 26, 2026 22:31
@Dawe000 Dawe000 marked this pull request as draft March 26, 2026 23:52
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