bank-api

作者 erwinkramer已验证

The Bank API is a design reference project suitable to bootstrap development for a compliant and modern API.

841
Stars
78
Forks
C#
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/erwinkramer/bank-api

快速入门

使用 bank-api 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

Bank API 🏦

CC BY-NC-SA 4.0 GitHub commit activity

Scalar landing page

Aspire

MCP via Claude

The Bank API is a design reference project suitable to bootstrap development for a compliant and modern API.

See the 🔗 APIs.json (v0.21) compliant documentation.

Explore the live 🌐 API with sidecars and 🌐 MCP server (both hosted on Azure Container Apps).

Compliance

API

OWASP API Security Top 10 - v2023 via Spectral OWASP API Security ruleset

OpenAPI Specification v3.2.0 via Spectral "oas" ruleset

NLGov (Dutch Public Sector) REST API Design Rules 2.2.1 via API Design Rules ruleset

✅ Additional naming conventions, structure, and clarity via Bank API project ruleset

California Consumer Privacy Act (CCPA) and General Data Protection Regulation (GDPR) via ASP.Net Core Compliance

RFC 7515 - JSON Web Signature (JWS) for response signing, via X-JWS-Signature header

RFC 7517 - JSON Web Key Set (JWKs) for validating JWS responses, via /.well-known/jwks.json endpoint

EDA (Event-driven architecture) with outbox-pattern

OpenAPI Specification v3.2.0 - webhook field

CloudEvents - Version 1.0.2 for defining the format of event data

CloudEvents - Version 1.0.2 - HTTP Protocol Binding for HTTP transport

CloudEvents - Version 1.0.2 - HTTP 1.1 Web Hooks for Event Delivery for delivering events via the webhook pattern

MCP Server

Model Context Protocol, version 2025-11-25

Technology stack

Design

Technically, the design is layered like the following flowchart.

flowchart TB

apis[BankApi.Service.Beta / BankApi.Service.Stable]
aspire[BankApi.Orchestration]
mcp[BankApi.Mcp]
test[BankApi.Tests]

infra_gen[Infra.Generated]
specs_gen[Specs.Generated]

subgraph core[BankApi.Core]
Defaults
DownstreamClients
Implementation
end

Defaults --> Implementation

DownstreamClients --> Defaults
DownstreamClients --> Implementation

Defaults --> apis
Implementation --> apis
Implementation --> test

apis --> aspire
apis --> specs_gen

aspire--> infra_gen
specs_gen --> mcp

Prerequisites

If not using the Dev Container, install:

Quick start

  • Use a pwsh shell (for a click-a-long experience).

  • (Optionally) regenerate the GitHub downstream API client by going to the Kiota workspace and clicking Re-generate under clients.

    kiota-workspace-regenerate-client

  • (Optionally) regenerate the ASP.NET Core HTTPS development certificate:

    dotnet dev-certs https --clean && dotnet dev-certs https -ep ./.certs/AspNetDev.pfx -p '' --trust
    
  • (Optionally) regenerate the Helm chart artifacts via the Aspire CLI:

    rm -r Infra.Generated/* && aspire --version && aspire publish -o Infra.Generated
    
  • Generate a new JWT-token for secured endpoints:

    dotnet user-jwts create --scope "bank_api" --role "banker" --valid-for 3650d --project BankApi.Service.Stable
    
  • Run dotnet build to output the OpenAPI definition. Make sure the local environment for ASP.NET Core points to development:

    setx ASPNETCORE_ENVIRONMENT "Development"
    
  • Validate the OpenAPI definition by going to the openapi_v1_spec.json definition and check for problems via the Spectral extension.

Container images

A complete orchestration of all containers with Kube Resource Orchestrator (kro) is available at Infra.Kro. To setup all the containers step-by-step with podman, follow the below steps:

Rename the env sample file to .env and replace the values.

Create a pod:

podman pod create --name bank-api-pod -p 127.0.0.1:8080:8080 -p 127.0.0.1:5201:10000 -p 127.0.0.1:6070:6070 -p 127.0.0.1:3500:3500

Start the Dapr sidecar to expose secret stores, explore via the metadata endpoint or check a secret:

podman build -t bank-api-daprd:v1 ./Sidecar.Dapr
podman run --pod bank-api-pod --env-file .env bank-api-daprd:v1

Start the OpenTelemetry Collector to process and export telemetry data:

podman build -t bank-api-otelcol:v1 ./Sidecar.OpenTelemetry
podman run --pod bank-api-pod --env-file .env bank-api-otelcol:v1

Start the S3Proxy sidecar to expose Azure Blob Storage as an S3-compatible endpoint:

podman build -t bank-api-s3proxy:v1 ./Sidecar.S3Proxy
podman run --pod bank-api-pod --env-file .env bank-api-s3proxy:v1

Start the Stable version of the API as an Alpine with Composite ready-to-run image with ready-to-run format:

podman build -t bank-api:v1 .
podman run --pod bank-api-pod --env-file .env bank-api:v1

To facade the API as well, start the Proxy:

podman build -t bank-api-proxy:v1 ./Sidecar.Proxy
podman run --pod bank-api-pod bank-api-proxy:v1

Then navigate to the proxied OpenAPI Spec or Scalar UI, or use :8080 to directly call the API.

Run podman pod rm -f bank-api-pod to teardown.

Run in Aspire minimal mode

This mode just runs the ASP.NET Core API.

  1. Make sure a container runtime is started.

  2. Start the standalone Aspire Dashboard for developer visualization:

    podman run --rm -it `
      -p 18888:18888 `
      -p 4317:18889 `
      --name aspire-dashboard `
      mcr.microsoft.com/dotnet/aspire-dashboard:latest
    

    Copy the url shown in the resulting output when running the container (e.g. http://localhost:18888/login?t=123456780abcdef123456780) and open that in a browser, or paste the key part seen after /login?t= when the login dialog is shown. The token will change each time the container is started.

  3. Run the launch config API - Stable release channel.

Run in Aspire mode

This mode starts the Stable and Beta versions of the API with required sidecars, including an MCP server for the Stable version, in context of Aspire.

  1. Make sure a container runtime is started and Aspire is set to use that runtime (if using anything other than docker):

    podman machine start
    setx ASPIRE_CONTAINER_RUNTIME "podman"
    
  2. Run the launch config Aspire Orchestration.

Run the MCP server

The MCP server is designed to run on HTTP Stream Transport, separately from the API, based on the OpenAPI specification generated by the API.

Currently, it registers tools for operations via API Key and OAuth Authorization Code authentication methods.

Make sure to run BankApi.Service.Stable, and BankApi.Mcp at the same time. The easiest way is to just Run in Aspire mode.

Claude

Configure your claude_desktop_config.json with the following mcpServers entry:

{
  "mcpServers": {
    "bankApi": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://app.bravestone-75bd2261.germanywestcentral.azurecontainerapps.io/mcp",
        "--allow-http",
        "--debug"
      ]
    }
  }
}

Replace the URL with http://localhost:5200/mcp when using the local MCP server.

GitHub Copilot

To host the MCP server, make sure to Authorize Visual Studio Code in the app registration.

Considerations

General

  1. To receive CloudEvents that are emitted via this API, see cloudevents/sdk-csharp - CloudEventBinding for an ASP.NET Core sample.

  2. The compliance NullRedactor doesn't seem to work, the redactor is already defined at Builder.Compliance.cs but not used because of the issue.

  3. API versioning is handled via a simple approach with PathBase, which is also more convenient for Azure API Management usage. Using the native way might look like this.

  4. Extending Spectral rulesets from an NPM package can be problematic.

  5. Generic exception handling is minimally implemented via ErrorHandling.cs.

  6. API owners usually have customers outside of their own company - or outside of their own domain within a company - which inherently means adoption time will be slower for API contract changes, this is why there is a Stable and Beta version of the API in this project, inspired by the Microsoft Graph API Current/Beta versioning design. New or modified contract-breaking (beta) operations to API consumers may be served via the Beta version without distracting users on the Stable version.

    Do not confuse this versioning scheme as a replacement for DTAP; it is merely complementary to it. Many API changes will affect both the Stable and Beta endpoints (such as changes to the underlying shared database). That's why they both share a common layer in the form of BankApi.Core.

    Nonetheless, versioning is very opinionated and one should always see what the best business and technical fit is. This might change over time and from project to project.

  7. Dev Containers with the docker-outside-of-docker feature instead of docker-in-docker do not work, for now we're using docker-in-docker.

Please see the Reddit r/dotnet post 1 and post 2 about this project for more considerations and information.

Troubleshooting

  • If debugging isn't working properly, please clear the Extension Host Cache at %AppData%\Code\CachedData (on Windows) and restart VSCode.

  • If getting the error unable to get local issuer certificate with Spectral, make sure to add the CA of the proxy to NODE_EXTRA_CA_CERTS and restart VSCode, for example:

    setx NODE_EXTRA_CA_CERTS "C:\ZscalerRootCA.crt"
    
  • If getting the error tls: failed to verify certificate: x509: certificate signed by unknown authority when building a container image, make sure to add the CA of the proxy to podman, for example:

    Get-Content .\.certs\ZscalerRootCA.crt -Raw | podman machine ssh "sudo mkdir -p /etc/pki/ca-trust/source/anchors && cat | sudo tee /etc/pki/ca-trust/source/anchors/ZscalerRootCA.crt > /dev/null && sudo update-ca-trust"
    
  • Extending Rulesets with local filepath not refreshing when working on Spectral rulesets in VSCode. Force an update in Specs.Ruleset/main.yml when changing a file that is used as an extend.

License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

CC BY-NC-SA 4.0

常见问题

What is bank-api?

bank-api is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by erwinkramer. The Bank API is a design reference project suitable to bootstrap development for a compliant and modern API. It has 841 GitHub stars.

Is bank-api safe to use?

Yes. bank-api passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install bank-api?

Clone the repository with "git clone https://github.com/erwinkramer/bank-api" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is bank-api written in?

bank-api is primarily written in C#. It is open-source under erwinkramer on GitHub, so you can review or fork the full source.

Are there alternatives to bank-api?

Yes. SkillsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh bank-api against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

Scrapling

by D4Vinci

🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!

75,9137,581Python
MCP 服务器
查看详情

TrendRadar

by sansan0

⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。

61,65224,883Python
MCP 服务器
查看详情

context7

by upstash

Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors

61,0602,938TypeScript
MCP 服务器
查看详情

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

39,9393,219C
MCP 服务器
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情