MCP Wrapper for Echo Framework logo

MCP Wrapper for Echo Framework

Community
BrunoKrugel

Enable AI assistants to interact with your Echo API

PublisherBrunoKrugel
Repositoryecho-mcp
LanguageGo
Forks
6
Stars
10
Available tools
0
Transport typestdio
Categories
LicenseGPL-3.0
Links
  • Connect tools to AI workflows

    MCP Wrapper for Echo Framework exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    10 stars and 6 forks from the linked repository.

MCP Wrapper for Echo Framework

Build Status Codecov branch Go Report Card Release

Wrap any existing Echo API into MCP tools and enable AI agents to interact with your API through Model Context Protocol.

Inspired by gin-mcp but for the Echo framework.

Key Features

  • Zero Configuration: Works with any existing Echo API
  • Multiple Schema Sources: Support for Swaggo, raw OpenAPI YAML/JSON, and manual schemas
  • Filtering: Include/exclude endpoints with wildcard patterns
  • MCP Compatible: Works with any agent that supports MCP.

Installation

bash
go get github.com/BrunoKrugel/echo-mcp

Quick Start

go
package main

import (
    "net/http"
    server "github.com/BrunoKrugel/echo-mcp"
    "github.com/labstack/echo/v4"
)

func main() {
    e := echo.New()

    // Existing API routes
    e.GET("/ping", func(c echo.Context) error {
        return c.JSON(http.StatusOK, map[string]string{"message": "pong"})
    })


    // Add MCP support
    mcp := server.New(e)
    mcp.Mount("/mcp")

    e.Start(":8080")
}

Now the API is accessible at http://localhost:8080/mcp

Advanced Usage

Automatic Swagger Schemas

If you already use Swaggo for Swagger documentation, enable automatic schema generation:

go
// @Summary Get user by ID
// @Description Retrieve detailed user information
// @Tags users
// @Param id path int true "User ID" minimum(1)
// @Success 200 {object} User
// @Router /users/{id} [get]
func GetUser(c echo.Context) error {
    // Your handler code
}

func main() {
    e := echo.New()
    e.GET("/users/:id", GetUser)

    // Enable automatic swagger schema generation
    mcp := server.NewWithConfig(e, &server.Config{
        BaseURL:              "http://localhost:8080",
        EnableSwaggerSchemas: true,
    })
    mcp.Mount("/mcp")

    e.Start(":8080")
}

Raw OpenAPI Schema Support

If you use other OpenAPI libraries like swaggest/openapi-go, you can pass a raw YAML or JSON schema string:

go
import (
    "github.com/swaggest/openapi-go/openapi3"
    server "github.com/BrunoKrugel/echo-mcp"
)

func main() {
    e := echo.New()

    // ... define your routes ...

    // Generate OpenAPI schema
    reflector := openapi3.Reflector{}
    reflector.SpecEns().WithOpenapi("3.0.3")
    reflector.SpecEns().Info.WithTitle("My API").WithVersion("1.0.0")

    // Add operations to reflector
    // ...

    // Export to YAML (or JSON)
    schema, _ := reflector.Spec.MarshalYAML()

    // Pass raw schema to MCP server
    // ... you can also embed the schema from an exiting openapi.yaml file
    mcp := server.NewWithConfig(e, &server.Config{
        OpenAPISchema: string(schema),
    })
    mcp.Mount("/mcp")

    e.Start(":8080")
}

The OpenAPISchema field accepts both YAML and JSON formatted strings. When provided, it automatically populates:

  • Server name from schema title
  • Description from schema description
  • Version from schema version
  • Tool schemas from operation definitions

Endpoint Filtering

Expose only the necessary endpoints to MCP tools:

go
mcp := server.New(e)

// Include only specific endpoints
mcp.RegisterEndpoints([]string{
    "/api/v1/users/:id",
    "/api/v1/orders",
})

// Or exclude internal endpoints
mcp.ExcludeEndpoints([]string{
    "/health",      // Exclude health checks
})

Manual Schema Registration (WIP)

For better control, register schemas manually:

go
type CreateUserRequest struct {
    Name  string `json:"name" jsonschema:"required,description=User full name"`
    Email string `json:"email" jsonschema:"required,description=User email address"`
    Age   int    `json:"age,omitempty" jsonschema:"minimum=0,maximum=150"`
}

type UserQuery struct {
    Page   int    `form:"page,default=1" jsonschema:"minimum=1"`
    Limit  int    `form:"limit,default=10" jsonschema:"maximum=100"`
    Active bool   `form:"active" jsonschema:"description=Filter by active status"`
}

mcp := server.New(e, &server.Config{BaseURL: "http://localhost:8080"})

// Register schemas for specific routes
mcp.RegisterSchema("POST", "/users", nil, CreateUserRequest{})
mcp.RegisterSchema("GET", "/users", UserQuery{}, nil)

Schema Generation Methods

Echo-MCP supports four schema generation approaches, with automatic fallback:

MethodUse CasePriority
Raw OpenAPI SchemaUsing OpenAPI libraries like swaggest/openapi-goFirst (if OpenAPISchema is set)
SwaggerProduction APIs with Swaggo annotationsFirst (if EnableSwaggerSchemas is set)
ManualFine-grained control, complex validationSecond
AutomaticQuick prototyping, simple endpointsFallback
go
// Option 1: Using raw OpenAPI schema (swaggest/openapi-go, etc.)
schema, _ := reflector.Spec.MarshalYAML()
mcp := server.New(e, &server.Config{
    OpenAPISchema: string(schema), // Use raw schema
})

// Option 2: Using Swaggo
mcp := server.New(e, &server.Config{
    EnableSwaggerSchemas: true, // Load from swaggo docs
})

// Option 3: Manual schemas for fine-grained control
mcp.RegisterSchema("POST", "/users", nil, CreateUserRequest{})

// Option 4: Automatic inference (fallback)
// No configuration needed - routes will use basic path/body inference

MCP Client Integration

Once your server is running:

Manual configuration

json
{
  "mcpServers": {
    "echo-api": {
      "type": "http",
      "url": "http://localhost:8080/mcp",
      "timeout": 120
    },
  }
}

Local Testing

For local testing, use MCP Inspector:

bash
npx @modelcontextprotocol/inspector http://localhost:8080/mcp

Acknowledgments

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "brunokrugel-echo-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "echo-mcp"
      ]
    }
  }
}

Use MCP Wrapper for Echo Framework MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once MCP Wrapper for Echo Framework is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add MCP Wrapper for Echo Framework as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the MCP Wrapper for Echo Framework MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "brunokrugel-echo-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "echo-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the MCP Wrapper for Echo Framework MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the MCP Wrapper for Echo Framework MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MCP Wrapper for Echo Framework to help me with this task?
MCP Wrapper for Echo Framework
Sure. I read it.
Here is what I found using MCP Wrapper for Echo Framework.

Frequently asked questions

What is the MCP Wrapper for Echo Framework MCP server used for?

MCP Wrapper for Echo Framework is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use MCP Wrapper for Echo Framework MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use MCP Wrapper for Echo Framework with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use MCP Wrapper for Echo Framework MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With MCP Wrapper for Echo Framework connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect MCP Wrapper for Echo Framework MCP to TypingMind?

MCP Wrapper for Echo Framework runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does MCP Wrapper for Echo Framework MCP provide in TypingMind?

MCP Wrapper for Echo Framework exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use MCP Wrapper for Echo Framework MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If MCP Wrapper for Echo Framework requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇