Skip to content

[MCP] Extract config resolution into a tested config module #559

Description

@manoahLinks

Summary

Network, URL, and contract-id resolution runs as top-level side effects in mcp/src/index.ts, including two process.exit(1) calls, which makes the config path effectively untestable.

Scope

  • Keep the implementation aligned with the existing MindVault architecture.
  • Add or update automated tests.
  • Update docs when the change affects contributors, deployers, or agent users.

Acceptance criteria

  • Config resolution moves to a dedicated module that returns a typed config object or a validation error instead of exiting.
  • The entrypoint keeps the current fail-fast behaviour and messages, with tests covering valid and invalid environments.
  • Failure cases are deterministic and safe to show in issue-driven contributor work.
  • Relevant local tests pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: mcpMCP server for AI agents (mcp/)difficulty: mediumModerate effort; touches a couple of areas or needs some contexttype: refactorCode change that neither fixes a bug nor adds a feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions