coyote-mcp

v1.36.5
@yata-technologies/coyote-mcp Checked 3 days ago Published 2 days ago

Coyote MCP server for Claude Code integration

An MCP (Model Context Protocol) server that lets you manage Coyote worklogs, tasks, and issues from Claude Code or Claude Desktop using natural language. This repository is the development source for the server. End users do not install from here — the server is published to npm and run via npx: (See the internal install guide for the full end-user setup — Claude Desktop config, authentication, etc.)

Summary extracted from the README.

Coyote MCP Server

An MCP (Model Context Protocol) server that lets you manage Coyote worklogs, tasks, and issues from Claude Code or Claude Desktop using natural language.

This repository is the development source for the server. End users do not install from here — the server is published to npm and run via npx:

claude mcp add coyote -s user -- npx -y @yata-technologies/coyote-mcp@latest

(See the internal install guide for the full end-user setup — Claude Desktop config, authentication, etc.)

The rest of this document is for developers working on Coyote MCP. See CLAUDE.md for the full architecture, API spec, and conventions.


How it works

User → natural language → Claude Code / Claude Desktop
                              ↓ MCP tool call (stdio)
                       Coyote MCP Server (this package, runs locally)
                              ↓ Bearer coy_xxx
                       Coyote Worker API (Cloudflare Workers)
                              ↓ SQL
                       D1 Database (Cloudflare)

The server runs on the user's machine and talks to Claude over stdio (the default) or, opt-in, as one resident Streamable HTTP server shared by every Claude Code session — see HTTP transport. It calls the Coyote API (https://api.coyote-worklog.com) with a Bearer token stored at ~/.coyote/token.


HTTP transport (resident server)

By default every Claude Code session spawns its own stdio coyote-mcp process. People who keep many sessions open for a long time can instead run one resident server that every session connects to over Streamable HTTP (COY-571). For the usual pattern — one to three sessions, /exit when a task is done — stdio remains the recommendation; HTTP mode buys nothing there and adds a supervisor, a port and a restart story.

HTTP mode is Claude Code only. Claude Desktop's local MCP config is stdio-only.

npx -y @yata-technologies/coyote-mcp@latest --transport http --http-port 7341
# → serves MCP at http://127.0.0.1:7341/mcp
Flag Env var Default
--transport stdio|http COYOTE_MCP_TRANSPORT stdio No flag = stdio, unchanged
--http-host COYOTE_MCP_HTTP_HOST 127.0.0.1 A non-loopback bind is refused unless a bearer secret is set
--http-port COYOTE_MCP_HTTP_PORT 7341
--http-path COYOTE_MCP_HTTP_PATH /mcp
— COYOTE_MCP_HTTP_AUTH_TOKEN unset Optional shared secret; every /mcp request must send Authorization: Bearer <secret>. Env only, so it never shows in ps
--no-auto-restart COYOTE_MCP_NO_AUTO_RESTART=1 auto-restart on See Updating below
--idle-restart-minutes COYOTE_MCP_IDLE_RESTART_MINUTES 10

Flags win over env vars. The flag names follow backlog-mcp-server v0.22.0+; the env vars are namespaced COYOTE_MCP_* rather than Backlog's bare MCP_*, so a shell-wide MCP_TRANSPORT=http meant for another server cannot flip every stdio coyote-mcp into HTTP mode.

Behaviour

  • Stateless — every POST gets a fresh MCP Server + transport, so concurrent sessions cannot interfere. GET /mcp (standing SSE stream) and DELETE /mcp answer 405.
  • DNS-rebinding guard — requests whose Host or Origin is not localhost / 127.0.0.1 / [::1] (or the explicitly bound host) get 403.
  • GET /health → {"status":"ok","version":"x.y.z","transport":"http"}, answered before every guard.
  • Credentials — unchanged: ~/.coyote/token, re-read on every tool call. coyote_login works from any session and applies to all of them. The server therefore acts as one Coyote user — the same as stdio, where every process of one OS user reads the same token file.
  • Other local users — a 0600 token file is private to you, but a loopback port is reachable by every OS account on the machine. On a shared machine set COYOTE_MCP_HTTP_AUTH_TOKEN.

Updating. A resident server keeps its launch-time version. When installed via npx @latest it polls /api/mcp/version hourly; once a newer version is published and no request has arrived for the idle window (default 10 min), it exits and the supervisor respawns it through npx @latest. Open sessions keep working — stateless HTTP holds no connection for an idle session, and Claude Code reaches the new process on its next call without /mcp (verified with Claude Code 2.1.307: a call that lands during the few-second respawn fails once with ECONNREFUSED, the next call succeeds). To update immediately: launchctl kickstart -k gui/$(id -u)/com.yata.coyote-mcp (macOS) / systemctl --user restart coyote-mcp (Linux). coyote_upgrade and the coyote_get_me update notice say this in HTTP mode instead of "restart Claude".

macOS — launchd LaunchAgent

Use a LaunchAgent (~/Library/LaunchAgents), not a LaunchDaemon: it runs as you, so it can read ~/.coyote/token and coyote_login can open your browser.

~/Library/LaunchAgents/com.yata.coyote-mcp.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.yata.coyote-mcp</string>
  <key>ProgramArguments</key>
  <array>
    <!-- Absolute path: launchd does not use your shell's PATH. `which npx` -->
    <string>/opt/homebrew/bin/npx</string>
    <string>-y</string>
    <string>@yata-technologies/coyote-mcp@latest</string>
    <string>--transport</string>
    <string>http</string>
    <string>--http-port</string>
    <string>7341</string>
  </array>
  <key>EnvironmentVariables</key>
  <dict>
    <!-- npx runs `node` by name, so node's bin dir must be on PATH -->
    <key>PATH</key>
    <string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
    <!-- Optional shared secret (then `chmod 600` this file):
    <key>COYOTE_MCP_HTTP_AUTH_TOKEN</key>
    <string>change-me</string>
    -->
  </dict>
  <key>RunAtLoad</key>
  <true/>
  <key>KeepAlive</key>
  <true/>
  <key>StandardErrorPath</key>
  <string>/tmp/coyote-mcp.log</string>
</dict>
</plist>
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.yata.coyote-mcp.plist
curl http://127.0.0.1:7341/health       # wait for {"status":"ok",...} — first start downloads the package

Linux — systemd user unit

Use a user unit (systemctl --user), not a system service, for the same reason: it runs as you and reads ~/.coyote/token. Verified on ChromeOS (Crostini).

~/.config/systemd/user/coyote-mcp.service:

[Unit]
Description=Coyote MCP (resident Streamable HTTP server)

[Service]
# Absolute paths: systemd does not use your shell's PATH. With a node version
# manager (fnm / nvm), point at the installed version's bin dir — NOT `which npx`,
# which may be a per-shell path that disappears (e.g. fnm's /run/user/…/fnm_multishells).
# npx runs `node` by name, so node's bin dir must be on PATH.
Environment=PATH=/usr/local/bin:/usr/bin:/bin
ExecStart=/usr/bin/npx -y @yata-technologies/coyote-mcp@latest --transport http --http-port 7341
# Optional shared secret (then `chmod 600` this file):
# Environment=COYOTE_MCP_HTTP_AUTH_TOKEN=change-me
Restart=always
RestartSec=2

[Install]
WantedBy=default.target
systemctl --user daemon-reload
systemctl --user enable --now coyote-mcp
curl http://127.0.0.1:7341/health       # wait for {"status":"ok",...} — first start downloads the package
journalctl --user -u coyote-mcp -n 20   # server log

Restart=always is what turns the idle self-restart into an update: the server exits with status 0, and systemd only respawns on a clean exit when Restart is always.

Switching a Claude Code install from stdio to HTTP

  1. claude mcp get coyote — note every scope it is registered in (user / project .mcp.json / local).
  2. Start the LaunchAgent / systemd unit and confirm /health answers before touching the registration, so it never points at nothing.
  3. Re-register under the same name coyote — Coyote Tracker's hooks match on mcp__coyote__… tool names and silently skip under any other name:
    claude mcp remove coyote -s user
    claude mcp add --transport http -s user coyote http://127.0.0.1:7341/mcp
    # with a bearer secret: add  --header "Authorization: Bearer <secret>"
    
  4. Restart every open Claude Code session once — an open session keeps its own stdio process until then. ps aux | grep coyote-mcp should show a single server.

No re-login is needed (~/.coyote/token is reused). Rollback: claude mcp remove coyote -s user, re-add the stdio npx entry, then launchctl bootout gui/$(id -u)/com.yata.coyote-mcp (macOS) / systemctl --user disable --now coyote-mcp (Linux).


Repository layout

/
├── CLAUDE.md            Architecture, API spec, conventions (read this first)
├── README.md            This file
├── package.json         Version source of truth
├── tsconfig.json
├── test/                node:test suites, run against `dist/` (no framework)
└── src/
    ├── index.ts         Entry point (server start / `login` command, tool dispatch)
    ├── lib/
    │   ├── client.ts    HTTP client (Bearer auth, GET/POST/PUT/DELETE)
    │   └── token.ts     read/write ~/.coyote/token
    └── tools/           one file per resource (auth, tasks, issues, worklogs, comments, …)

Development setup

git clone git@github.com:yata-technologies/coyote-mcp.git
cd coyote-mcp
npm install
npm run build      # tsc → dist/

node_modules is not tracked. Always run npm install after cloning or pulling, otherwise the server fails to start with a module-resolution error.

Run your local build

Register your clone in ~/.claude.json (Claude Code), pointing at the compiled entry point:

{
  "mcpServers": {
    "coyote": {
      "command": "node",
      "args": ["/absolute/path/to/coyote-mcp/dist/index.js"]
    }
  }
}

Restart Claude Code to pick it up. Use npm run dev (tsc --watch) while iterating, then restart the client to load the rebuilt dist/. Update your clone manually with git pull && npm run build — the server no longer touches git on startup (the old clone-era auto-update was removed in COY-318).

Authenticate the same way users do — ask "Login to Coyote" in chat, or from the CLI:

node dist/index.js login

If you also have the npm version registered, remove it first so you don't run two coyote servers: claude mcp remove coyote -s user.


Scripts

Command Purpose
npm run build Compile TypeScript → dist/
npm run dev tsc --watch for local iteration
npm run clean Remove dist/
npm test Build, then run test/*.test.mjs with node --test
npm run prepublishOnly Runs automatically before npm publish (rebuilds dist/)

Adding a tool

  1. Add the tool definition (inputSchema) and handler to a file in src/tools/ (new file or existing one).
  2. Export the tool definition and handler.
  3. Import them in src/index.ts, add the tool to ALL_TOOLS and the matching Set.
  4. Wire the handler into the CallToolRequestSchema dispatch.

Tool names follow coyote_<verb>_<resource> (list/get/create/update/delete). See CLAUDE.md for naming rules and the Coyote API reference.

Distribution is npm/npx only — the .mcpb bundle and manifest.json were retired in COY-263, so there's no manifest sync step anymore.


Versioning

Every PR bumps the version — patch or higher, regardless of whether it's a fix, feature, refactor, or docs change. npm is the single source of distribution (@latest), so the bump is what ships the change.

File How
package.json Bump version manually
src/index.ts Reads from package.json — no change needed

Releasing

Publishing is automated. On push to main, .github/workflows/release.yml compares package.json's version against the npm registry and runs npm publish only when it's a new version (a forgotten bump simply skips; a re-run never errors on a duplicate). prepublishOnly rebuilds dist/, and the npm tarball ships dist/ only (files: ["dist"] — this README is not published).

So: merge a version-bumped PR to main, and the new version goes live on npm automatically. Users on @latest pick it up on their next client restart.


Available tools

Category Tools
Auth coyote_login, coyote_login_complete, coyote_get_me, coyote_update_me, coyote_upgrade
Projects coyote_list_projects, coyote_get_project, coyote_create_project, coyote_update_project, coyote_delete_project, coyote_list_members
Members coyote_add_member, coyote_update_member_role, coyote_remove_member
Issues coyote_list_issues, coyote_get_issue, coyote_create_issue, coyote_update_issue, coyote_delete_issue
Tasks coyote_list_tasks, coyote_get_task, coyote_create_task, coyote_update_task, coyote_delete_task
Worklogs coyote_list_worklogs, coyote_get_worklog, coyote_create_worklog, coyote_update_worklog, coyote_delete_worklog
Comments coyote_list_comments, coyote_create_comment, coyote_update_comment, coyote_delete_comment
Sprints coyote_list_sprints, coyote_get_sprint, coyote_get_current_sprint, coyote_create_sprint, coyote_update_sprint, coyote_delete_sprint
Patterns coyote_list_patterns, coyote_get_pattern, coyote_create_pattern, coyote_update_pattern, coyote_delete_pattern
Categories coyote_list_categories, coyote_create_category, coyote_update_category, coyote_delete_category
Phases coyote_list_phases, coyote_create_phase, coyote_update_phase, coyote_delete_phase
Activities coyote_list_activities, coyote_get_activity, coyote_create_activity, coyote_update_activity, coyote_delete_activity
Users coyote_list_users, coyote_get_user, coyote_update_user, coyote_deactivate_user, coyote_reactivate_user
Vendors coyote_list_vendors, coyote_create_vendor, coyote_update_vendor, coyote_delete_vendor

Local files (user machine)

Path Contents
~/.coyote/token API token (coy_xxx), permission 0600. Windows: %USERPROFILE%\.coyote\token
~/.coyote/token-expires-at The token's expiry as the server sent it at login (UTC, YYYY-MM-DD HH:MM:SS), permission 0600. Absent for tokens saved before v1.36.0. Used to say "expired — run coyote_login" on a 401 and to warn in coyote_get_me within 14 days of expiry (COY-608). Tokens expire 90 days after issue.
~/.claude.json MCP server registration (Claude Code)

Security

Found a vulnerability? Please report it privately via GitHub Security Advisories rather than opening a public issue. See SECURITY.md for details.


License and Trademarks

Released under the MIT License — see LICENSE.

"Coyote" and "YATA Technologies" are trademarks of YATA Technologies. The MIT license covers the source code in this repository; it does not grant permission to use these names or logos in ways that suggest endorsement by, or affiliation with, YATA Technologies.