MCP Flask Web Application logo

MCP Flask Web Application

by fbeunder

This Flask web application allows users to interact with LLM models (OpenAI and Anthropic) through a web interface and enriches prompts with context from MCP tools like Brave Search and GitHub. It simplifies the process of accessing and utilizing LLMs with contextual information.

View on GitHub

Last updated: N/A

What is MCP Flask Web Application?

This is a Flask web application that integrates LLM models (OpenAI and Anthropic) and Model Context Protocol (MCP) tools (Brave Search and GitHub) to facilitate prompt enrichment.

How to use MCP Flask Web Application?

To use the application, clone the repository, install dependencies, configure API keys, start the application with python app.py, and access the web interface in your browser. Start MCP-servers (optional). Input query, and the application will display the answer of the AI model, also possible to show the full prompt.

Key features of MCP Flask Web Application

  • LLM model selection (GPT-3.5 and Claude 2)

  • Prompt input and response display

  • MCP-tools management (start/stop Brave Search and GitHub)

  • Context enrichment from active tools

  • Full prompt display including added context

Use cases of MCP Flask Web Application

  • Quickly accessing LLMs with contextual information

  • Enriching prompts with web search results

  • Incorporating GitHub data into prompts

  • Prototyping LLM applications with external data sources

FAQ from MCP Flask Web Application

What is MCP?

MCP (Model Context Protocol) is an open protocol that enables AI models to interact with external sources through standardized server interfaces to gather and incorporate additional context.

What LLM models can be used?

Currently, the application supports OpenAI GPT-3.5 and Anthropic Claude 2. API keys for these services are required.

How do I install the application?

Clone the repository, create a virtual environment, install the required packages from requirements.txt, configure the API keys via environment variables or a .env file, and then run python app.py.

How do I configure the API keys?

API keys can be configured either by setting environment variables or by creating a .env file with the necessary key-value pairs for OpenAI, Anthropic, Brave Search, and GitHub.

How do I start MCP-servers?

MCP-servers can be started automatically from the web interface. Click the "Start Brave Search" or "Start GitHub" button and they will start automatically.