1. Conduid
  2. Developer Tools
  3. Openapi MCP Server
MCP server · Developer Tools

Openapi MCP Server

把使用openapi作为接口文档的用springboot构建的web应用转成mcp server

Unclaimed last commit a year ago devtools
41Fair

Scored 5 months ago · breakdown

About Openapi MCP Server

Openapi MCP Server is an MCP server published by h2562961224 in the Developer Tools category: 把使用openapi作为接口文档的用springboot构建的web应用转成mcp server.

The repository has 2 stars and 0 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/h2562961224/openapi-mcp-server

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 Openapi MCP Server

Powered by Claude · Grounded in docs

I know everything about Openapi MCP Server. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 7 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • !License declaredNo license file. Legally you have no right to use it in a product.
  • !Tests presentNo tests found. Behaviour changes may go unnoticed between versions.
  • !Dependencies pinnedNo lockfile. Installs can pull different code over time.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

概述

能直接让使用openapi(swagger)作为接口文档的接口支持mcp,应用成为一个mcp server。

  • 多Session支持
  • 认证支持

价值在于有mcp client(如cursor,claude desktop等)就能完成业务操作,而不用写前端页面(Claude Sonnet 3.7实测无敌) 另外未来一定有基于AI的超级app出现。在基于语言的新的交互方式下,我们只需要写后端接口就行了

要求

  • Java 17+
  • SpringBoot
  • SpringMVC

快速开始

  1. 加入依赖,mcp原生依赖
<dependency>
  <groupId>io.modelcontextprotocol.sdk</groupId>
  <artifactId>mcp-spring-webmvc</artifactId>
  <version>0.7.0</version>
</dependency>
  1. 复制代码 InternalWebMvcSseServerTransport.java McpConfig.java RestApiToolProvider.java UserContextSetter.java

  2. 实现UserContextSetter接口 Demo

@Component
@AllArgsConstructor
public class MyUserContextSetter implements UserContextSetter{

    private JwtConfig jwtConfig;

    @Override
    public void set(String auth) {
        UserContext.set(jwtConfig.getUserContextFromTokenWithoutException(auth));
    }

    @Override
    public void clear() {
        UserContext.clear();
    }
}
  1. 补充其他基础设施(拦截器等)以满足业务需求

  2. 客户端Demo

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";

const transport = new SSEClientTransport(new URL("http://localhost:8080/mcp/sse/eyJhbGciOiJIUzI1NiJ9.eyJ0ZW5hbnRfaWQiOjIsImlzX2FkbWluIjpmYWxzZSwic3ViIjoiMiIsImlhdCI6MTc0MzA4MTE5MiwiZXhwIjoxNzQzMTY3NTkyfQ.newz2wj0l5nWk1U_lHNg575bi1FubWSLXqji4o2W-P0"));

const client = new Client(
  {
    name: "MCP Server",
    version: "1.0.0"
  }
);

await client.connect(transport);

const tools = await client.listTools();
// List all tools
console.log("Tools: ", JSON.stringify(tools));

// Call a tool
const result = await client.callTool({
  name: "TenantController.pageUser",
  arguments: {
    current: 1,
    pageSize: 10
  }
});

console.log("Result: ", JSON.stringify(result));

README fetched from the repository 7 days ago. The original is authoritative.

Questions

About Openapi MCP Server

How do I install Openapi MCP Server?

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

Is Openapi MCP Server safe to use with an AI agent?

Its trust score is 41 out of 100 (fair). It passes 2 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Openapi MCP Server still maintained?

The last commit was a year ago and 1 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.