Sponsored by Deepsite.site

Metis MCP Tools

Created By
dagron788 months ago
A demo repository for testing the GitHub MCP server
Content

Metis MCP Tools

This repository contains a collection of Model Context Protocol (MCP) tools designed to enhance the Metis RAG application. These tools provide functionality for database management, vector store operations, document processing, and LLM interactions.

What is MCP?

The Model Context Protocol (MCP) is a standardized way for language models to interact with external tools and resources. It allows models to access data, perform actions, and utilize specialized capabilities beyond their training data.

Tools Overview

This repository includes the following MCP tools:

1. Database Management Tool

The Database Management Tool provides functionality for interacting with PostgreSQL databases in the Metis application.

Features:

  • Initialize database connections
  • Execute SQL queries
  • Get table schemas
  • List database tables

Usage Example:

// Initialize a database connection
const dbResult = await useMcpTool({
  serverName: 'database-tool',
  toolName: 'init_database_connection',
  arguments: {
    host: 'localhost',
    port: 5432,
    database: 'metis_db',
    user: 'metis_user',
    password: 'password123'
  }
});

// Execute a query
const queryResult = await useMcpTool({
  serverName: 'database-tool',
  toolName: 'execute_query',
  arguments: {
    query: 'SELECT * FROM documents LIMIT 10'
  }
});

2. Vector Store Tool

The Vector Store Tool provides functionality for interacting with vector databases like Chroma in the Metis application.

Features:

  • Initialize vector store connections
  • Create and manage collections
  • Add documents to collections
  • Query collections for similar documents
  • Delete documents from collections

Usage Example:

// Initialize a vector store connection
const vsResult = await useMcpTool({
  serverName: 'vector-store-tool',
  toolName: 'init_vector_store',
  arguments: {
    host: 'localhost',
    port: 8000
  }
});

// Create a collection
const collectionResult = await useMcpTool({
  serverName: 'vector-store-tool',
  toolName: 'get_or_create_collection',
  arguments: {
    name: 'metis_documents'
  }
});

// Query the collection
const queryResult = await useMcpTool({
  serverName: 'vector-store-tool',
  toolName: 'query_collection',
  arguments: {
    queryTexts: ['How does quantum computing work?'],
    nResults: 5
  }
});

3. Document Processing Tool

The Document Processing Tool provides functionality for loading, processing, and chunking documents in the Metis application.

Features:

  • Load documents from various file formats (PDF, DOCX, TXT, MD)
  • Split documents into chunks for processing
  • Extract code blocks from documents
  • Analyze document structure

Usage Example:

// Load a document
const docResult = await useMcpTool({
  serverName: 'document-processing-tool',
  toolName: 'load_document',
  arguments: {
    filePath: '/path/to/document.pdf'
  }
});

// Chunk the document
const chunkResult = await useMcpTool({
  serverName: 'document-processing-tool',
  toolName: 'chunk_document',
  arguments: {
    text: docResult.document.pageContent,
    chunkSize: 1000,
    chunkOverlap: 200,
    metadata: docResult.document.metadata
  }
});

4. LLM Interaction Tool

The LLM Interaction Tool provides functionality for interacting with language models in the Metis application.

Features:

  • Initialize LLM models from various providers (OpenAI, Anthropic)
  • Generate text with LLMs
  • Use prompt templates for structured generation
  • Generate embeddings for text

Usage Example:

// Initialize an LLM model
const llmResult = await useMcpTool({
  serverName: 'llm-interaction-tool',
  toolName: 'init_llm_model',
  arguments: {
    modelId: 'gpt4',
    provider: 'openai',
    modelName: 'gpt-4',
    apiKey: 'your-api-key',
    temperature: 0.7
  }
});

// Generate text with a prompt template
const genResult = await useMcpTool({
  serverName: 'llm-interaction-tool',
  toolName: 'use_prompt_template',
  arguments: {
    modelId: 'gpt4',
    template: 'Summarize the following text: {text}',
    variables: {
      text: 'Long document content here...'
    }
  }
});

Installation and Setup

To use these MCP tools in your Metis application:

  1. Clone this repository:

    git clone https://github.com/dagron78/metis-mcp-demo.git
    
  2. Install dependencies:

    cd metis-mcp-demo
    npm install
    
  3. Start the desired MCP server:

    node tools/database-tool.js
    node tools/vector-store-tool.js
    node tools/document-processing-tool.js
    node tools/llm-interaction-tool.js
    
  4. Connect to the MCP server from your application using an MCP client.

Contributing

Contributions are welcome! Feel free to submit pull requests or open issues to improve these tools or add new ones.

License

MIT

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
CursorThe AI Code Editor
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Tavily Mcp
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Playwright McpPlaywright MCP server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Amap Maps高德地图官方 MCP Server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
ChatWiseThe second fastest AI chatbot™
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
DeepChatYour AI Partner on Desktop
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
WindsurfThe new purpose-built IDE to harness magic
Serper MCP ServerA Serper MCP Server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.