mcp

module
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT

README ΒΆ

Teamwork MCP Server

Model Context Protocol server for Teamwork.com integration with Large Language Models

Go Report Card Go MCP

πŸ“Œ Are you a Teamwork.com user wanting to connect AI tools to your Teamwork.com site right now? Jump straight to the Usage Guide for tokens, enabling MCP, and client configuration examples.

πŸ“– Overview

This MCP (Model Context Protocol) server enables seamless integration between Large Language Models and Teamwork.com. It provides a standardized interface for LLMs to interact with Teamwork.com projects, allowing AI agents to perform various project management operations.

πŸ€– What is MCP?

Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to LLMs. This server describes all the actions available in Teamwork.com (tools) in a way that LLMs can understand and execute through AI agents.

✨ Features

  • Multiple Transport Modes: HTTP and STDIO interfaces for different deployment scenarios
  • Secure Authentication: Bearer token and OAuth2 integration with Teamwork.com
  • Tool Framework: Extensible toolset architecture for adding new capabilities
  • Production Ready: Comprehensive logging, monitoring, and observability
  • Read-Only Mode: Optional restriction to read-only operations for safety

See the auto-generated Tool Reference for every create/read/update operation exposed across Projects, Desk, Spaces, and Chat.

πŸš€ Available Servers

This project provides three different ways to interact with the Teamwork.com MCP server:

πŸ“‘ HTTP Server

Production-ready HTTP server for cloud deployments and multi-client support.

πŸ“– Full HTTP Server Documentation

Quick start:

TW_MCP_SERVER_ADDRESS=:8080 go run cmd/mcp-http/main.go
πŸ’¬ STDIO Server

Direct STDIO interface for desktop applications and development environments.

πŸ“– Full STDIO Server Documentation

Quick start:

TW_MCP_BEARER_TOKEN=your-token go run cmd/mcp-stdio/main.go
πŸ› οΈ HTTP CLI

Command-line tool for testing and debugging MCP server functionality.

πŸ“– Full HTTP CLI Documentation

Quick start:

go run cmd/mcp-http-cli/main.go -mcp-url=https://mcp.example.com list-tools

πŸ“‹ Prerequisites

  • Go 1.26 or later
  • Valid Teamwork.com API credentials (bearer token or OAuth2 setup)

πŸ§ͺ Development & Testing

Running Tests
# Run all tests
go test ./...

# Run specific package tests
go test ./internal/twprojects/
MCP Inspector

For debugging purposes, use the MCP Inspector tool:

NODE_EXTRA_CA_CERTS=letsencrypt-stg-root-x1.pem npx @modelcontextprotocol/inspector node build/index.js

[!IMPORTANT] Note: The NODE_EXTRA_CA_CERTS environment variable is required when using OAuth2 authentication with the Let's Encrypt certification authority. Download the certificate here.

πŸ—οΈ Architecture

β”œβ”€β”€ cmd/
β”‚   β”œβ”€β”€ mcp-http/          # HTTP server implementation
β”‚   β”œβ”€β”€ mcp-stdio/         # STDIO server implementation
β”‚   β”œβ”€β”€ mcp-http-cli/      # CLI tool for testing via HTTP
β”‚   β”œβ”€β”€ mcp-test/          # Walks tool handlers against a real site
β”‚   β”œβ”€β”€ mcp-tokens/        # Token-cost report for the tool surface
β”‚   └── docs-gen/          # Generates docs/tool-reference.md
β”œβ”€β”€ pkg/                   # Importable by other MCP servers built on this one
β”‚   β”œβ”€β”€ auth/              # Authentication helpers (bearer & OAuth2 token handling)
β”‚   β”œβ”€β”€ cli/               # -toolsets flag parsing
β”‚   β”œβ”€β”€ config/            # Configuration management (env, flags), MCP server setup
β”‚   β”œβ”€β”€ helpers/           # Shared utility functions (errors, link helpers, tool parsing)
β”‚   β”œβ”€β”€ request/           # HTTP request primitives / Teamwork API wiring
β”‚   β”œβ”€β”€ testutil/          # Product-neutral test mocks
β”‚   β”œβ”€β”€ toolsets/          # Tool framework and registration logic
β”‚   └── twctx/             # Per-request values derived from the bearer token
β”œβ”€β”€ internal/              # This server's own tools, not importable elsewhere
β”‚   β”œβ”€β”€ twprojects/        # Teamwork project/domain tools (tasks, tags, timers, etc.)
β”‚   β”œβ”€β”€ twdesk/            # Teamwork Desk tools (tickets, customers, etc.)
β”‚   β”œβ”€β”€ twspaces/          # Teamwork Spaces tools (spaces, pages, etc.)
β”‚   └── twchat/            # Teamwork Chat tools (conversations, messages)
β”œβ”€β”€ examples/              # Usage & integration examples (LangChain Node/Python)
β”œβ”€β”€ docs/usage/            # End-user setup & connection guide
β”œβ”€β”€ Makefile               # Common developer tasks
β”œβ”€β”€ Dockerfile             # Container build configuration
β”œβ”€β”€ CODE_OF_CONDUCT.md     # Community guidelines
β”œβ”€β”€ CONTRIBUTING.md        # Contribution guide
└── SECURITY.md            # Security policy

Directories ΒΆ

Path Synopsis
cmd
docs-gen command
Command docs-gen generates a Markdown reference of the Teamwork MCP tool surface (the CRUD matrix) directly from the registered toolsets.
Command docs-gen generates a Markdown reference of the Teamwork MCP tool surface (the CRUD matrix) directly from the registered toolsets.
mcp-http command
mcp-http-cli command
mcp-stdio command
mcp-test command
mcp-test walks MCP tool handlers through a real Teamwork.com site, creating and deleting real data.
mcp-test walks MCP tool handlers through a real Teamwork.com site, creating and deleting real data.
mcp-tokens command
mcp-tokens reports tiktoken-based token counts for every MCP tool exposed by the codebase, sorted by cost.
mcp-tokens reports tiktoken-based token counts for every MCP tool exposed by the codebase, sorted by cost.
next-version command
next-version computes the next semantic version for a release from the changes merged since the last tag, so the bump is derived from what shipped instead of chosen by hand.
next-version computes the next semantic version for a release from the changes merged since the last tag, so the bump is derived from what shipped instead of chosen by hand.
internal
cli
Package cli registers this server's toolset profiles and preferred tool order, then hands back the flag value from pkg/cli.
Package cli registers this server's toolset profiles and preferred tool order, then hands back the flag value from pkg/cli.
testutil
Package testutil wires this server's product toolset groups onto the product-neutral mocks in pkg/testutil, so a product's tests get a ready MCP server from a status code and a canned body.
Package testutil wires this server's product toolset groups onto the product-neutral mocks in pkg/testutil, so a product's tests get a ready MCP server from a status code and a canned body.
twchat
Package twchat exposes a small set of Teamwork Chat API endpoints as MCP tools.
Package twchat exposes a small set of Teamwork Chat API endpoints as MCP tools.
pkg
cli
Package cli provides the command-line plumbing shared by MCP servers built on this repo: a flag value that turns a comma-separated list of toolset keys and profile names into the methods to enable.
Package cli provides the command-line plumbing shared by MCP servers built on this repo: a flag value that turns a comma-separated list of toolset keys and profile names into the methods to enable.
logsafe
Package logsafe scrubs request payloads before they reach a log sink or a trace tag.
Package logsafe scrubs request payloads before they reach a log sink or a trace tag.
mcphttp
Package mcphttp carries the HTTP plumbing an MCP server needs around the protocol handler: the middleware chain, the health and RFC 9728 metadata endpoints, and the bearer-token authentication that turns a token into the per-request values tool handlers read.
Package mcphttp carries the HTTP plumbing an MCP server needs around the protocol handler: the middleware chain, the health and RFC 9728 metadata endpoints, and the bearer-token authentication that turns a token into the per-request values tool handlers read.
presigned
Package presigned recognises the pre-signed storage URLs the file upload uses.
Package presigned recognises the pre-signed storage URLs the file upload uses.
testutil
Package testutil provides the product-neutral building blocks for MCP server tests: engines and HTTP servers that answer with a canned response while capturing what was sent, an in-memory MCP server assembled from any toolset group, and a helper that calls one tool through it.
Package testutil provides the product-neutral building blocks for MCP server tests: engines and HTTP servers that answer with a canned response while capturing what was sent, an in-memory MCP server assembled from any toolset group, and a helper that calls one tool through it.
toolsets
Package toolsets provides a framework for managing collections of tools.
Package toolsets provides a framework for managing collections of tools.
twctx
Package twctx carries the per-request values the MCP server derives from the caller's bearer token: which installation it belongs to, the token itself, the scopes it grants, and whether the installation lives in another region.
Package twctx carries the per-request values the MCP server derives from the caller's bearer token: which installation it belongs to, the token itself, the scopes it grants, and whether the installation lives in another region.

Jump to

Keyboard shortcuts

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