Skip to main content
Glama
slackwarecps

MCP Simple Server

by slackwarecps

MCP Simple Server (HTTP 브리지)

이것은 HTTP POST 인터페이스를 통해 도구를 노출하는 간소화된 MCP(Model Context Protocol) 서버입니다. 이를 통해 LLM 및 원격 에이전트가 터널이나 직접 액세스를 통해 로컬 또는 특정 기능에 안전하게 액세스할 수 있습니다.

🚀 기술 설정

  • 포트: 3030

  • 엔드포인트: /mcp

  • 메서드: POST

  • 인증: Authorization: Bearer senha-facil-123

  • 프로토콜: JSON-RPC 2.0 (HTTP용으로 조정됨)


Related MCP server: local-env-mcp

🧪 CURL을 사용한 원격 테스트

아래 명령어를 사용하여 네트워크 액세스 권한이 있는 모든 머신(또는 Wireguard VPN을 통해)에서 서버 작동 여부를 확인할 수 있습니다.

1. 사용 가능한 도구 나열

curl -X POST http://10.7.0.1:3030/mcp \
  -H "Authorization: Bearer senha-facil-123" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/list","id":1}'

2. 'hello' 도구 호출

curl -X POST http://10.7.0.1:3030/mcp \
  -H "Authorization: Bearer senha-facil-123" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"hello","arguments":{"name":"Fabão"}},"id":2}'

♊ Gemini-CLI 설정 (원격)

로컬 머신이나 다른 VPS의 gemini-cli가 이 서버에 액세스하려면 Gemini CLI 구성 파일(일반적으로 ~/.gemini/config.yaml 또는 명령어를 통해)에서 구성해야 합니다.

이 서버는 직접 HTTP(stdio 표준이 아님)를 사용하므로, 서버가 확장된 경우 SSE를 통한 액세스를 구성하거나 사용 가능한 경우 fetch 플러그인을 사용할 수 있습니다.

구성 예시 (stdio-to-http 프록시 사용 가정):

# No gemini-cli


gemini mcp add remote-server --command "npx @modelcontextprotocol/inspector http://10.7.0.1:3030/mcp"

~/.gemini/settings.json 파일 내

"mcpServers": {                                                                                                                      
    "local-mcp": {                                                                                                                                     
      "url": "http://192.168.1.100:3030/mcp",                                                                                                          
      "headers": {                                                                                                                                     
        "Authorization": "Bearer senha-facil-123"                                                                                                      
      }                                                                                                                                                
    }             
  }

참고: IP를 올바른 주소(예: VPN의 10.7.0.1)로 바꾸십시오.


🤖 Claude Code 설정

Claude Code(및 Claude Desktop)는 일반적으로 로컬 명령을 기대합니다. 이 원격 서버에 액세스하려면:

  1. claude_desktop_config.json 파일을 편집합니다:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Linux: ~/.config/Claude/claude_desktop_config.json

  2. 구성을 추가합니다:

{
  "mcpServers": {
    "mcp-simple-server": {
      "command": "curl",
      "args": [
        "-s",
        "-X", "POST",
        "http://10.7.0.1:3030/mcp",
        "-H", "Authorization: Bearer senha-facil-123",
        "-H", "Content-Type: application/json",
        "-d", "{\"jsonrpc\":\"2.0\",\"method\":\"tools/call\",\"params\":<params>}"
      ]
    }
  }
}

팁: 더 강력한 통합을 위해 stdio를 서버의 HTTP API로 변환하는 mcp-proxy를 사용하는 것이 좋습니다.


💬 ChatGPT 설정 (GPT Codex / Actions)

이 서버를 ChatGPT의 Action으로 사용하려면:

  1. Custom GPTs -> Create a GPT -> Configure -> Create new action으로 이동합니다.

  2. Authentication 필드에서 API Key를 선택하고, Bearer를 선택한 다음 senha-facil-123을 입력합니다.

  3. Schema 필드에 OpenAPI 사양을 사용합니다(아래 간소화된 예시):

openapi: 3.0.0
info:
  title: MCP Simple Server
  version: 1.0.0
servers:
  - url: http://195.35.42.89:3030 # IP Público ou DNS
paths:
  /mcp:
    post:
      operationId: callMcpTool
      summary: Chama uma ferramenta do MCP
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method: {type: string, example: "tools/call"}
                params: {type: object}
                id: {type: integer, example: 1}
      responses:
        '200':
          description: Sucesso

🐳 Docker

이 프로젝트는 컨테이너에서 실행할 준비가 되어 있습니다.

1. 이미지 빌드

로컬에서 Docker 이미지를 생성하려면:

docker build -t mcp-simple-server .

2. 컨테이너 실행 (Docker Compose)

네트워크와 환경 변수를 구성하는 포함된 docker-compose.yml을 사용하여 실행하는 것이 권장됩니다:

docker compose up -d

컨테이너는 mcp-simple-server라는 이름으로 생성되며 3030 포트에서 사용할 수 있습니다.

3. 상태 및 로그 확인

# Ver se o container está rodando
docker ps | grep mcp-simple-server

# Ver logs do servidor
docker compose logs -f

🛠️ 개발

서버를 로컬에서 실행하려면:

cd ~/apps/mcp-simple-server
npm install
node server.js

서버는 http://localhost:3030에서 수신 대기합니다.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables remote access to the MemPalace MCP server via HTTP, supporting bearer token authentication and concurrent clients while exposing all mempalace tools.
    -
  • A
    license
    Not graded
    quality
    A
    maintenance
    Lifts local stdio MCP servers into remote Streamable HTTP endpoints for cloud-hosted AI clients, with bearer-token auth and tool policy filtering.
    9 npm
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Converts any MCP server into simple HTTP endpoints, enabling AI agents that only support HTTP (like ChatGPT Custom GPT or web_fetch) to use MCP tools.
    -