ADR 0002: Use LangChain tools and LangGraph composition as the agent integration boundary

Context

TypeMCP needs an integration path for agent applications without adding a framework container, graph runtime, or model policy to the MCP core. A framework-specific container adapter would require lifecycle, discovery, and request-scope commitments that are unrelated to the tool interoperability users need.

Decision

Keep @theorvane/type-mcp framework-neutral and expose a tools-only @theorvane/type-mcp/langchain subpath. It reads existing decorated tool metadata, resolves a server through the existing explicit InstanceResolver, and returns LangChain structured tools.

LangGraph remains consumer-owned composition. Consumers pass a mutable copy of these tools to ToolNode and retain ownership of graph topology, models, authorization, persistence, and deployment. The adapter does not import LangGraph.

@langchain/core is an optional peer dependency of the adapter. @langchain/langgraph is not a package dependency or peer; it is an application choice and repository test/example dependency only.

Consequences

Positive

Trade-offs

Rejected alternatives