Skip to content

Implement Basic Model Context Protocol (MCP) Support #241

@bhouston

Description

@bhouston

Implement Basic Model Context Protocol (MCP) Support

As suggested in issue #15, this PR implements basic support for the Model Context Protocol (MCP) in MyCoder.

What is the Model Context Protocol (MCP)?

The Model Context Protocol is a standardized way for applications to provide context to Large Language Models (LLMs). It allows for:

  1. Resources - Exposing data to LLMs
  2. Tools - Providing functionality for LLMs to use
  3. Prompts - Defining reusable templates for LLM interactions
  4. Images - Handling image data automatically

Implementation Details

This initial implementation includes:

  • Configuration support in mycoder.config.js for MCP servers and default resources
  • A basic MCP client that can connect to MCP servers and fetch resources
  • A new MCP tool for the agent to list and fetch resources from MCP servers
  • Documentation in the README.md file

Next Steps

Future improvements could include:

  • Support for MCP tools (not just resources)
  • Support for MCP prompts
  • Automatic loading of default resources when the agent starts
  • A command-line interface for managing MCP servers and resources

Related Issues

cc @bhouston

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions