spikard logo

spikard

Community
Goldziher

Codegen-first polyglot web toolkit: one Rust core, 14 language bindings, spec-driven codegen (OpenAPI, AsyncAPI, GraphQL, gRPC, SQL to HTTP) and a 13-tool MCP server. Experimental, pre-1.0, MIT.

PublisherGoldziher
Repositoryspikard
LanguageRust
Forks
8
Stars
120
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    spikard exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    120 stars and 8 forks from the linked repository.

One web toolkit, every language.

Codegen-first polyglot web toolkit. A Rust core plus 14 language bindings generated by alef — spec-driven codegen (OpenAPI, AsyncAPI, GraphQL, JSON-RPC, gRPC, and SQL→HTTP), type-safe routing, tower-http middleware, an MCP server for coding agents, and fixture-driven cross-language testing.

Rust core · Python · TypeScript · Ruby · PHP · Elixir · Go · Java · C# · Kotlin · Dart · Swift · Zig · WASM · C FFI

Install · Why spikard · Quick example · MCP server · Docs


[!IMPORTANT] spikard is experimental and pre-1.0. APIs change between releases, and not every binding is at the same level of maturity. It is not yet recommended for production.

That is also the invitation: this is the point where feedback actually shapes the design. If you try it and something is wrong, awkward, or missing, please open an issue. If you want to help, good first issues are scoped to be finishable in an evening, and CONTRIBUTING.md explains the generated-bindings workflow.

Why spikard

CapabilityDetails
Type-safe across bindingsHTTP routing with path, query, body, and header validation. Errors convert losslessly between languages.
Polyglot bindingsPython, TypeScript/Node, Ruby, PHP, Elixir, Go, Java, C#, Kotlin, Dart, Swift, Zig, WASM, Rust, and C FFI.
Schema codegenParse OpenAPI 3.0, AsyncAPI 3.0, GraphQL SDL, and JSON-RPC 2.0 specs. Generate handlers and validators per binding.
SQL to HTTP codegenAnnotate SQL queries with @http GET /path, @http_auth bearer:jwt, and emit route metadata and OpenAPI specs.
Tower middlewareCompression, rate limiting, timeouts, request IDs, JWT/API-key auth, and static file serving.
Lifecycle hooksonRequest, preValidation, preHandler, onResponse, and onError.
WebSocket & SSEBidirectional streams and server-sent events.
Fixture-driven testingShared JSON fixtures drive tests across language bindings for behavioral consistency.
CLI & MCP serverInitialize projects, generate code, validate schemas, and integrate with MCP-compatible tools.

Installation

Each binding ships through its native package manager.

TargetPackageInstall
Rustspikard on crates.iocargo add spikard
CLIspikard-cli on crates.iocargo install spikard-cli or cargo binstall spikard-cli
Pythonspikard on PyPIpip install spikard
Node.js@spikard/node on npmnpm install @spikard/node
WASM@spikard/node-wasm on npmnpm install @spikard/node-wasm
Rubyspikard on RubyGemsgem install spikard
PHPgoldziher/spikard on Packagistcomposer require goldziher/spikard
Elixirspikard on HexAdd {:spikard, "~> 0.17"} to mix.exs
Gogithub.com/Goldziher/spikardgo get github.com/Goldziher/spikard
Javadev.spikard:spikard on Maven CentralMaven/Gradle — see Java README
C#Spikard on NuGetdotnet add package Spikard
Kotlindev.spikard:spikard on Maven CentralMaven/Gradle — see Kotlin README
Dartspikard on pub.devdart pub add spikard
SwiftSpikard via SwiftPMAdd to Package.swift
Zigspikard via build.zig.zonAdd to build manifest
C FFIspikard-ffi shared/static libraryGitHub Releases

Quick example

Python

python
from spikard import Spikard
from msgspec import Struct

class User(Struct):
    id: int
    name: str

app = Spikard()

@app.get("/users/{id:int}")
async def get_user(id: int) -> User:
    return User(id=id, name="Alice")

if __name__ == "__main__":
    app.run(port=8000)

TypeScript

typescript
import { Spikard } from "@spikard/node";

const app = new Spikard();

app.get("/users/{id:int}", async (id: number) => {
  return { id, name: "Alice" };
});

app.run({ port: 8000 });

See the examples directory in the repository for working examples in every supported language.

MCP server

The CLI ships an MCP server so a coding agent can scaffold and generate spikard projects directly. It is enabled by default (spikard-cli feature mcp) and speaks stdio out of the box; streamable HTTP is available via the mcp-http feature.

json
{
  "mcpServers": {
    "spikard": {
      "command": "spikard",
      "args": ["mcp"]
    }
  }
}

Thirteen tools are exposed, covering project init, codegen from every supported spec format, the SQL→HTTP pipeline, AsyncAPI fixture and test-app generation, schema validation, and a feature summary. See the MCP documentation for the full tool list and worked flows.

SQL to HTTP

Annotate a SQL query and spikard emits the route, an OpenAPI 3.1 fragment, and a typed handler stub that calls into the generated query function:

sql
-- @name GetUser
-- @returns :one
-- @http GET /users/{id}
-- @http_auth bearer:jwt
SELECT id, name, email FROM users WHERE id = $1;

Query parsing and type inference come from scythe; spikard reads scythe's analyzed-query IR and overlays the HTTP vocabulary on top. scythe stays library-agnostic and owns no HTTP concepts. See the SQL codegen guide.

Architecture

All bindings call a shared Rust core through thin language-native layers:

text
Language bindings (Python, Node, Ruby, Go, Java, C#...)
        |
        v
FFI / NAPI / PyO3 / Magnus / runtime bridge
        |
        v
crates/spikard-http      Router, middleware, auth
crates/spikard-core      HTTP types, validation, errors
crates/spikard-codegen   OpenAPI, GraphQL, AsyncAPI, JSON-RPC

Bindings are generated from the Rust API surface via alef. Binding code stays thin: type conversion, error conversion, and runtime integration. Business logic, validation, middleware, and codegen all live in Rust.

  • OpenAPI 3.0 — Route definitions to specs, parameter validators, Swagger/ReDoc UI
  • GraphQL — SDL schema parsing, query execution, introspection, Handler trait integration
  • AsyncAPI 3.0 — Channel/operation extraction, message validators, WebSocket integration
  • OpenRPC — JSON-RPC 2.0 method handlers, parameter validation, batch requests

Compression (gzip/brotli), rate limiting, timeouts, request IDs, authentication (JWT/API key), static files. Configured via ServerConfig structs. All middleware is implemented in Rust via tower-http.

Development

bash
task setup     # Install dependencies
task build     # Build Rust core (debug)
task test      # Run Rust tests
task test:all  # Run all tests (Rust + bindings)
task e2e:all   # Generate + build + run e2e tests
task format    # Format all code

Run task --list for the full task catalog.

  • Experimental and pre-1.0 — see the note at the top of this README. APIs change between releases.
  • Binding packages follow the Rust crate version.
  • E2E coverage is fixture-driven and shared across supported language targets.
  • See CONTRIBUTING.md for guidelines on modifying generated bindings.

License

MIT License — see LICENSE for details.

Installation

TypingMind
{
  "mcpServers": {
    "spikard": {
      "command": "npx",
      "args": [
        "@spikard/node",
        "mcp"
      ]
    }
  }
}

Use spikard MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once spikard is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add spikard as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the spikard MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "spikard": {
      "command": "npx",
      "args": [
        "-y",
        "spikard-workspace"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the spikard MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the spikard MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use spikard to help me with this task?
spikard
Sure. I read it.
Here is what I found using spikard.

Frequently asked questions

What is the spikard MCP server used for?

spikard is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use spikard MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use spikard with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use spikard MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With spikard connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect spikard MCP to TypingMind?

spikard runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does spikard MCP provide in TypingMind?

spikard exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use spikard MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If spikard requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇