Back to workWork / MCP Hub

MCP Hub

Agent orchestration, project knowledge and reusable experience

Agent infrastructure and integration architecture
01 / The challenge

The challenge

Operational questions span several systems, while broad database access and an ever-growing tool catalog create permission and context problems for agents.

02 / How I approached it

How I approached it

I combined on-demand tool schemas, scoped execution and retained results with local embeddings, full-text retrieval and reusable methods. The native agent runner shares budgets across delegated work, while scheduled workflows use persistent runs and approval states. Knowledge, observed calls and feedback remain separate so later tasks can reuse experience in its original context.

Agent infrastructure

How MCP Hub connects the work

Open a stage to see what it contributes.

  1. Project contextRetrieve what this task needs.

    Find project facts, decisions and relevant prior experience. Bring the useful fragments into the working context before choosing an action.

  2. Tool discoveryFind a capability. Load its schema.

    Search available tools, select the required capability and retrieve its argument schema. The agent can inspect the operation without loading the entire tool catalog.

  3. Controlled executionRun an action. Inspect its receipt.

    Execute within the allowed scope and obtain approval when required. Inspect the returned result and execution receipt before deciding what to do next.

  4. Reusable experienceSubmit useful experience after completion.

    Once the task is complete, explicitly submit the useful method, outcome and limitations. Feedback can refine this record; later tasks can retrieve relevant experience.

A later task retrieves the useful method

Across every stage
  • Permissions
  • Budgets
  • Audit
What that means in practice

Architecture & decisions

01

Find an operation, then load its schema

Tool discovery returns compact matches with argument hints, risk information and a schema reference checked at invocation. The agent requests the exact schema for a selected operation, then invokes it by name. This keeps the full integration catalog outside the prompt while preserving a direct path from intent to the current tool contract.

02

Local embeddings and hybrid retrieval

Project knowledge combines FTS5 with local SentenceTransformer embeddings. A streamed vector scan retains the best fragment IDs before loading their content, and content hashes avoid embedding unchanged text. Reusable methods have a separate retrieval path: semantic and lexical selection followed by an optional local CrossEncoder that assesses relevance to the task.

03

Project scope and evidence of execution

A cross-system investigation starts with the permitted projects, resources and operations. Database records, logs and communication can then be examined within that scope. Calls requiring approval wait for a human decision. Execution receipts tie observed results to the current run, while the audit trail records actions and supports checking the final conclusion.

04

Methods that retain context and feedback

An agent can save the goal, applicability, conditional call plan and lessons from unsuccessful attempts. Later tasks retrieve a small set of methods to use, adapt or ignore. Reported usefulness and evidenced success remain separate signals. Learning accumulates and refines reusable experience; unchanged reuse keeps the existing method and its embedding.

05

Shared control for delegated work

The built-in agent runner uses a shared controller for token usage, model calls, tool attempts, workers and concurrency across delegated work. Deadlines and cancellation apply to the run tree, while operation claims track overlapping requests. This gives orchestration a common execution budget and explicit ownership as agents divide a task.

06

Automations with persistent runs

Cron, interval and event triggers start a tool operation or a multi-step agent workflow. Run state is stored in SQLite; workers claim work with an owner and lease, and expired leases can be recovered. Approval waits are explicit states. Recurring checks of project activity and communication use the same governed integration layer.

07

Keep results available and context compact

Results are retained encrypted and reopened through handles within their owner, expiry and policy boundaries. Knowledge fragments can be read selectively; memory packs cap items and characters. Method previews link to larger plans, while small plans keep their conditions inline. The agent can revisit details without copying every raw response into the conversation.

03 / The outcome

The outcome

I use MCP Hub to investigate errors, review communication and trace project activity across databases, logs and work tools. Relevant schemas, stored results and prior methods can be opened as needed, keeping repeated investigations focused.

04 / Tools & technologies

Tools & technologies

Continue exploring

Amazon Data / Trends

Contact

Complex challenge? Let’s make it work.

Architecture, technical leadership, or a product that needs a solid foundation.

Start a conversation

A role, a product, or a technical challenge. Share a little context.

To use the form, enable JavaScript. You can also write to me directly on Telegram.

Write on Telegram