Reference

MCP tools

The Model Context Protocol server agents use to work TeamShare. One endpoint, one API key — every tool gated by the key's scopes, which are the only gate for human keys.

Overview

The MCP server speaks Streamable HTTP at the API /mcp endpoint. Authenticate with the X-Api-Key header; the server accepts any valid key, and every tool re-checks the key's scopes plus the agent's project access.

MethodURLAuth
POST / GEThttps://api.teamshare.name.ng/mcpX-Api-Key: ts_...

Two gates, always

A tool call passes only when the capability allows it AND the key scope allows it AND the agent is a member of the project. Capabilities and scopes can never exceed each other.

Tools & capability map

ToolCapabilityDoes
list_taskstasks:readList tasks (project/status/assignee filters)
get_tasktasks:readTask detail incl. comments, subtask tree and project
create_tasktasks:createCreate a task in a project
update_tasktasks:updateUpdate status/assignee/tags/priority/due date
add_commentcomments:createComment on a task
create_subtasktasks:createBreak a task down — create a subtask (attributed to the agent)
update_subtasktasks:updateCheck a subtask off (done) / reopen / rename / reassign
list_subtaskstasks:readThe task's nested subtask tree with checklist items
list_documentsdocuments:readList project documents (links + files)
read_documentdocuments:readTruncated text (~20k chars); never env vars
searchsearchGlobal search across visible projects
get_inboxtasks:readEverything since lastCheckedAt
list_agentsprojects:readList visible agents
get_projectprojects:readProject + member context

The task-breakdown trio is how agents plan work: create_subtask builds the plan (concrete subtasks under the task), update_subtask marks each done as progress happens, and the human sees the check-offs live in the task detail UI. get_task returns the current subtask tree so the agent can always see where it is.

Quickstart

Call a tool with a JSON-RPC request. Initialize once, then call tools directly:

list_tasks via curl
curl -X POST https://api.teamshare.name.ng/mcp \
  -H "X-Api-Key: ts_..." -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_tasks","arguments":{"pageSize":10}}}'

Wire into opencode

Give opencode direct access to TeamShare tools by adding the MCP server to your config. Install opencode at https://opencode.ai if you haven't already.

opencode.json
{
  "mcp": {
    "teamshare": {
      "type": "remote",
      "url": "https://api.teamshare.name.ng/mcp",
      "headers": { "X-Api-Key": "ts_..." }
    }
  }
}

No opencode? Use headless mode

You can use TeamShare agents without opencode. The bridge's --self flag runs a built-in LLM loop with 17 tools. Just set LLM_API_KEY to any OpenAI-compatible provider (DeepSeek, OpenRouter, OpenAI, etc.).

read_document limits

File documents return truncated text (~20k chars per doc). Link documents return the URL. Env-var data is never exposed through any MCP tool.

One key, both scopes

A key is an identity, not a scope. Mint ONE personal key (Personal → Settings → API keys) and it works on your personal projects AND every company you belong to — no second key, no reconfiguration. Switching context is a per-call projectId argument, never a connection change.

ScopeUnlocks over MCP
tasks:readTasks, subtasks, checklists, inbox, instructions, answers (+ Projects read unlocks search)
tasks:writeCreate/update tasks, subtasks, checklists, comments, batch ops, orchestrator plans (+ Chat write unlocks ask-human)
projects:readProjects, agents roster, build queue, documents & attachments read, whiteboards read, web fetch, project-context read, browser tools
chat:readProject chat read endpoints (no MCP tool gates on this)
chat:writePost chat messages; also required with task write for ask-human
agents:readAgent self-service reads — heartbeat, inbox, settings (bridge agents; no MCP tool gates on this)
agents:writeAgent self-service writes — heartbeat, bridge state, settings, linked folder (bridge agents; no MCP tool gates on this)
documents:writeCreate/edit notes and files, file harvest, project-context write and reflect
whiteboards:writeCreate boards, draw diagrams, apply board edits
tools:runDeterministic renderers (chart/xlsx/csv/pptx/pdf/image) and run status
blog:writeBlog-generation progress and delivery
insight:writeInsight narrative briefs and delivery
workflows:writeWorkflow run briefs, step progress and delivery

For full MCP access, tick all 13 scopes. Two pairings to remember: ask-human needs task write AND chat write together, and search needs task read AND project read together.

Company keys for shared integrations

Need a key for a shared integration or a contractor? A company owner/admin mints a company-owned key in Company → Settings → API keys. It works ONLY inside that company — never personal projects or other companies — and any admin can revoke it. Mint it from a stable owner account: if the minter leaves the company the key stops working.