ABAP MCP Server SDK (mcp2)
A stateless ABAP SDK for building MCP servers that support tools, resources, prompts, and tasks. It targets the 2026-07-28 protocol while maintaining backward compatibility with legacy versions.
README
ABAP Model Context Protocol Server SDK v2 (mcp2)
A stateless, rewrite of the ABAP Model Context Protocol
server SDK, targeting the upcoming 2026-07-28 protocol generation while staying downward
compatible with the legacy era (2025-03-26 … 2025-11-25).
MCP
2026-07-28draft synchronous request/response profile. SSE, subscriptions, streaming responses, sessions, and server-pushed notifications are unsupported. Legacy revisions are served statelessly with the latest legacy data shapes.
This is a server implementation only. It is stateless — no protocol sessions, no SSE — so notification- and subscription-based features are out of scope by design (see docs/ProtocolSupport.md).
Status:
0.1.0— first beta (changelog). Pre-release: the ABAP API surface is not frozen and breaking changes may land in any release before1.0.0. Active v2 implementation for the stateless2026-07-28protocol generation. Protocol core, data classes, HTTP runtime, config/factory, DDIC tables, demo servers and the request/response Tasks extension are implemented and covered by abaplint plus the external Jest integration suite in the siblingmcp2_testsrepository. The original session-based SDK lives separately and is unaffected; this package uses the distinctmcp2object prefix so both can coexist in one ABAP system.
Main Differences from V1 MCP SDK
- Currently no 7.x downport - planned to be added with release, like within 1 month of spec release
- No sessions, etc.
- No default auth object and check delivered --> you must implement your own auth checks if required, see Configuration and security
- No table maintenance due to frequent install issues
Intentionally not supported
- ABAP Cloud - with SAP pushing towards using their MCP strategy and features in BTP I see no reason to put in the required effort
Documentation
User guide — building servers with the SDK:
- Getting started — install, ICF setup, first server
- Learning path — staged exercises from first tool to MRTR and tasks
- Demo servers — feature map and legacy/modern walkthrough
- Server identity and request context — metadata, capabilities, tracing, caching
- Tools — arguments, content blocks, structured output, validation
- Resources — resources, reads, templates
- Prompts — prompt templates and arguments
- Completions — argument autocompletion
- Schemas — schema builders (general / DDIC / elicitation) + validator
- Input required (MRTR) — elicitation, sampling, URL mode
- Tasks — long-running background work
- Configuration and security — tables, CORS, auth, error mapping
- Troubleshooting — symptom-first index of common failures
- Migrating from v1 — what changes, what is dropped, suggested order
Reference — design and internals:
- Class reference — every public class, what it is for, where it is explained
- Architecture — design, packages, eras, request flow
- Protocol support — versions, methods, what is excluded and why
- Conversion — per-field data-class conversion conventions
- Platform abstraction — HTTP/DDIC wrapping and the ABAP Cloud roadmap
Design at a glance
- Stateless only — every request is self-contained; no
Mcp-Session-Id, no session tables. - One server contract, two protocol eras — legacy
initializeand modern per-request_metanegotiation served by the samezif_mcp2_server. - Typed authoring surface — common server-authoring paths need no hand-written JSON: typed
request getters (
require_arg_string,get_arg_string_or,bind_arguments), typed response factories (zcl_mcp2_resp_call_tool=>text,=>error_text,=>structured_data) and full-control builders (add_resource,add_resource_link,set_structured_data) with typed content annotations (zif_mcp2_content), fluent schema builders (zcl_mcp2_schema_builderfor tool schemas,zcl_mcp2_elicit_schemafor flat elicitation forms), and typed input-request builders (zcl_mcp2_input_elicitation,zcl_mcp2_input_sampling) unified byzif_mcp2_input_request. UI icons are typed everywhere the spec allows them: serverInfo (get_icons), tools, prompts, resources, resource templates and resource links (zif_mcp2_content=>icons). Pre-built ajson remains an escape hatch for rich prompt content and custom extensions. - Tool catalog base — inherit from
zcl_mcp2_tool_server_base, declaredefine_tools( )once, and implementcall_tool( ). The base derivessupports_tools,tools/list,get_tool_schema, unknown-tool rejection, and default schema validation from the catalog. Advertised-schema violations are returned asisErrortool results in both eras; structurally malformed calls and unknown tools remain-32602. - Era-aware capability checks on the base class —
client_supports_elicitation,client_supports_elicit_url,client_supports_sampling,client_supports_tasks(modern: declared extension; legacy: per-requestparams.taskopt-in),era_is_modern,get_protocol_version, pluscan_request_input/input_requiredfor MRTR, let authors safely gate era- and client-dependent features instead of hitting a framework-32021/-32600. Of the features SEP-2577 deprecates in2026-07-28, Roots and Logging are not implemented; Sampling is kept (as an MRTR input builder) because it is the only key-less LLM access path from ABAP. - Request context without
_metaparsing — client identity, negotiated protocol, log-level hints and W3C trace context are available through typed base-class getters. serverInfois written twice in the modern era — deliberately. The2026-07-28draft movedserverInfoout of the top-level result and into_meta["io.modelcontextprotocol/serverInfo"](theResultMetaObjectshape) on 2026-07-16, so the SDK emits it there on every modern result. It also still writes the superseded top-level field onserver/discover, because every published TypeScript v2 SDK release (through2.0.0-beta.4) bundles aDiscoverResultSchemathat requires it — omit it and the SDK's ownclient.connect()version-negotiation probe misclassifies the server as non-modern, silently downgrading real clients to the legacy era. Writing both costs a few bytes and keeps the SDK correct against the spec and usable by the clients that exist today. The top-level write is scheduled for removal once a released SDK reads_metainstead (details). Legacyinitializeis unaffected:serverInfostays a plain top-level field there.- Conversion in the data class — explicit per-field JSON↔ABAP; central code only for the JSON-RPC envelope and the modern result stamp.
Target / tooling
- ABAP 7.5x classic (first iteration). abaplint
v752. - ABAP 7.4x donwport planned to be added after beta phase, cloud-ready not planned.
- Distributed via abapGit.
Used ABAP open-source projects
- ajson — JSON library, vendored as
zmcp2_ajson(MIT). - abaplint — linting and transpiler-based unit tests.
- abapGit — source control.
More awesome ABAP projects at dotabap.org.
Development checks
- Static check:
npm installonce, thennpm run lint(abaplint, config in abaplint.json). - Behavior: the Jest integration suite in the sibling
mcp2_testsrepository, run against an ABAP system serving the SDK and its test servers. It covers both protocol eras against the reference TypeScript SDK plus raw-HTTP wire checks. - ABAP unit tests run in the ABAP system (SE80/ADT); the transpiler-based local run only covers a subset (no database, vendored-ajson unicode test excluded).
License
MIT. Vendored dependencies retain their original licenses; see THIRD_PARTY_NOTICES.md.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.