The served server¶
octomate.mcp.server ¶
Compose gateway, history, todos and installed integrations on one MCP server.
history_tool ¶
notify_tools_changed
async
¶
Notify the calling client when its protocol supports request-stream updates.
Newer protocol versions require subscriptions, which FastMCP does not serve. The stateless endpoint always exposes current availability through tools/list.
Source code in octomate/mcp/server.py
tentacle_instructions ¶
Source code in octomate/mcp/server.py
octomate_instructions ¶
tentacles_mcp ¶
tentacles_mcp(
resolve_session: Callable[
[], Awaitable[OctomateSession]
],
*,
manager: McpManager,
) -> FastMCP
Serve discovery, calls, and authorization for the current user's MCPs.
Source code in octomate/mcp/server.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | |
octomate_mcp ¶
octomate_mcp(
resolve_session: Callable[
[], Awaitable[OctomateSession]
],
thread_manager: ThreadManager,
nerves: Nerves,
*,
bearers: KnownBearers | None = None,
manager: McpManager,
conversations: ConversationManager,
skills: SkillManager,
) -> FastMCP
Compose the gateway, history, and user-scoped MCP tools over one session resolver.
Source code in octomate/mcp/server.py
octomate.mcp.gateway ¶
The gateway as MCP: the routing spells, served to agent runtimes.
One family on the server octomate.mcp.server composes. Its tools are typed functions whose
contracts and schemas are shared by all runtimes, so no two runtimes read two different tools; all that differs is the session
a call runs against, which each tool resolves through its declared FastMCP dependency.
The mounting side supplies a fixed session resolver for an in-process turn, or a
per-request lookup for a server that answers over HTTP.
Refusals are spoken as the model reads them: the GatewayRefusal policy raises
becomes a ToolError carrying the same sentence, as it becomes a ModelRetry for
Inkling, so every runtime corrects from one wording.
TELEPORT_RECORDED
module-attribute
¶
TELEPORT_RECORDED = "Teleporting — this turn ends here; you continue over there, with your context intact."
NATIVE_TELEPORT_STARTED
module-attribute
¶
NATIVE_TELEPORT_STARTED = "Teleporting — this conversation continues at the destination, its history with it, in a session Octomate runs there. This session stays as it is."
GATEWAY_INSTRUCTION_TEMPLATE
module-attribute
¶
GATEWAY_INSTRUCTION_TEMPLATE = "## Gateway — decide where this conversation goes and who handles it\n\nThese tools route the conversation. Default to handling it yourself: if you can answer\nwell or do the work, do it and call none of them. Routing is the exception — reach for a\ntool only when one of the signals below clearly fires.\n\n### Addresses and discovery\nFor `{teleport}`, `destination=null` uses the current address.\nFor `{summon}`, null hands over here; a supplied address starts independent work.\nA destination is a `ChannelAddress` object carrying\n`channel_tentacle_id`, `chat_type`, `chat_id`, `user_id`, and optional\n`channel_thread_id` and `shared` visibility. Use known identifiers and preserve\nvisibility; `user_id` must match the requesting user's linked identity on that\nchannel. When no current conversation is attached, supply an explicit address.\n\n`{inspect}` with `reveal=\"destinations\"` suggests addresses without creating anything.\nTo look further, add `channel` to browse one connected channel a level at a time:\nan address with `metadata.inside` is a place to open by passing that value as\n`inside`, and one without it can host a new thread unless `metadata.barred` says\nwhy not. A channel that cannot be browsed says so.\nYou can also supply a known address directly; discovery is optional, and each\noperation validates the address independently. Suggestions are not an exhaustive\nlist or a guarantee that every spell can use each address.\nFor `{teleport}`, `new_thread=true` is the default. For creation,\nuse `channel_thread_id=null`; an existing thread cannot contain another thread.\n\n### `{summon}` — hand off to another agent\nWithout a destination, summon transfers the conversation to a specialist who takes\nover this turn *and its follow-ups*: a real, sticky handoff. With a destination,\nthe specialist starts independent work in a new thread. Summon only when:\n- The request needs a capability you lack — e.g. running or editing code in a real\n repository or environment, or a domain another agent is described for.\n- It is substantial specialist work another agent would do markedly better, not\n something you can handle from what you already know.\n\nDo NOT summon when:\n- You can already answer or do it — length or a technical-sounding topic is not a reason.\n- You are only mildly unsure — ask the user a clarifying question instead.\n- No route clearly fits — handle it yourself or ask; never summon on a guess.\n\nWhen one fires, call `{inspect}` with `reveal=\"routes\"` first to see the agents and what\neach is for. Each route includes model metadata: its description and accepted effort levels.\nUse that metadata to choose a model suited to the work. Set\n`effort` only when the user explicitly asked for a level; otherwise leave it unset so\nthe agent's own default applies. Then `{summon}` — copying its `agent_id` and `model`\nexactly from that route, and writing a self-contained brief since the other agent may\nnot see this chat. Omit `destination` to hand over here; this is refused on a\ngroup's main conversation and in native sessions. Supply a parent address to start\nindependent work there while continuing here, inspecting that channel's routes first.\nThe call returns the new thread's address without waiting for its result. A `project`\nand optional `ref` select its workspace. Native sessions may use this mode without\nuploading history. You yourself are not a valid summon target.\n\nThe `hint` visibly opens the thread; `brief` is the receiver's self-contained task.\nTell the user where to follow the work. Results and follow-ups belong in that thread;\nyour current conversation keeps its owner and history. Unsupported or already nested\ndestinations are refused. Each summon with a destination starts new work;\ndo not repeat a successful call to check its progress.\n\n### `{teleport}` — relocate yourself\nMove this conversation into a new thread that *you* keep handling, carrying\neverything said so far. Use it for multi-step or long-running work that deserves its\nown thread but that you are the right one to do — no other agent involved.\nOmit `destination` or use null for the current address, or supply another address.\nTeleport requires attached conversation history that the agent can copy, and the\ndestination must support continuing that agent. Shared history can only move into\na sub-thread of the current chat; moving to another address requires a private\nsource. If a requested new thread cannot be created, the move fails without\nsilently continuing at its parent.\n\nTo work on a project, add `project` (from `{inspect}` with `reveal=\"projects\"`), and\n`ref` — a branch, tag or commit — only when the default branch is the wrong place to\nstart: the thread you land in is bound to it and you resume in its workspace, where\nwork is kept. A thread about no project runs in a throwaway tree, so do this before\nyou start work, not after. From inside a thread, use `destination=null`,\n`new_thread=false` and `project` to bind this one without opening another.\nBinding the current thread always resumes your work in its project workspace.\nStaying put requires a project; a thread binds once, and a different project is\na different thread. Native sessions must move into a new thread.\n\n### `{scheme}` — take it to the user privately\nContinue one-to-one with the person who asked, in their direct messages: for work that\nis theirs alone, or that does not belong in front of the group. Whoever already handles\ntheir direct messages picks it up, so write `brief` self-contained — it may not be you,\nand they cannot see this chat. `hint` opens the conversation over there and is the\nfirst thing they read; nothing is posted here, so close out your own reply by saying\nthe work is moving, not what it is. Its destination is a target object with\n`kind=\"dm\"`, optionally naming a connected `channel` ID for the user's linked\naccount there. Omitting the destination uses this channel's DM; that local move\nrequires a shared source. Another connected channel's DM can also be selected\nfrom a private source. The tool refuses unsupported or unlinked destinations.\n\n### `{dismiss}` — give the workspace back when the work is done\nA thread about a project keeps its workspace between turns, which is what makes its\nnext turn a resume. When the work is finished for good — merged, delivered, or\ndropped — say so with `{dismiss}`: the tree is released when this turn ends, after\nthis turn's work is saved to the project's mirror, and a later message here forks it\nafresh from there, so nothing is lost but the disk. Not for a pause — a thread\nwaiting on someone keeps its tree, and idle ones are swept on their own. Wrap up in\nthe same turn; your working directory goes with it.\n"
HANDOFF_INSTRUCTION
module-attribute
¶
HANDOFF_INSTRUCTION = "\n\n### Writing a brief\nA `summon` or `scheme` brief is the receiver's whole opening prompt, and it is\nbudgeted. Say, in this order and only where it changes what they do next: the goal\nin the user's own words; the constraints they set; the decisions made and why; what\nis done; what was tried and failed, so it is not tried again; what is left, first\nitem first; and what a finished result looks like. Leave the rest to the ledger:\nthe receiver reads every thread this person has spoken in, so cite a message by\nits `#msg:<id>` handle and name what to search for instead of repeating it. Do\nnot restate the project — the workspace's own instructions carry that.\n"
SEND_INSTRUCTION_TEMPLATE
module-attribute
¶
SEND_INSTRUCTION_TEMPLATE = "\n### `{send}` — deliver something now, without ending your turn\nFor a progress update, an intermediate result, or an image/file you produced along\nthe way. Anything sent this way is already delivered: your final reply continues from\nthere — summarize or extend it, never restate it. If everything worth saying went out\nalready, close with a short wrap-up rather than re-sending it.\n\n`destination` defaults to a target object with `kind=\"here\"`. A target with\n`kind=\"dm\"` delivers to the person who asked, privately —\nfor something that is *for them*, like a summary sent over; say in your reply that you\nsent it. `dm` hands nothing over: you keep this conversation and nobody picks the work\nup there, so use `{scheme}` when the work itself should continue privately. Asking for\n`dm` while already in that person's direct messages is fine — it lands here.\nA DM target can name a connected `channel` ID to reach their linked account there.\nIf no current conversation is attached, that channel must be explicit. Use the\nselected address's `channel_tentacle_id` as `channel`; the recipient is resolved\nfrom the user's linked profile.\n\nTo thread onto a specific message in a busy chat, lead with a reply segment whose id\nis that message's `#msg:<id>` handle — it must be the first segment. To ping someone,\nuse an `at` segment with their user id.\n"
COMMISSION_INSTRUCTION_TEMPLATE
module-attribute
¶
COMMISSION_INSTRUCTION_TEMPLATE = "\n### `{commission}` — put another agent to work in the background (you keep the conversation)\nWhere `{summon}` hands the conversation away, `{commission}` does not: another agent works a\nself-contained task and the tool returns its report — the user sees only your reply.\nCall `{inspect}` with `reveal=\"routes\"` and no `channel` to choose a route from this\nconversation's channel; the same model and effort rules as `{summon}` apply.\nGive the accomplice a short mnemonic `name`. The brief must stand alone: the\naccomplice cannot see this chat and has no user to ask, so include the goal, the\nrelevant context, and what a finished result looks like. Several commissions in one\nreply run concurrently.\n\n### `{whisper}` — a quiet word to an accomplice\nContinue an accomplice's work by `name`: it remembers everything it did. Use it to\nrefine or extend that work instead of commissioning a new accomplice.\n"
gateway_instructions ¶
The gateway's routing instruction, each spell rendered by the caller's own tool
naming — the identity for Inkling, gateway_… on the served server — so every
agent reads one contract under the names its runtime lists the tools by.
Source code in octomate/mcp/gateway.py
spoken ¶
A spell with its refusal spoken as the model reads it: a ToolError carrying
the gateway's sentence verbatim, as ModelRetry does for Inkling. A refusal is
ordinary traffic, not a failure, and is logged as such — anything else that
escapes a spell is a real error and keeps FastMCP's own handling.
Source code in octomate/mcp/gateway.py
served_session ¶
The session a call served over HTTP runs against.
Every call speaks for the registered user its verified bearer names. A driven
turn names its conversation with CONVERSATION_HEADER, written into its
launch config by Octomate itself along with the kicker's own secret, and
resolves to the session registered while that run is in flight — a bearer
other than the kicker's is refused, so no user can drive another's turn. A
native session names its agent with CLIENT_HEADER, written once at
install time, and gets native_session built for the bearer's user.
Identity is asserted by config and credential either way, never chosen by
the model, so a call carrying neither header is refused outright rather than
guessed at.
Source code in octomate/mcp/gateway.py
native_session
async
¶
An ephemeral gateway for one native call, never registered.
username is the verified bearer's owner, so the session speaks for that
person: anchored on a transient profile of theirs, its destinations are
their own linked accounts. The call is attributed to the configured agent, never
to a terminal session, so the session has no thread and no address — every
destination is a crossing. A static MCP config puts the tools in every
session once installed, and the bearer is the only control.
Source code in octomate/mcp/gateway.py
caller_thread ¶
The native session a call came from, where its runtime says so itself:
Codex names its thread in every call's _meta.
Source code in octomate/mcp/gateway.py
mount_gateway ¶
mount_gateway(
mcp: FastMCP,
resolve_session: Callable[
[], Awaitable[OctomateSession]
],
thread_manager: ThreadManager,
nerves: Nerves,
*,
conversations: ConversationManager,
) -> None
Register the gateway's spells on mcp.
resolve_session supplies each tool's FastMCP dependency: a fixed session for
a server mounted in-process for one turn, or a per-request lookup over HTTP.
thread_manager is the ledger a delivering spell writes through. nerves is how
a native session's teleport or scheme becomes its own turn at once.
Source code in octomate/mcp/gateway.py
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 | |
octomate.mcp.todos ¶
Conversation-scoped todos served through the authenticated Octomate session.
TODO_TOOL_NAMES
module-attribute
¶
TODO_TOOL_NAMES = frozenset(
{
"read_todos",
"write_todos",
"add_todo",
"update_todo_status",
"remove_todo",
"add_subtask",
"set_dependency",
"get_available_tasks",
}
)
TODO_INSTRUCTION
module-attribute
¶
TODO_INSTRUCTION = '## Task management\n\nYou have todo tools to plan and track multi-step work:\n- `read_todos` — view the current tasks with their ids and statuses.\n- `write_todos` — replace the whole list (use to lay out or restructure a plan).\n- `add_todo` — append one task without disturbing the rest.\n- `update_todo_status` — move a task between pending / in_progress / completed.\n- `remove_todo` — delete a task by id.\n- `add_subtask` / `set_dependency` / `get_available_tasks` — break tasks down,\n order them, and find what is unblocked.\n\nUse them for non-trivial work (3+ steps). Keep exactly one task `in_progress`,\nmark tasks `completed` immediately when done, and pass each task an imperative\n`content` ("Run tests") plus a present-continuous `active_form` ("Running tests").\n'
TodoTools
dataclass
¶
Conversation-scoped todo tools and the events their mutations produce.
Source code in octomate/mcp/todos.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | |
manager
class-attribute
instance-attribute
¶
read_todos
async
¶
List the current todos with their ids and statuses.
Source code in octomate/mcp/todos.py
write_todos
async
¶
Replace the whole todo list with todos.
Source code in octomate/mcp/todos.py
add_todo
async
¶
Append a single new todo (status pending).
Source code in octomate/mcp/todos.py
update_todo_status
async
¶
Change a todo's status by id.
Source code in octomate/mcp/todos.py
remove_todo
async
¶
Delete a todo by id.
Source code in octomate/mcp/todos.py
add_subtask
async
¶
Add a subtask under an existing todo.
Source code in octomate/mcp/todos.py
set_dependency
async
¶
Make todo_id depend on depends_on_id (blocks it until that completes).
Source code in octomate/mcp/todos.py
get_available_tasks
async
¶
List tasks with no incomplete dependencies (workable now).
Source code in octomate/mcp/todos.py
todo_instructions ¶
by_ref ¶
is_blocked ¶
has_cycle ¶
Would making todo_ref depend on depends_on_ref create a cycle?
Source code in octomate/mcp/todos.py
available_tasks ¶
render_todos ¶
Source code in octomate/mcp/todos.py
update_events ¶
Source code in octomate/mcp/todos.py
mount_todos ¶
Derive the todo owner from the verified session, never tool arguments.
Source code in octomate/mcp/todos.py
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 | |
octomate.tentacles.inkling.mcp ¶
Inkling's core tools over the authenticated MCP endpoint.
Accomplices
dataclass
¶
The accomplices one stretch of a run called and has not heard back from.
Source code in octomate/tentacles/inkling/mcp.py
watch
async
¶
stream with each accomplice's start before its call and its finish
before its result. One left unanswered finishes with the stretch: cancelled
with it, or failed.
Source code in octomate/tentacles/inkling/mcp.py
observe ¶
Source code in octomate/tentacles/inkling/mcp.py
abandon ¶
Source code in octomate/tentacles/inkling/mcp.py
OctomateTools ¶
Bases: Toolset[None]
Preserve Inkling's approval, deferral and subagent display behavior over MCP.
Source code in octomate/tentacles/inkling/mcp.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | |
get_instructions ¶
wrap_run_event_stream
async
¶
call
async
staticmethod
¶
call(
ctx: RunContext[None],
call_tool: CallToolFunc,
name: str,
arguments: dict[str, JsonValue],
) -> McpToolResult
Source code in octomate/tentacles/inkling/mcp.py
capabilities
classmethod
¶
Keep the existing tool names and deferred discovery groups.
Source code in octomate/tentacles/inkling/mcp.py
octomate.mcp.history ¶
The history tools as MCP: the thread ledger of the person a session speaks for, served beside the spells.
A family of its own on the one server, mounted under the history namespace.
Every return is text and bounded — a page of at most HISTORY_PAGE_LIMIT
messages, each clipped to HISTORY_LINE_CHARS — because these runtimes have none
of the spill bands that catch an oversized return for Inkling.
HISTORY_TOOL_NAMES
module-attribute
¶
HISTORY_TOOL_NAMES: dict[str, str] = {
"search_thread_history": "search",
"read_thread_history_before": "read_before",
"read_thread_history_after": "read_after",
}
mount_history ¶
mount_history(
mcp: FastMCP,
resolve_session: Callable[
[], Awaitable[OctomateSession]
],
thread_manager: ThreadManager,
) -> None
Register the history tools on mcp, every call reading as the person the
session resolve_session returns speaks for — a driven turn's user, or the
registered person a native session's bearer named.
Source code in octomate/mcp/history.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | |
octomate.mcp.oauth ¶
Link the current channel profile and authorize the user's installed MCPs.
Authorization links and device codes go to the user's direct messages.
The model receives status only; device flows finish through confirm.
ProviderId
module-attribute
¶
mount_oauth ¶
mount_oauth(
mcp: FastMCP,
resolve_session: Callable[
[], Awaitable[OctomateSession]
],
manager: McpManager,
*,
resolve_owner: Callable[[], Awaitable[User]],
) -> None
Link profiles and authorize MCPs for the person driving the current turn.
Source code in octomate/mcp/oauth.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | |
octomate.mcp.base ¶
What every Octomate MCP server shares: the bearer verifier for API keys and OAuth tokens, and the docstring projection that keeps a spell's MCP tool and its Inkling tool identical.
KnownBearers ¶
Bases: TokenVerifier
Verify API keys and resource-bound OAuth tokens through the auth manager.
Source code in octomate/mcp/base.py
owner
async
¶
verify_token
async
¶
Source code in octomate/mcp/base.py
capability_contract ¶
The docstring Inkling's toolset compiles, verbatim — a copy here would give two models two different tools and drift silently.
Source code in octomate/mcp/base.py
octomate.mcp.transport ¶
An httpx transport for MCP endpoints that connects only to public addresses and refuses redirects.
PublicMcpNetwork ¶
Bases: AnyIOBackend
Resolve and pin each connection to a public address, including reconnects.
Source code in octomate/mcp/transport.py
connect_tcp
async
¶
connect_tcp(
host: str,
port: int,
timeout: float | None = None,
local_address: str | None = None,
socket_options: Iterable[SOCKET_OPTION] | None = None,
) -> AsyncNetworkStream
Source code in octomate/mcp/transport.py
PublicMcpTransport ¶
Bases: AsyncHTTPTransport
Source code in octomate/mcp/transport.py
handle_async_request
async
¶
Source code in octomate/mcp/transport.py
mcp_http_client ¶
mcp_http_client(
headers: dict[str, str] | None = None,
timeout: Timeout | None = None,
auth: Auth | None = None,
follow_redirects: bool = False,
) -> httpx2.AsyncClient
Source code in octomate/mcp/transport.py
octomate.mcp.routes ¶
The HTTP API for a user's MCP installations: listing, installing, authorizing, enabling and removing them.
mcp_router
module-attribute
¶
available_tentacles
async
¶
available_tentacles(
user: Annotated[User, Depends(current_user)],
manager: Annotated[McpManager, Depends(mcp_manager)],
) -> list[McpTentacleInfo]
Source code in octomate/mcp/routes.py
list_instances
async
¶
install
async
¶
install(
body: McpInstallRequest,
user: Annotated[User, Depends(current_user)],
manager: Annotated[McpManager, Depends(mcp_manager)],
) -> Mcp
Source code in octomate/mcp/routes.py
pending_authorization
async
¶
pending_authorization(
mcp_id: UUID7,
user: Annotated[User, Depends(current_user)],
manager: Annotated[McpManager, Depends(mcp_manager)],
) -> JSONResponse
Source code in octomate/mcp/routes.py
cancel_authorization
async
¶
cancel_authorization(
mcp_id: UUID7,
user: Annotated[User, Depends(current_user)],
manager: Annotated[McpManager, Depends(mcp_manager)],
) -> None
Source code in octomate/mcp/routes.py
connect
async
¶
connect(
mcp_id: UUID7,
user: Annotated[User, Depends(current_user)],
manager: Annotated[McpManager, Depends(mcp_manager)],
flow: OAuthFlowKind | None = None,
) -> JSONResponse
Source code in octomate/mcp/routes.py
confirm
async
¶
confirm(
mcp_id: UUID7,
user: Annotated[User, Depends(current_user)],
manager: Annotated[McpManager, Depends(mcp_manager)],
) -> McpAuthorizationResult
Source code in octomate/mcp/routes.py
enable
async
¶
enable(
mcp_id: UUID7,
user: Annotated[User, Depends(current_user)],
manager: Annotated[McpManager, Depends(mcp_manager)],
) -> Mcp
Source code in octomate/mcp/routes.py
disable
async
¶
disable(
mcp_id: UUID7,
user: Annotated[User, Depends(current_user)],
manager: Annotated[McpManager, Depends(mcp_manager)],
) -> Mcp
Source code in octomate/mcp/routes.py
uninstall
async
¶
uninstall(
mcp_id: UUID7,
user: Annotated[User, Depends(current_user)],
manager: Annotated[McpManager, Depends(mcp_manager)],
) -> None