basic

command
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Basic Example

Serves the TestService from pkg/testdata as MCP tools over stdio, using connectmcp.Register and the official MCP go-sdk. The methods are tools because they carry the (connectmcp.v1.tool_description) option in test_service.proto.

go run .

The tools are annotated from the protos, so clients can tell a read from a write. GetItem declares option idempotency_level = NO_SIDE_EFFECTS; and a title, and CreateItem says with (connectmcp.v1.tool_annotations) that it adds data without destroying any. tools/list returns:

{"name": "testdata_TestService_GetItem", "title": "Get item",
 "annotations": {"title": "Get item", "readOnlyHint": true, "idempotentHint": true, "destructiveHint": false}, ...}
{"name": "testdata_TestService_CreateItem", "title": "Create item",
 "annotations": {"title": "Create item", "destructiveHint": false, "openWorldHint": false}, ...}

The other two tools carry no annotations, so clients assume MCP's defaults (possibly destructive, open world).

See ../connect for serving MCP over HTTP next to the connect API itself.

Test / list tools

f/mcptools can be useful.

Run mcptools tools go run .

Documentation

Overview

Package main serves a connect-go v2 service as MCP tools over stdio.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL