Skip to content

Conversation

@stronk7
Copy link
Member

@stronk7 stronk7 commented Apr 7, 2025

This brings Model Context Protocol (MCP) server support to Wiki-RAG providing all the features already available in the OpenAI server and more:

  • Prompts:
    • get_system_prompt: Get the system prompt, optionally parsing arguments.
    • get_user_prompt: Get the user prompt, optionally parsing arguments.
  • Tools:
    • retrieve: Get the raw results from the (vector) database.
    • optimise: Post-process the results providing the optimised context and sources.
    • generate: Run the whole stack, returning the answer from the LLM.
  • Resources:
    • get_10_pages: Return the first 10 parsed pages from the target wikis.
    • get_100_pages: Return the first 100 parsed pages from the target wikis.
    • get_pages/start/number: Return the specified number of pages from a given start.

Important: The whole MCP server is UNPROTECTED, so take it into
account depending of the deployments planned.

This is only a demo implementation to play with MCP and see how easy is to transform any other existing API to be MCP-compatible.

Fixes #4

This brings Model Context Protocol (MCP) server support to Wiki-RAG
providing all the features already available in the OpenAI server
and more:

- Prompts:
  - get_system_prompt: Get the system prompt, optionally parsing arguments.
  - get_user_prompt: Get the user prompt, optionally parsing arguments.
- Tools:
  - retrieve: Get the raw results from the (vector) database.
  - optimise: Post-process the results providing the optimised context
    and sources.
  - generate: Run the whole stack, returning the answer from the LLM.
- Resources:
  - get_10_pages: Return the first 10 parsed pages from the target wikis.
  - get_100_pages: Return the first 100 parsed pages from the target wikis.
  - get_pages/start/number: Return the specified number of pages from a given start.

Important: The whole MCP server is UNPROTECTED, so take it into
  account depending of the deployments planned.

This is only a demo implementation to play with MCP and see how
easy is to transform any other existing API to be MCP-compatible.

Fixes moodlehq#4
@stronk7 stronk7 merged commit ea894a6 into moodlehq:main Apr 7, 2025
1 check passed
@stronk7 stronk7 deleted the mcp branch April 7, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add MCP server support

1 participant