AE

aaronwander/embedmcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

34 stars 8 forks 품질 51 트렌드 12MIT

MCP 서버를 신속하게 만들 수있는 쉬운 사용 키트 제공 모든 임베디드 장치

개요

MCP (Model Context Protocol) 서버를 생성하는 경량 C 라이브러리로 기존 C 기능을 최소 코드 변경으로 AI-accessible 도구로 변환합니다. EmbedMCP는 기존 C 코드베이스와 현대 AI 시스템 사이의 간격을 브릿지합니다. 전투 테스트 C 함수를 다시 작성하는 대신, EmbedMCP는 최소한의 코드 변경으로 표준화 된 모델 Context Protocol (MCP)을 통해 AI 모델에 노출 할 수 있습니다. - : 하나의 폴더를 복사, 하나의 헤더 파일 포함 - : 최소한의 오버 헤드와 직접 C 함수 호출 - : Universal HAL을 통해 15 + 플랫폼에서 실행 - : 외부 요구 사항없이 자체 수집 라이브러리 - : 간단한 기능을위한 매직 매크로, 복잡한 것들을위한 전체 제어 - : 다른 사용 사례에 대한 스트리밍 HTTP 및 STDIO 지원 - : 명확한 소유권 규칙과 자동 정리 - : 간단한 매개 변수와 복잡한 데이터 구조를 모두 처리 EmbedMCP는 2개의 등록 접근법을 지원합니다: get * helpers 외에도 엄격한 try get * accessors를 사용하여 구별 할 수 있습니다.

개요(AI 번역)

MCP (Model Context Protocol) 서버를 생성하는 경량 C 라이브러리로 기존 C 기능을 최소 코드 변경으로 AI-accessible 도구로 변환합니다.

한국어 • 한국어

왜 EmbedMCP?

EmbedMCP는 기존 C 코드베이스와 현대 AI 시스템 사이의 간격을 브릿지합니다. 전투 테스트 C 함수를 다시 작성하는 대신, EmbedMCP는 최소한의 코드 변경으로 표준화 된 모델 Context Protocol (MCP)을 통해 AI 모델에 노출 할 수 있습니다.

키 기능

-► 간단한 통합: 한 폴더 복사, 하나의 헤더 파일 포함

  • ** ** **: 최소 오버헤드와 직접 C 함수 호출
  • ** 크로스 플랫폼**: Universal HAL을 통해 15+ 플랫폼에서 실행
  • ** Zero Dependencies**: 외부 요구 사항이 없는 자율적 인 라이브러리 -** Two 2 등록 방법**: 간단한 기능을 위한 매직 매크로, 복잡한 것들을 위한 전체 제어
  • ** 몇몇 수송 **: 다른 사용 사례에 대한 Streamable HTTP 및 STDIO 지원
  • ** - 스마트 메모리 관리**: 깨끗한 소유권 규칙을 가진 자동적인 정리 -** - Array 지원**: 간단한 매개 변수와 복잡한 데이터 구조를 모두 처리

빠른 시작

설치

  1. ** EmbedMCP 다운로드 **

  2. 명세.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

EmbedMCP - Embedded MCP Server Library

A lightweight C library for creating MCP (Model Context Protocol) servers that transforms your existing C functions into AI-accessible tools with minimal code changes.

English • 简体中文

Why EmbedMCP?

EmbedMCP bridges the gap between your existing C codebase and modern AI systems. Instead of rewriting your battle-tested C functions, EmbedMCP lets you expose them to AI models through the standardized Model Context Protocol (MCP) with minimal code changes.

Key Features

  • 🚀 Simple Integration: Copy one folder, include one header file
  • ⚡ High Performance: Direct C function calls with minimal overhead
  • 🔧 Cross-Platform: Runs on 15+ platforms via Universal HAL
  • 📦 Zero Dependencies: Self-contained library with no external requirements
  • 🎯 Two Registration Methods: Magic macros for simple functions, full control for complex ones
  • 🌐 Multiple Transports: Streamable HTTP and STDIO support for different use cases
  • 🧠 Smart Memory Management: Automatic cleanup with clear ownership rules
  • 📊 Array Support: Handle both simple parameters and complex data structures

Quick Start

Installation

  1. Download EmbedMCP

    git clone https://github.com/AaronWander/EmbedMCP.git
    cd EmbedMCP
    
  2. Copy to your project

    cp -r embed_mcp/ your_project/
    

Basic Usage

#include "embed_mcp/embed_mcp.h"

// Your business function
double add_numbers(double a, double b) {
    return a + b;
}

// Generate wrapper with macro
EMBED_MCP_WRAPPER(add_wrapper, add_numbers, DOUBLE, DOUBLE, a, DOUBLE, b)

int main() {
    embed_mcp_config_t config = {
        .name = "MathServer",
        .version = "1.0.0",
        .instructions = "Simple math operations server",
        .port = 8080
    };

    embed_mcp_server_t *server = embed_mcp_create(&config);

    // Register function
    const char* names[] = {"a", "b"};
    const char* descs[] = {"First number", "Second number"};
    mcp_param_type_t types[] = {MCP_PARAM_DOUBLE, MCP_PARAM_DOUBLE};

    embed_mcp_add_tool(server, "add", "Add two numbers",
                       names, descs, types, 2, MCP_RETURN_DOUBLE, add_wrapper, NULL);

    embed_mcp_run(server, EMBED_MCP_TRANSPORT_HTTP);
    embed_mcp_destroy(server);
    return 0;
}

Build and Run

# Build
make

# Run Streamable HTTP server
./bin/mcp_server --transport http --port 8080

# Or run STDIO server
./bin/mcp_server --transport stdio

Function Registration

GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →