Skip to main content
Glama
Pradeepmajji702

Swagger MCP Server

Swagger MCP Server

A Model Context Protocol (MCP) server that provides AI assistants with access to Spring Boot backend APIs through Swagger/OpenAPI documentation.

Features

  • List Endpoints: Get all available API endpoints from your Spring Boot backend

  • Describe Endpoint: Get detailed information about a specific API endpoint

  • Generate Frontend Calls: Auto-generate frontend API call code for React or Angular

Related MCP server: spring-api-intel-mcp

Installation

npm install -g @pradeepmajji702/swagger-mcp

Local Installation

npm install @pradeepmajji702/swagger-mcp

Configuration

For Claude Desktop / Copilot

Add this to your MCP settings configuration file:

Windows: %APPDATA%\Code\User\globalStorage\github.copilot-chat\mcp.json
macOS/Linux: ~/.config/Code/User/globalStorage/github.copilot-chat/mcp.json

{
  "mcpServers": {
    "swagger-mcp": {
      "command": "npx",
      "args": ["-y", "@pradeepmajji702/swagger-mcp"],
      "env": {
        "SWAGGER_URL": "http://localhost:8080/v3/api-docs"
      }
    }
  }
}

Important: Replace SWAGGER_URL with your actual Spring Boot Swagger documentation URL.

Common Swagger URLs

  • Spring Boot 3: http://localhost:8080/v3/api-docs

  • Spring Boot 2: http://localhost:8080/v2/api-docs

  • Custom path: http://localhost:8080/your-app/v3/api-docs

Usage

Once configured, you can ask your AI assistant:

  • "List all available backend endpoints"

  • "Describe the GET /api/users endpoint"

  • "Generate a React API call for POST /api/users"

  • "Show me the Angular code to call the login endpoint"

Available Tools

list_endpoints

Lists all API endpoints from your Spring Boot backend.

describe_endpoint

Get detailed information about a specific endpoint including parameters, request body, and responses.

Parameters:

  • path (string): The API path (e.g., "/api/users")

  • method (string): HTTP method (e.g., "get", "post", "put", "delete")

generate_frontend_call

Generates frontend code to call a specific API endpoint.

Parameters:

  • path (string): The API path

  • method (string): HTTP method

  • framework (string): "react" or "angular"

Requirements

  • Node.js >= 18.0.0

  • A running Spring Boot application with Swagger/OpenAPI enabled

Development

# Clone the repository
git clone https://github.com/Pradeepmajji702/MCP_SPRINGBOOT.git
cd MCP_SPRINGBOOT

# Install dependencies
npm install

# Run locally
SWAGGER_URL=http://localhost:8080/v3/api-docs node server.js

Publishing

To publish this package to npm:

Then publish:

npm login
npm publish --access public

License

MIT

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Available Tools

3 tools
describe_endpointC

Get details of a backend API

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
methodYes

TDQS

C2.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Since no annotations are provided, the description carries the full burden of behavioral disclosure. It only says 'Get details,' which implies a read-only operation, but it does not disclose whether authentication is required, what constitutes 'details,' or the structure of the response. No side effects or edge cases are mentioned.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence with no wasted words, so it is structurally concise. However, it is under-specified, omitting critical details about parameters and return values. It is not a tautology like 'Process' but is still too minimal to be useful, earning a middle score.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the low complexity (2 parameters) but missing parameter descriptions, missing output schema, and missing annotations, the description is severely incomplete. It does not explain what the tool returns, what inputs are needed, or how it fits with sibling tools. The description leaves the agent with almost no contextual information to invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has two required parameters (path and method) with zero description coverage. The description does not explain what path and method mean or how they relate to 'details of a backend API.' The description completely fails to compensate for the lack of schema documentation, leaving the agent without any semantic guidance for these parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get details of a backend API' uses a specific verb and resource, but the resource is vague ('backend API' rather than 'endpoint' or 'route'). It does not distinguish itself from sibling tools like list_endpoints, which also deals with APIs/endpoints. Given the parameters (path and method), it clearly concerns a specific endpoint, but that is not made explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The sibling tools list_endpoints and generate_frontend_call are not referenced, and there is no stated context for when describe_endpoint is appropriate. The description simply states what it does without any usage scenarios or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_frontend_callC

Generate frontend API call code

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
methodYes
frameworkYes

TDQS

C2.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It only says 'generate code' without mentioning side effects, return value, error handling, or any constraints. It doesn't state whether this is a safe read-only operation or if it requires specific inputs, leaving the agent without essential behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence that is front-loaded and free of fluff. However, it is so brief that it lacks meaningful content, making it more under-specified than concise. It earns a middle score because the sentence itself is clear and not misleading.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, annotations, or additional context. The description does not indicate what the generated code looks like, which frameworks are supported, or what the return value is. For a tool that generates code, this is severely incomplete, leaving the agent to guess key details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description provides no explanation of the three parameters (path, method, framework). The names are self-explanatory to some degree, but the description adds zero value in clarifying their format, allowed values, or how they are used. It fails to compensate for the missing schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Generate' and resource 'frontend API call code', which clearly states the tool's function. It distinguishes from sibling tools like list_endpoints and describe_endpoint by focusing on code generation. However, it doesn't mention the inputs (path, method, framework) that make it specific.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool over alternatives. There are no exclusions, prerequisites, or contextual indicators. The description simply states what it does without explaining scenarios or limitations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_endpointsA

List all backend API endpoints

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. The verb 'List' implies a read-only, side-effect-free operation, but no details about authentication, response shape, or pagination are disclosed. It is transparent enough for a simple fetch but lacks explicit safety statements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that conveys exactly what the tool does with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple, parameterless listing operation, the description covers the purpose well. It lacks output schema or return-format details, but since the verb 'List' implies a list of endpoints, it is largely complete in context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool accepts no parameters, and the schema confirms this. There is no parameter information to add, and the baseline for zero-parameter tools is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('List') and identifies a clear resource ('backend API endpoints'). It easily distinguishes from sibling tools like 'describe_endpoint' (detail on one) and 'generate_frontend_call' (create a call).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus the sibling tools. The purpose is implied by the name and description, but there is no mention of alternatives or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv1.0.1
    • First observeddescribe_endpoint
    • First observedgenerate_frontend_call
    • First observedlist_endpoints

TDQS

B3.2/5.0
Disambiguation5/5

Each tool targets a distinct action: listing all endpoints, describing a specific endpoint, and generating frontend call code. There is no overlap or ambiguity between the tools.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with lowercase and underscores: list_endpoints, describe_endpoint, generate_frontend_call. The naming is uniform and predictable.

Tool Count5/5

Three tools is a well-scoped set for a Swagger server focused on endpoint discovery and code generation. Each tool earns its place, covering the core workflow without unnecessary additions.

Completeness4/5

The tool set covers endpoint listing, description, and frontend call generation, which addresses the primary use case. Minor gaps exist around importing or updating the API specification, but these are outside the apparent read-oriented focus.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Exposes Swagger/OpenAPI API documentation to AI models, enabling exploration, search, and interaction with endpoints, schemas, and execution of API calls.
    14
    13
    2
    MIT

Latest Blog Posts

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/Pradeepmajji702/MCP_SPRINGBOOT'

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