Skip to content

Conversation

bhouston
Copy link
Member

@bhouston bhouston commented Mar 12, 2025

Add Basic Model Context Protocol (MCP) Support

This PR implements basic support for the Model Context Protocol (MCP) in MyCoder as suggested in issue #15.

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:

  • Integration with the official @modelcontextprotocol/sdk package
  • Configuration support in mycoder.config.js for MCP servers and default resources
  • A new MCP tool for the agent to list and fetch resources from MCP servers
  • Documentation in the README.md file

The implementation successfully builds and should work with any MCP-compatible server.

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

Closes #241
Related to #15

cc @bhouston

@bhouston bhouston merged commit 9398c56 into main Mar 12, 2025
1 check passed
Copy link

🎉 This PR is included in version mycoder-agent-v1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version mycoder-v1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Basic Model Context Protocol (MCP) Support

1 participant