Skip to content

feat(mcp): implement MCP server framework #46

@galligan

Description

@galligan

Problem

@outfitter/mcp is not implemented. Blocks building any MCP-based tools. Core to the dual-transport (CLI + MCP) architecture.

Required

Per SPEC.md and PLAN.md:

  • createMcpServer(options) - Factory for MCP server
  • defineTool<I, O, E>() - Type-safe tool registration
  • defineResource() - Resource registration
  • Pagination adapter for cursor-based results
  • Error translation (TaggedError → MCP error responses)
  • Transport-agnostic handler invocation

Dependencies

  • @modelcontextprotocol/sdk
  • @outfitter/contracts
  • @outfitter/logging

Acceptance Criteria

  • McpServer wraps @modelcontextprotocol/sdk
  • Tools invoke handlers with HandlerContext
  • Errors translated to MCP error format
  • Pagination cursors work across MCP calls
  • Integration test with CLI harness

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/criticalP0: Must fix - blocks core contracts or has security implications

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions