Skip to main content
Glama

Index Network MCP Server

Official
by indexnetwork

Index Network MCP Server

A Model Context Protocol (MCP) server that enables ChatGPT integration with Index Network's discovery protocol.

Features

  • ๐Ÿš€ Quick Setup: One-command startup with included script

  • ๐Ÿ”ง MCP Tools: Health check, echo, and search functionality

  • ๐ŸŒ Public Access: Built-in ngrok integration for external access

  • ๐Ÿงช Testing: MCP Inspector integration for easy testing

Quick Start

Prerequisites

Installation

# Clone and setup git clone https://github.com/indexnetwork/mcp.git cd mcp npm install # Configure environment cp env.example .env # Edit .env with your ngrok authtoken

Run Everything at Once

# Start server, ngrok tunnel, and inspector ./src/start-mcp.sh

The script will:

  • Start the MCP server on port 3002

  • Create an ngrok tunnel (public URL)

  • Launch MCP Inspector for testing

  • Display all URLs and process IDs

Manual Setup (Alternative)

# Terminal 1: Start server npm run dev # Terminal 2: Create tunnel ngrok http 3002 # Terminal 3: Test with inspector npx @modelcontextprotocol/inspector@latest # Enter: http://localhost:3002/mcp

Configuration

Environment Variables

Variable

Description

Default

MCP_SERVER_PORT

Server port

3002

NGROK_AUTHTOKEN

ngrok auth token

Required

NODE_ENV

Environment

development

ngrok Setup

  1. Get your authtoken from ngrok dashboard

  2. Add to .env:

    NGROK_AUTHTOKEN=your_token_here

Available Tools

health-check

Check server status.

echo

Echo back a message.

search

Search functionality (demo implementation).

ChatGPT Integration

  1. Run the startup script: ./src/start-mcp.sh

  2. Copy the ngrok URL from the output (e.g., https://abc123.ngrok-free.dev/mcp)

  3. Configure ChatGPT to use this MCP server URL

Development

Project Structure

mcp/ โ”œโ”€โ”€ src/ โ”‚ โ”œโ”€โ”€ server.ts # MCP server implementation โ”‚ โ””โ”€โ”€ start-mcp.sh # Startup script โ”œโ”€โ”€ docs/ # Documentation โ”œโ”€โ”€ package.json # Dependencies โ””โ”€โ”€ README.md # This file

Adding Tools

server.registerTool("my-tool", { title: "My Tool", description: "Tool description", inputSchema: z.object({ input: z.string() }) }, async (params) => ({ content: [{ type: "text", text: "Result" }], _meta: { "openai/widgetAccessible": true } }));

Building

npm run build # Compile TypeScript npm start # Run production build

Troubleshooting

Script won't run

  • Make executable: chmod +x src/start-mcp.sh

  • Check Node.js version: node --version (needs 18+)

ngrok errors

  • Verify authtoken in .env

  • Check if port 3002 is available

MCP Inspector issues

  • Ensure server is running first

  • Use correct URL: http://localhost:3002/mcp

Links

License

MIT License - see LICENSE for details.

-
security - not tested
-
license - not tested
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Enables ChatGPT integration with Index Network's discovery protocol through MCP tools. Provides quick setup with ngrok tunneling for public access and includes health check, echo, and search functionality.

  1. Features
    1. Quick Start
      1. Prerequisites
      2. Installation
      3. Run Everything at Once
      4. Manual Setup (Alternative)
    2. Configuration
      1. Environment Variables
      2. ngrok Setup
    3. Available Tools
      1. health-check
      2. echo
      3. search
    4. ChatGPT Integration
      1. Development
        1. Project Structure
        2. Adding Tools
        3. Building
      2. Troubleshooting
        1. Links
          1. License

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/indexnetwork/mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server