Repository navigation
Description
Ticket Contents
Description
The Model Context Protocol (MCP) is rapidly becoming the standard integration layer for AI agents interacting with external services. Finternet's UNITS system — with its delegation-scoped account model, programmable token operations, and credential-gated transfers — is a natural fit for agentic execution: recurring payments, conditional transfers, cross-border routing, and portfolio operations all benefit from agent-driven automation without requiring real-time user approval per operation.
An initial MCP server for the UNITS API exists but has known gaps in tool coverage, error handling, and agentic workflow support. This project has two workstreams: (1) audit and remediate existing MCP server gaps, and (2) design and implement delegation-scoped agentic workflow tools that expose UNITS' programmable delegation model to AI agents in a safe, policy-bound way.
Goals & Mid-Point Milestone
Goals
- Workstream 1 — Conduct a systematic audit of the existing UNITS MCP server against the full UNITS App API surface. For each gap, produce one of:
- A new MCP tool implementation
- A documented limitation with rationale (e.g., operations that should not be exposed via MCP for security reasons)
- A fix to an existing tool (error handling, schema correctness, response formatting)
- Workstream 2 — Design and implement MCP tools that expose UNITS' delegation model to agents safely. All agent-initiated operations must present a valid delegation credential chain; UNITS enforces scope at execution time. Tools to implement:
- get_account_summary — returns unified token holdings (native + proxy), active delegations, and credential store summary for the delegating account; respects delegation scope
- initiate_transfer — initiates a token transfer within the agent's delegated scope (token class, amount limit, frequency limit enforced); returns pre-flight policy evaluation result before committing
- check_transfer_eligibility — dry-run transfer policy evaluation without committing; returns which dependency pointers passed/failed and which credentials were checked
- get_delegation_scope — returns the agent's current delegation credential with scope constraints; allows an agent to self-check before attempting an out-of-scope operation
- subscribe_lifecycle_events — subscribes the agent to UNITS lifecycle events (transfer committed, credential expired, dependency pointer state changed) relevant to the delegating account, within delegated scope
- present_credential_vp — constructs and submits a Verifiable Presentation from the account's credential store to satisfy a transfer policy credential requirement; agent does not see raw credential values
- Agentic safety constraints:
- No MCP tool may expose a raw private key or credential claim value to the agent
- initiate_transfer always returns a pre-flight eligibility check result before committing; agents cannot skip the pre-flight
- All tool calls are logged with the agent's Finternet account address
- Scope violations return a structured SCOPE_EXCEEDED error, not a generic failure
- Goals Achieved By Mid-point Milestone: get_account_summary, check_transfer_eligibility, and get_delegation_scope tools implemented and tested.
Setup/Installation
Builds on the existing UNITS MCP server codebase. MCP SDK for tool definitions and server scaffolding. Local development against a Docker Compose UNITS dev environment. Integration tests using the MCP Inspector tool and a test AI agent harness (e.g., Claude via the Anthropic API with tool use).
Expected Outcome
No response
Acceptance Criteria
No response
Implementation Details
- MCP SDK: Any conformant MCP SDK may be used (reference implementations exist in TypeScript, Python, and Rust — contributor to select based on UNITS codebase language and justify the choice); all tools defined with full JSON Schema input/output specs regardless of implementation language
- Auth: All MCP tool calls carry a delegation credential chain in the request context; UNITS validates the chain before executing any operation
- Error schema: All UNITS MCP tool errors return {code: string, message: string, detail: object} where code is one of a defined enum, where code is appropriately defined enum
- Testing: Three levels required — (1) unit tests per tool against a mock UNITS server, (2) integration tests covering full request-response cycles against a dev UNITS instance, (3) end-to-end agentic workflow tests using an AI agent client exercising ≥2 complete delegation-scoped workflows. Contributor to propose specific tooling in their implementation plan.
Mockups/Wireframes
No response
Product Name
UNITS MCP Server — Agentic Tooling and Gap Remediation
Organisation Name
FinternetLabs
Domain
Financial Inclusion
Tech Skills Needed
Other
Mentor(s)
Will be assigned from the Finternet engineering team
Category
Backend, AI
Activity
Rahul-2k4 commentedon Mar 18, 2026
Hi @vineet-finternet I’m interested in working on this for C4GT 2026 and wanted to understand the contribution path a bit better before I start.
A few quick questions:
contributors can identify the missing tool surface systematically?
I’ve started reviewing the public Finternet repos and issue details, and I’d like to align
early with the right repo and expected workflow.
Thanks.
Varadraj75 commentedon Mar 20, 2026
Hi @vineet-finternet i am interested in picking this up for C4GT 2026.
The plan is to start with a full audit of the existing MCP server against the UNITS API surface, then move into Workstream 2-get_account_summary, check_transfer_eligibility, and get_delegation_scope-to hit the midpoint milestone. I'll wire up unit → integration → e2e test coverage as I go, not after.
Before I start: which repo holds the current MCP server? Has the implementation language been decided, or is that for the contributor to justify?
Rahul-2k4 commentedon Mar 20, 2026
Hey @Varadraj75 , can u please work on some other issue , i have already been doing some work on it , so just in case not waste each other efforts . Thanks
praveenjha527 commentedon Mar 21, 2026
@Rahul-2k4 Thanks for your interest in contributing to this project for C4GT 2026. Here are the answers
to your questions:
Rahul-2k4 commentedon Mar 21, 2026
Hi @praveenjha527, thanks for the clarification.
I’ve started working through Issue #749 from the public docs and issue details, and I’m preparing a docs-based audit/ implementation plan so I can move quickly on the right surface.
Since the current MCP server repo is not public yet, could you please share the best next contribution entry point when available, whether that is:
I’d like to contribute against the intended implementation surface rather than make assumptions and drift from the design.
thank you
mn-ram commentedon Mar 21, 2026
Hi @vineet-finternet and @praveenjha527,
I've gone through the issue description carefully and explored the Finternet docs at https://docs.finternetlab.io/. I had a few specific questions before I begin structuring my implementation plan:
For Workstream 1 (audit): once the OpenAPI spec is published, should the audit output be a structured document (e.g., a markdown table mapping each endpoint to: covered / not covered / intentionally excluded), or is there a preferred format from the Finternet team?
For the
initiate_transfertool: the issue mentions a pre-flight eligibility check before committing. Should this pre-flight internally callcheck_transfer_eligibilityas a reusable function, or should both tools independently call the UNITS policy evaluation endpoint?For language choice: is the existing (private) MCP server in TypeScript? I want to align with the existing codebase language rather than introduce a different one.
I'll begin with the docs-based audit of the UNITS API surface while the repo is being made ready.
ChayanDass commentedon Mar 23, 2026
@vineet-finternet, @praveenjha527,
I am interested in this project as it aligns with my current interests.
I look forward to contributing.
dreamweaver19 commentedon Mar 31, 2026
Hi @vineet-finternet,
I am very interested in drafting a proposal for this DMP 2026 project! The intersection of agentic workflows and the UNITS delegation model looks like a fantastic challenge.
I would love to get a head start on Workstream 1 (conducting the systematic audit). Could you please share the link to the repository containing the initial UNITS MCP server mentioned in the description?
Thank you!
shrutisachan08 commentedon Apr 1, 2026
Hi @vineet-finternet ,
The given project aligns well with my domain . Hence I would like start with workstream 1 . Could please the link to repository or guide me where to begin my contribution.
kashyapanish6373-cyber commentedon Apr 1, 2026
Hi @kashyapanish6373
I am excited to apply for the UNITS MCP Server — Agentic Tooling and Gap Remediation project by FinternetLabs. This project sits at the intersection of backend systems, AI agents, and financial infrastructure — an area I am deeply interested in.
The opportunity to design secure, delegation-aware agentic workflows using the Model Context Protocol (MCP) aligns closely with my interests in building reliable, policy-driven systems. I am particularly motivated by the challenge of enabling AI agents to safely execute financial operations without compromising on security or user control.
basant-gautam commentedon Apr 2, 2026
Hi @vineet-finternet @praveenjha527,I am very interested in contributing to the UNITS MCP Server project for DMP 2026. Since the documentation link (https://docs.finternetlab.io/) is currently restricted (403 error), I have prepared an initial implementation strategy based on the issue description:Tech Stack & Language: I propose using TypeScript with the MCP SDK, as it provides excellent support for JSON Schema definitions which are required for all tool input/output specs.Workstream 1 (Audit): Once the OpenAPI spec is public, I plan to create a mapping table to identify gaps in the current MCP server, focusing on error handling and schema correctness.Workstream 2 (Agentic Tools): My focus for the mid-point milestone will be on:check_transfer_eligibility: Implementing this as a mandatory "dry-run" to return policy evaluation results (dependency pointers and credentials checked) before any actual commitment.get_delegation_scope: Ensuring agents can self-check their constraints to avoid SCOPE_EXCEEDED errors.Security First: I will ensure that no MCP tool exposes raw private keys or credential values, strictly following the agentic safety constraints mentioned.Testing Strategy: I plan to use Docker Compose for local UNITS environment testing and a test AI agent harness (like Claude) for end-to-end workflow validation.Looking forward to the public repository and OpenAPI spec to start the audit.Thanks!
aniket866 commentedon Apr 24, 2026
hi @vineet-finternet
I would like to work on this
Idea
UNITS MCP Server — Agentic Tooling & Gap Remediation
Approach (MVP Planning)
1. Problem Understanding
The existing MCP server for UNITS API is incomplete and lacks:
Full API coverage
Robust error handling
Agent-safe execution workflows
Additionally, there is no structured support for delegation-based agent workflows.
2. High-Level Strategy
Split execution into two parallel workstreams:
Workstream 1: MCP Server Audit & Fixes
Map all UNITS API endpoints
Compare with existing MCP tools
Identify gaps:
Missing tools
Broken implementations
Security-sensitive exclusions
Fix or document each gap
Workstream 2: Agentic Workflow Tools
Design safe delegation-based tools
Enforce policy-bound execution
Implement core agent-facing tools
3. Architecture Design
Components
MCP Server (Tool Layer)
UNITS API Backend
Delegation Credential System
AI Agent Client
Flow
Agent sends MCP tool request
Delegation credentials validated
Policy scope checked
Pre-flight validation executed
Operation committed (if valid)
Structured response returned
4. Core Tools (Midpoint MVP)
4.1 get_account_summary
Returns:
Token holdings
Delegations
Credential metadata
Scope-aware response
4.2 check_transfer_eligibility
Dry-run transfer
Outputs:
Policy checks
Passed/failed constraints
Credential validation status
4.3 get_delegation_scope
Returns:
Allowed token classes
Limits (amount/frequency)
Active credential scope
5. Safety Design (Critical)
No raw credentials exposed
Mandatory pre-flight checks
Structured error handling:
{code, message, detail}
Scope enforcement:
Return SCOPE_EXCEEDED
Full audit logging of tool calls
6. Tech Stack
Language: TypeScript / Python (based on UNITS backend)
MCP SDK: Official SDK (TS/Python/Rust)
Backend: UNITS API
Testing:
Unit: Mock server
Integration: Docker UNITS
E2E: AI agent (Claude / similar)
7. Testing Strategy
Level 1: Unit Testing
Mock UNITS API
Validate each tool independently
Level 2: Integration Testing
Full request-response cycles
Docker-based environment
Level 3: Agent Workflow Testing
Multi-step flows:
Eligibility → Transfer → Event tracking
8. Milestone Deliverables
Midpoint
get_account_summary
check_transfer_eligibility
get_delegation_scope
Unit + Integration tests
Final
Full MCP coverage
All agent tools implemented
Event subscription system
Credential presentation flow
9. Expected Outcome
Secure MCP server with full API coverage
Delegation-safe AI agent execution
Production-ready agentic financial workflows
10. Key Risks & Mitigation
Risk | Mitigation -- | -- Security leaks | Strict credential abstraction Scope bypass | Enforced validation layer API mismatch | Automated audit mapping Agent misuse | Policy + pre-flight enforcement11. Summary
This MVP focuses on building a secure, policy-driven MCP layer that enables AI agents to interact with UNITS safely using delegation-based execution, starting with audit + 3 core tools and expanding to full workflow automation.
vyagh commentedon Apr 25, 2026
Hii @praveenjha527 @vineet-finternet
I have been reviewing the documentation and have some understanding of the project goals and plan now.
I was seeking some clarification on the next steps. I noticed that pre contributions are welcome; should I contribute to the finternet repositories?
Additionally, I checked the documentation for the UNITS GitHub repo, but the link is unreachable.
Could you please provide guidance on the best way to proceed and contribute to the project?
codewarnab commentedon Apr 26, 2026
Hi, I'm Arnab Mondal and I'd love to contribute to this project.
I went through the Finternet overview and architecture docs — the delegation-scoped account model and how it maps to agentic execution is a really interesting problem, and something I'd genuinely enjoy working on.
Some relevant things I've built:
I've also contributed to a few open source projects in gen ai space — vercel/ai, supermemoryai/supermemory, and langfuse/langfuse.
More of my work is at codewarnab.in if you want to take a look. Would love to be part of this.
Jayant-kernel commentedon Apr 29, 2026
Hi @vineet-finternet
I've been going through the Finternet docs and the specs repo. A few specific questions on
Workstream 1: Should the audit output be a structured markdown table mapping each UNITS API endpoint to covered/not-covered/intentionally-excluded?
And for the MCP SDK choice — given UNITS uses TypeScript, should contributors align with TS or is Rust preferred for performance-critical tools like initiate_transfer?
KalpanaBhaskar commentedon May 2, 2026
Hi @vineet-finternet and @praveenjha527,
I’ve been digging into the UNITS delegation model described in the issue. While the base tools cover the "mechanics" of execution, I believe a critical success factor for agentic financial workflows is handling Policy Friction ,specifically when an agent holds multiple delegation credentials with overlapping or conflicting constraints.
To ensure the MCP server is production-ready, I’d like to propose two unique additions to my implementation plan:
Currently, if a transfer fails with SCOPE_EXCEEDED, the agent hits a wall. I propose a tool that performs a diff between the requested action and the active delegation chain. Instead of just "No," the agent receives a reason (e.g., “Daily limit exceeded by $50” or “Invalid token class for this credential”), allowing it to autonomously adjust its strategy without human intervention.
I propose extending the initiate_transfer tool to accept an optional intent_manifest. This maps the agent’s internal reasoning (the "why") to the pre-flight result. When an account owner reviews tool logs, they won't just see a transaction—they'll see the logic the agent used to justify the move within its delegated scope.
Technical Stack & Readiness:
I’ll be using TypeScript with the official MCP SDK to leverage strict JSON Schema validation for the credential chains.
I am ready to begin the Workstream 1 audit as soon as the OpenAPI spec and private repo access are provided.
Looking forward to contributing to the Finternet ecosystem!
Geetanjali015 commentedon May 7, 2026
Hi @vineet-finternet @praveenjha527 ,
I’ve been going through the project description and reading more about MCP-based agent tooling to better understand the existing architecture and workflow expectations.
What I find particularly interesting about this project is the focus on safe, policy-bound agent execution rather than only exposing generic AI tools. The emphasis on delegation scope validation, structured error handling, and pre-flight policy evaluation makes this feel like a very practical systems engineering problem with strong real-world constraints.
I’m especially interested in contributing around:
My background includes working on backend AI workflows, LLM/RAG systems, APIs, and full-stack applications, so this project strongly aligns with my interests and experience.
I’m currently continuing to explore MCP concepts and the existing UNITS workflow to better understand the implementation patterns and contribution flow. Looking forward to contributing and learning more from the team.
srishtiagarwall commentedon May 7, 2026
Hi @vineet-finternet @praveenjha527, I've been doing a docs-based audit using the public finternet-io/specs repo. A few specific observations before I structure my Workstream 1 plan:
There are no events-interfaces.yaml or equivalent in the public spec. subscribe_lifecycle_events (Workstream 2) appears to have no corresponding public API surface yet. Is this intentional, or will a webhook/SSE spec be published separately?
The recent commit to token-interfaces.yaml ("remove Proof API endpoints from public spec") likely affects check_transfer_eligibility implementation. Are the policy evaluation endpoints available in the private MCP server codebase, or should the pre-flight check compose from other endpoints?
token-class-config-interfaces.yaml was added last week; should initiate_transfer's token class scope validation reference this spec?
Happy to begin the Workstream 1 audit table against these 8 YAML files once I have access to the private MCP server repo.
ananyaa0518 commentedon May 11, 2026
Hi @vineet-finternet and @praveenjha527,
While studying the workflow design, I had a few implementation-focused questions:
For
check_transfer_eligibility, should the response schema also include machine-actionable recovery hints for agents (example: retry window, exceeded constraint type, suggested safe amount), or should recovery reasoning remain entirely client-side?For delegation validation, is scope enforcement expected only at execution time inside UNITS, or should the MCP layer maintain a lightweight pre-validation cache to reduce unnecessary policy-evaluation round trips for agents?
For
subscribe_lifecycle_events, is the intended direction closer to webhook delivery, SSE streams, or MCP-native event propagation?Are there plans for standardized observability/tracing around multi-step agent workflows (tool call chain, policy evaluation trace, delegation resolution path), or should contributors propose that structure during implementation?
I’m currently experimenting with a small local prototype around delegation-aware agent recovery flows and wanted to align early with the intended architecture direction.
aayushprsingh commentedon May 12, 2026
Hi @vineet-finternet @praveenjha527,
I’m Aayush. I’m interested in this project because it sits at the intersection of backend APIs, AI agents, tool safety, and real-world financial constraints.
Since the current MCP server repo is not public yet, I built a small public proof-of-direction repo based on the issue description:
https://github.com/aayushprsingh/finternet-mcp-delegation-demo
What it demonstrates:
get_delegation_scopecheck_transfer_eligibilityget_account_summarySCOPE_EXCEEDEDerrorscommitPerformed: falseVerification:
I also added a small docs-based audit note here:
https://github.com/aayushprsingh/finternet-mcp-delegation-demo/blob/master/docs/audit-notes.md
Architecture question: once contributors get access to the actual UNITS API/server surface, should the MCP layer maintain a lightweight delegation pre-validation cache to reduce repeated policy calls, or should every
check_transfer_eligibilitycall go directly to UNITS for maximum auditability and freshness?ananyaa0518 commentedon May 14, 2026
Hi @vineet-finternet and @praveenjha527,
I’ve submitted my proposal for Issue #749.
Alongside the proposal, I built a small delegation-aware MCP prototype focused on:
get_delegation_scopecheck_transfer_eligibilityDemo / architecture repo:
delegation-aware-mcp
The current prototype explores policy-bound autonomous execution and recovery-aware agent behavior using a mock UNITS environment while aligning with the delegation safety constraints described in the issue.
Looking forward to contributing further.
Nischal1425 commentedon May 16, 2026
Hi @vineet-finternet and @praveenjha527,
I've been working directly with MCP server internals recently — I have a contribution to sktime-mcp (parameter validation for tool dispatch) and understand the gap between MCP's tool schema definitions and what real API surfaces actually expose. That's exactly Workstream 1.
A few specific observations from reading the public finternet-io/specs repo:
For language: I'd propose Python with the MCP SDK if the private server is Python-based, TypeScript otherwise, happy to align with the existing codebase rather than introduce a new stack.
My proposal will cover the full audit table (endpoint → covered/not-covered/intentionally-excluded) and the delegation-scoped tool implementations. I'll be active on this thread.
Aamodx6 commentedon Jun 12, 2026
UNITS MCP Server — Agentic Tooling and Gap Remediation: Implementation Proposal
1. Project Understanding & Approach
This project splits into two parallel-but-sequenced workstreams: (1) hardening the existing UNITS MCP server through systematic audit and remediation, and (2) building five new delegation-scoped agentic tools on top of that hardened foundation. The mid-point milestone requires three of the five new tools —
get_account_summary,check_transfer_eligibility, andget_delegation_scope— to be fully implemented and tested. This sequencing is deliberate: these are the read-only / dry-run tools with no state-mutation risk, so they let us validate the credential-chain and scope-enforcement plumbing before buildinginitiate_transferandpresent_credential_vp, which actually move tokens or present credentials.2. Tech Stack Decision
Proposed: TypeScript, using the official MCP SDK (
@modelcontextprotocol/sdk)Rationale:
subscribe_lifecycle_events, which needs to maintain long-lived subscriptions and push events as they occur.If the audit shows the existing server is actually in Python or Rust, I will restate this section with equivalent reasoning (Pydantic for Python, serde + schemars for Rust); the overall architecture in this proposal does not depend on the specific language.
3. Workstream 1 — Audit & Remediation Plan
3.1 Audit Methodology
3.2 Gap Classification & Disposition
Every identified gap will be resolved into exactly one of the three outputs required by the ticket:
3.3 Deliverable for Workstream 1
A written audit report (markdown, committed to the repository) containing the full gap matrix, the disposition decided for each gap, and a prioritized remediation backlog — along with the actual fixes/new tools that fall within this contribution window's scope.
4. Workstream 2 — Delegation-Scoped Agentic Tools
4.1 Shared Architecture Components
Before building any individual tool, four shared components need to exist, since all five tools depend on them.
a) Delegation Credential Chain Validator
A middleware layer, run on every tool call before any business logic executes, that:
b) Structured Error Schema
A single error shape used by every tool: a
codefield drawn from a defined enum (includingSCOPE_EXCEEDED,CREDENTIAL_EXPIRED,CREDENTIAL_INVALID,TRANSFER_POLICY_FAILED,DEPENDENCY_POINTER_UNRESOLVED,ACCOUNT_NOT_FOUND,RATE_LIMIT_EXCEEDED, andINTERNAL_ERROR), a human-readablemessage, and adetailobject for context. Every tool's error handling maps internal exceptions onto this schema — bringing existing tools in line with this schema is also part of Workstream 1's remediation if they don't follow it already.c) Audit Logging Middleware
Every tool invocation writes a log entry containing: timestamp, the agent's Finternet account address (resolved from the delegation scope), the tool name, the input parameters (with any credential material redacted), and the result status. This directly satisfies the requirement that all tool calls be logged with the agent's account address.
d) Credential Redaction Layer
A response-serialization wrapper applied to every outgoing response that strips or replaces any field matching known credential or private-key shapes with a non-sensitive reference. This is the enforcement point for the constraint that no MCP tool may expose a raw private key or credential claim value to the agent.
4.2 Tool-by-Tool Design
Tool 1:
get_account_summary(Mid-point deliverable)Tool 2:
check_transfer_eligibility(Mid-point deliverable)SCOPE_EXCEEDEDerror without calling UNITS at all — a cheap early rejection.Tool 3:
get_delegation_scope(Mid-point deliverable)Tool 4:
initiate_transfer(post-mid-point)check_transfer_eligibility's output), acommittedboolean, a transfer ID if committed, and a structured error if not.check_transfer_eligibilitybefore any commit path runs. The commit function takes this result as an internal argument rather than something the agent can supply, which is what guarantees agents cannot skip the pre-flight check.committed: falseand the pre-flight result — no transfer is sent to UNITS.Tool 5:
present_credential_vp(post-mid-point)5. Testing Strategy
Three levels of testing, as required by the ticket:
get_delegation_scope, thenget_account_summary, thencheck_transfer_eligibilityfor a hypothetical transfer, and reports a summary to the user — exercises all three mid-point tools together.present_credential_vp, then callsinitiate_transfer, and confirms the result — exercises the full post-mid-point flow including the credential presentation step.6. Proposed Timeline
get_delegation_scopeandget_account_summarycheck_transfer_eligibility; integration tests for all three mid-point toolsinitiate_transferpresent_credential_vp7. Open Questions for Mentor(@vineet-finternet )
check_transfer_eligibilityneeds to construct this from the policy and dependency pointer graph directly.get_account_summarywhen an agent's delegation is scoped to a subset of token classes.initiate_transfer.