Commit Graph

23 Commits

Author SHA1 Message Date
Ed Zynda 0703dd1602 fix: eliminate escape sequence leak from spinner tea.Program instances
Each spinner created a new tea.NewProgram which sent DECRQM queries for
synchronized output mode 2026. When the program exited and restored
cooked terminal mode, the terminal's DECRPM response leaked as visible
^[[?2026;2$y characters. Replace Bubble Tea spinner with a simple
goroutine animation loop writing directly to stderr via lipgloss.
2026-02-25 18:17:25 +03:00
Shane McDonald c4aa911e3a feat: add Google Vertex AI support for Claude models (#146)
Add support for using Claude models via Google Cloud Vertex AI through
the `google-vertex-anthropic` provider. This enables users who have
Claude access through their Google Cloud account to use mcphost with
Vertex AI authentication.

Changes:
- Add `google-vertex-anthropic` provider case and createVertexAnthropicProvider()
- Support multiple env var names for project/region to match eino-claude:
  - Project: ANTHROPIC_VERTEX_PROJECT_ID, GOOGLE_CLOUD_PROJECT, GCLOUD_PROJECT
  - Region: CLOUD_ML_REGION (defaults to "global" if not set)
- Upgrade eino from v0.5.11 to v0.7.11 (required by eino-claude v0.1.12)
- Migrate schema API from OpenAPI v3 to JSON Schema (eino v0.7.11 change)

Usage:
  # Authenticate with Google Cloud
  gcloud auth application-default login

  # Set required environment variables
  export ANTHROPIC_VERTEX_PROJECT_ID="your-project-id"
  export CLOUD_ML_REGION="us-east5"  # or use default "global"

  # Run mcphost
  mcphost --model google-vertex-anthropic:claude-sonnet-4@20250514

Reference: https://docs.anthropic.com/en/docs/claude-code/google-vertex-ai

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 13:01:18 +03:00
Cory LaNou 1b3a8c171a fix: convert JSON Schema draft-07 exclusive bounds to draft-04 format (#147)
* fix: convert JSON Schema draft-07 exclusive bounds to draft-04 format

Chrome DevTools MCP and other MCP servers use JSON Schema draft-07 where
exclusiveMinimum/exclusiveMaximum are numeric values representing the
actual bounds. However, kin-openapi (OpenAPI 3.0) expects these fields
as booleans that modify the minimum/maximum values (draft-04 format).

This fix recursively processes input schemas to convert:
- exclusiveMinimum: N → minimum: N, exclusiveMinimum: true
- exclusiveMaximum: N → maximum: N, exclusiveMaximum: true

Handles nested schemas in properties, items, additionalProperties,
and schema composition keywords (allOf, anyOf, oneOf, not).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test: add table-driven tests for JSON Schema draft conversion

Adds comprehensive tests for convertExclusiveBoundsToBoolean():
- Simple exclusiveMinimum/exclusiveMaximum conversion
- Both bounds together
- Already boolean values (draft-04 style, unchanged)
- No exclusive bounds (unchanged)
- Nested properties
- Array items
- allOf composition
- additionalProperties
- Real-world Chrome DevTools MCP schema example
- Invalid JSON handling (returns unchanged)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 16:03:16 +03:00
Ed Zynda 63704f55b5 godoc 2025-11-12 16:48:46 +03:00
Ed Zynda d3f9759eb4 refactor debug messages 2025-08-08 09:32:04 +03:00
Shancang 76741ab037 Feature/add connection pool (#120)
* feat: add MCP connection pool with health check and retry mechanism

* feat: add proactive connection health check before tool calls

- Add GetConnectionWithHealthCheck method to perform health check before reusing connections
- Add performHealthCheck method to test connection health with ListTools call
- Modify InvokableRun to use health-checked connections
- This prevents first tool call failure when connection is broken
- Improves user experience by ensuring connections are healthy before tool execution

---------

Co-authored-by: 茂勋 <shancangchen.csc@alibaba-inc.com>
2025-08-05 17:01:12 +03:00
Ed Zynda b0761f7ada add fetch_summarize tool 2025-07-15 13:35:18 +03:00
Ed Zynda 32c46e4dc3 Fix for anthropic 2025-06-28 14:17:53 +03:00
Ed Zynda 00aa3c6995 Env substitution (#93)
* compact mode

* tweaks

* tweaks

* tweaks

* fix streaming in tool calls

* impl env sub

* fix
2025-06-27 16:30:18 +03:00
Ed Zynda daf5c41ac9 Fix object schema missing properties error for tools without input parameters (#90)
Fixes #89: Tools created without input properties were causing OpenAI function
calling validation errors with "object schema missing properties" message.

The issue occurred when MCP tools had no input parameters, resulting in OpenAPI
schemas with Type="object" but Properties=nil, which violates OpenAI's function
calling schema requirements.

Changes:
- Add schema validation fix in loadServerTools to ensure object schemas have
  empty properties map when Properties is nil
- Add comprehensive regression test TestIssue89_ObjectSchemaMissingProperties
- Add additional test coverage for tools without properties

The fix ensures backward compatibility while resolving the validation error.
Users no longer need the workaround of adding dummy parameters to their tools.

🤖 Generated with [opencode](https://opencode.ai)

Co-authored-by: opencode <noreply@opencode.ai>
2025-06-26 21:33:36 +03:00
Ed Zynda a2346721cb Claude max (#78)
* anthropic oauth

* update claude oauth costs
2025-06-25 14:27:19 +03:00
Ed Zynda 0972a1600a fix legacy mcp config 2025-06-25 13:15:09 +03:00
Ed Zynda d9983b9524 builtin servers 2025-06-24 16:29:44 +03:00
Ed Zynda 0d6742286b simplify mcp 2025-06-24 15:56:29 +03:00
Ed Zynda 679709d078 Fix deadlocks 2025-06-24 09:12:09 +03:00
Ed Zynda 1f407bf7fb streamable HTTP 2025-06-19 16:16:19 +03:00
Hyunchul Jung c159972306 feat: support env in MCP-config (#69) 2025-06-13 11:05:30 +03:00
Ed Zynda 42eb398148 format 2025-06-11 13:09:51 +03:00
Ed Zynda 67dabdfeb2 send errors back to LLM 2025-06-10 14:32:00 +03:00
Ed Zynda 57efdb5332 cleanup 2025-06-10 13:44:17 +03:00
Ed Zynda 13ede07ea5 formatting 2025-06-10 01:21:17 +03:00
Ed Zynda 887622b5c4 Enhancements (#64)
* filter tools

* Enhancements
2025-06-09 18:51:06 +03:00
Ed Zynda 8645a8c36a Huge refactor (#58)
* overhaul

* fix ui glitch

* system messages

* use sonnet 4
2025-06-09 14:38:31 +03:00