1. Conduid
  2. Agents
  3. Grafana MCP Agent Datasource
MCP server · Agents

Grafana MCP Agent Datasource

A Grafana data source plugin that connects to MCP servers and enables natural language querying

34Low

Scored 7 days ago · breakdown

About Grafana MCP Agent Datasource

Grafana MCP Agent Datasource is an MCP server in the Agents category: a Grafana data source plugin that connects to MCP servers and enables natural language querying.

The repository has 1 stars and 0 forks.

Install

From source
git clone https://github.com/grafana/grafana-mcp-agent-datasource

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Grafana MCP Agent Datasource

Powered by Claude · Grounded in docs

I know everything about Grafana MCP Agent Datasource. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

:warning: Info
This experiment has been archived, we merged this effort with Grafana MCP, please use that.

Grafana MCP Agent DataSource Plugin

A Grafana data source plugin that connects to Model Context Protocol (MCP) servers and enables natural language querying of external tools and data sources.

🎉 Built with mcp-go Library

This plugin leverages the excellent mark3labs/mcp-go library (6.1k+ stars) for robust, production-ready MCP client functionality. This provides:

  • ✅ Full MCP protocol compliance
  • ✅ Multiple transport options (stdio, SSE, streamable HTTP, in-process)
  • ✅ Comprehensive error handling and retry logic
  • ✅ Active maintenance and community support

What is MCP?

The Model Context Protocol (MCP) is an open standard that enables Large Language Models (LLMs) to securely connect with external data sources and tools. MCP servers can:

  • Expose data through Resources (like databases, files, APIs)
  • Provide functionality through Tools (like calculations, external service calls)
  • Define interaction patterns through Prompts (reusable templates)

Features

  • 🔗 Universal MCP Connectivity: Connect to any MCP-compliant server
  • 🗣️ Natural Language Queries: Query your data sources using plain English
  • 🛠️ Tool Integration: Execute MCP tools directly from Grafana
  • 📊 Data Visualization: Convert MCP responses into Grafana data frames
  • 🔧 Multiple Transports: Support for WebSocket, HTTP, and SSE connections
  • 🔐 Flexible Authentication: Multiple auth methods including basic, bearer, and OAuth
  • ⚡ Real-time Updates: Live connection monitoring and health checks

Architecture

┌─────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   Grafana   │◄──►│  MCP DataSource │◄──►│   MCP Server    │
│  Dashboard  │    │     Plugin      │    │ (External Tool) │
└─────────────┘    └─────────────────┘    └─────────────────┘
  • Grafana Dashboard: Visualizes data and provides the user interface
  • MCP DataSource Plugin: Translates between Grafana and MCP protocols
  • MCP Server: External service exposing tools, data, or capabilities

Getting Started

Prerequisites

  • Grafana 8.0+
  • Go 1.24+
  • Node.js 18+
  • Access to one or more MCP servers

Development Setup

  1. Clone and setup the project:

    git clone <repository-url>
    cd grafana-mcpclient-datasource
    npm install
    go mod tidy
    
  2. Build the plugin:

    # Build frontend
    npm run build
    
    # Build backend
    go build -o mcp-datasource ./pkg
    
  3. Run development server:

    npm run server
    

Configuration

  1. Add the datasource in Grafana's Data Sources settings

  2. Configure MCP server connection:

    • Server URL: Your MCP server endpoint (http, https, ws, wss)
    • Transport: Auto-detected based on URL scheme
    • Authentication: Configure credentials if required
    • Timeouts: Set connection and query timeouts
  3. Test the connection using the built-in health check

Query Types

The plugin supports multiple query types:

Natural Language Queries

{
  "queryType": "natural_language",
  "query": "Show me the latest sales data from the database"
}

Direct Tool Calls

{
  "queryType": "tool_call", 
  "toolName": "database_query",
  "toolArguments": "{\"table\": \"sales\", \"limit\": 100}"
}

Tool Discovery

{
  "queryType": "list_tools"
}

MCP Server Compatibility

This plugin works with any MCP-compliant server. Popular examples include:

  • Database Servers: PostgreSQL, MySQL, SQLite MCP servers
  • File System Servers: Local and remote file access
  • API Servers: REST/GraphQL API wrappers
  • Cloud Services: AWS, Azure, GCP integrations
  • Custom Tools: Domain-specific business logic

Development

Backend Development

The backend is written in Go and uses the Grafana Plugin SDK:

# Install dependencies
go mod tidy

# Run tests
go test ./...

# Build
go build ./pkg

Frontend Development

The frontend is built with React and TypeScript:

# Install dependencies
npm install

# Development mode
npm run dev

# Production build
npm run build

# Run tests
npm run test

Project Structure

├── pkg/                    # Go backend code
│   ├── main.go            # Plugin entry point
│   ├── models/            # Data models and types
│   └── plugin/            # Plugin implementation
├── src/                   # TypeScript frontend code
│   ├── components/        # React components
│   ├── datasource.ts      # DataSource implementation
│   └── types.ts           # Type definitions
├── project/               # Project documentation
│   ├── plan.md           # Technical architecture
│   └── tasks.md          # Development tasks
└── provisioning/         # Grafana provisioning configs

Contributing

Contributions are welcome! Please check the development tasks for current priorities.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Learn More

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Thanks to mark3labs for the excellent mcp-go library
  • Thanks to the Grafana team for the plugin development framework
  • Thanks to the MCP community for the protocol specification

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Grafana MCP Agent Datasource

How do I install Grafana MCP Agent Datasource?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Grafana MCP Agent Datasource safe to use with an AI agent?

Its trust score is 34 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Grafana MCP Agent Datasource still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.