# prompt-service **Repository Path**: mcp-office/prompt-service ## Basic Information - **Project Name**: prompt-service - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-06-12 - **Last Updated**: 2025-06-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ```json { "mcpServers": { "calculator": { "command": "npx", "args": ["mcp-remote", "http://localhost:8080/sse"] } }, "prompts": { "calculator": { "inputTemplate": "请计算以下表达式: {{input}}", "outputTemplate": "计算结果是: {{output}}", "fallback": "抱歉,计算失败。请检查输入是否正确。" } }, "resources": { "calculator": { "env": { "API_KEY": "your-api-key", "BASE_URL": "https://api.example.com" }, "files": [ "path/to/config.json", "path/to/credentials.env" ] } } } ``` ```go package main import ( "context" "fmt" "log" "github.com/zeromicro/go-zero/core/conf" "github.com/zeromicro/go-zero/mcp" ) const fileContent = `package main import "fmt" func main() { fmt.Println("Hello, World!") } ` // Example MCP server demonstrating tool, prompt, and resource registration func main() { // Load configuration from YAML file var c mcp.McpConf if err := conf.Load("config.yaml", &c); err != nil { log.Fatalf("Failed to load config: %v", err) } // Create MCP server server := mcp.NewMcpServer(c) defer server.Stop() goResource := mcp.Resource{ Name: "go-example", URI: "file:///project/src/main.go", Description: "A simple Go example with multiple files", Handler: func(ctx context.Context) (mcp.ResourceContent, error) { return mcp.ResourceContent{ MimeType: "text/x-go", Text: fileContent, }, nil }, } server.RegisterResource(goResource) fmt.Printf("Starting MCP server on :%d\n", c.Port) defer server.Stop() server.Start() } ```