feat: Add LLM provider adapter documentation and examp#1709
Open
dgenio wants to merge 10 commits intomodelcontextprotocol:mainfrom
Open
feat: Add LLM provider adapter documentation and examp#1709dgenio wants to merge 10 commits intomodelcontextprotocol:mainfrom
dgenio wants to merge 10 commits intomodelcontextprotocol:mainfrom
Conversation
- Add comprehensive guide for converting MCP tools to LLM provider formats - Include adapter implementations for Gemini, OpenAI, and Claude - Add runnable example demonstrating all three adapters - Addresses modelcontextprotocol#235
- Add link in docs/index.md Getting Started section - Add entry in mkdocs.yml navigation - Add reference in README.md Advanced Usage section - Register example script in pyproject.toml
- Remove emojis from example file to fix encoding issues - Simplify README snippet to use snippet-source marker - Add missing newlines at end of files - Fixes linting errors in README snippet
- Remove null bytes and extra newlines from files - Ensure files end with exactly one newline - Fix UTF-8 encoding issues in example file
- Remove emoji character that was causing encoding issues - Ensure proper UTF-8 encoding throughout file
- Add provider names to duplicate headings (Basic Implementation, Usage Example) - Fixes MD024/no-duplicate-heading markdownlint errors
- Use Callable from collections.abc instead of lowercase callable - Remove unnecessary isinstance check (dict[str, Any] is always dict) - Add explicit type annotations for variables to satisfy pyright
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses #235 by providing comprehensive documentation and examples for creating adapters that convert MCP tool schemas to various LLM provider formats (Gemini, OpenAI, Claude).
Changes
New documentation page (
docs/llm-adapters.md): Comprehensive guide covering:Runnable example (
examples/snippets/clients/llm_adapter_example.py): Demonstrates:Documentation updates: Added references in:
docs/index.md- Getting Started sectionREADME.md- Advanced Usage and Documentation sectionsmkdocs.yml- Navigation menuDesign Decision
Following maintainer feedback, this PR provides documentation and examples rather than official adapter utilities. This approach:
Testing
Related
Closes #235