Skip to content

feat: MCP server so agents can drive two-go#12

Merged
tugkanboz merged 1 commit into
mainfrom
feature/mcp-server
Jun 2, 2026
Merged

feat: MCP server so agents can drive two-go#12
tugkanboz merged 1 commit into
mainfrom
feature/mcp-server

Conversation

@tugkanboz

Copy link
Copy Markdown
Member

Closes #11.

Expose two-go over the Model Context Protocol so an agent like Claude can use it as tools. Zero dependency: a minimal JSON-RPC 2.0 server over stdio, no SDK.

  • Binary two-go-mcp and the two-go/mcp module (createServer().handle(message) is transport agnostic and testable).
  • Tools: http_request (real call via go()), gen_openapi, gen_postman, infer_schema, validate_schema.
  • Handles initialize, tools/list, tools/call; tool errors come back as an isError result, unknown methods as a JSON-RPC error.
  • Register with: { "mcpServers": { "two-go": { "command": "npx", "args": ["-y", "two-go-mcp"] } } }.

624 unit tests green (8 new, including http_request against a local server and a stdio smoke), tsc clean, no em dashes.

Add a zero-dependency Model Context Protocol server over stdio (two-go-mcp
binary, two-go/mcp module). Tools: http_request, gen_openapi, gen_postman,
infer_schema, validate_schema. Handles initialize, tools/list, tools/call as
JSON-RPC 2.0. Server logic is transport agnostic and unit tested, including a
real http_request against a local server. Types, README, CHANGELOG.
@tugkanboz tugkanboz merged commit 215b31e into main Jun 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP server so agents can drive two-go

1 participant