mcp-server

command
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

MCP server example — exposes a DraftCrew agent as an MCP-compatible endpoint.

This example starts an agent with built-in tools and an MCP server on :9100. Any MCP client can connect via SSE, discover tools, and call them.

Prerequisites:

  • Ollama running locally with a model (default: gemma3:4b) OR any OpenAI-compatible API

Usage:

# Terminal 1 — start the server:
go run main.go

# Terminal 2 — test with curl:
# 1. Connect to SSE stream:
curl -N http://localhost:9100/sse
# 2. Initialize:
curl -X POST http://localhost:9100/message \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'
# 3. List tools:
curl -X POST http://localhost:9100/message \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'

Jump to

Keyboard shortcuts

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